From: raveendra_ibm on

Thank you Charles Hottel....

I was wondering if the result would be the same for

A PIC X(04) VALUE IS 'BCDN'.
B REDEFINES A PIC S9(04).
ADD 1000 TO B.
DISPLAY B.

Could you please let me know how this conversion from unpacked to
packed decimal is actually performed. And how is 1000 represented while
addition is performed.

I am working on IBM Mainframes.

Thanks and Regards,
Raveendra.


--
raveendra_ibm
Message posted via http://www.exforsys.com for all your training needs.

From: raveendra_ibm on

Thanks Michael Mattias !!!

I just wanted to know if I could change the data being displayed
in various formats in 'cobdata.zip'
(http://www.flexus.com/ftp/cobdata.zip).
I am working on IBM Mainframes that uses EBCDIC representation.
Could you please let me know if there is any compiler or supporting
cobol tool that interprets the program step wise and also enables us to
view the changing values in variables.

Thanks and Regards,
Raveendra.


--
raveendra_ibm
Message posted via http://www.exforsys.com for all your training needs.

From: Michael Mattias on
"raveendra_ibm" <raveendra_ibm.21auxe(a)no-mx.forums.yourdomain.com.au> wrote
in message news:raveendra_ibm.21auxe(a)no-mx.forums.yourdomain.com.au...
>
> A PIC X(04) VALUE IS 'BCDN'.
> B REDEFINES A PIC S9(04).
> ADD 1000 TO B.
> DISPLAY B.
>
> Could you please let me know how this conversion from unpacked to
> packed decimal is actually performed. And how is 1000 represented while
> addition is performed.

That is 'implementor-defined' and not part of the COBOL language.

> I am working on IBM Mainframes.
I am sure IBM's compiler uses machine instructions appropriate to its
architecture, but so does each COBOL compiler publisher.

I "believe" the IBM compiler offers a compile-time option to generate an
assembly-language listing. If you use that and can read assembly language,
that will give you both your answers.

--
Michael Mattias
Tal Systems, Inc.
Racine WI
mmattias(a)talsystems.com



From: William M. Klein on
If you are working at a "production" shop (or even most educational
institutions) with IBM's COBOL compiler, they probably have one or more
"dynamic" (interactive) debugging tools. These may include any of the
following:

Debug Tool (from IBM)
Xpediter (from Compuware)
Intertest (primarily for CICS, as I recall)

It sounds (to me) as if you are in an environment where you SHOULD be able to
ask those who work there for guidance and get more "targeted" answers to how
things are done at this shop/place.

--
Bill Klein
wmklein <at> ix.netcom.com
"raveendra_ibm" <raveendra_ibm.21axog(a)no-mx.forums.yourdomain.com.au> wrote in
message news:raveendra_ibm.21axog(a)no-mx.forums.yourdomain.com.au...
>
> Thanks Michael Mattias !!!
>
> I just wanted to know if I could change the data being displayed
> in various formats in 'cobdata.zip'
> (http://www.flexus.com/ftp/cobdata.zip).
> I am working on IBM Mainframes that uses EBCDIC representation.
> Could you please let me know if there is any compiler or supporting
> cobol tool that interprets the program step wise and also enables us to
> view the changing values in variables.
>
> Thanks and Regards,
> Raveendra.
>
>
> --
> raveendra_ibm
> Message posted via http://www.exforsys.com for all your training needs.
>


From: Richard on
> A PIC X(04) VALUE IS 'BCDN'.
> B REDEFINES A PIC S9(04).
> ADD 1000 TO B.
> DISPLAY B.

> Could you please let me know how this conversion from unpacked to
> packed decimal is ...

It _isn't_ packed. There is no 'unpacked to packed conversion'. It is
all unpacked. The only 'conversion' is that the zone bits are zeroised.

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: Tandem
Next: free implementation? factorial?