how do you view comp-3 fields?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

how do you view comp-3 fields?

Postby sridhar4mfs » Wed Oct 27, 2010 7:27 pm

how do you view comp-3 fields?
sridhar4mfs
 
Posts: 1
Joined: Wed Oct 27, 2010 7:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how do you view comp-3 fields?

Postby Robert Sample » Wed Oct 27, 2010 7:46 pm

"View" as show on a CICS screen?
"View" as show in TSO/ISPF?
"View" as COBOL DISPLAY to SYSOUT?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: how do you view comp-3 fields?

Postby hariprasad33 » Mon Nov 08, 2010 7:23 pm

hi sridhar4mfs,

Suppose if you have mentioned a field in COMP-3 format in cobol,that field appears in the generated file (in "VIEW" mode) as a packed decimal format.so,if you want see that field in decimal format write a simple sort card for expanding that filed using "EDIT" keyword.
for exmaple: OUTREC FIELDS=(1:1,6,PD,EDIT(TTTTTTTTTTT)) means Display start from positions 1to 11(in decimal format) in output,taken from length 1 to 6(in packed decimal format) in input.so,like this we can expand from packed decimal to decimal digits.by doing this way,we can view comp-3 fiedls.

kindly let me know if you have any query.


Thanks,
Hariprasad Borra.
hariprasad33
 
Posts: 1
Joined: Mon Nov 01, 2010 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how do you view comp-3 fields?

Postby dick scherrer » Tue Nov 09, 2010 12:53 am

Hello and welcome to the forum,

As this is a "cobol" question, a cobol answer would be more appropriate than a sort solution.

Actually, Sridhar should answer the questions Robert posted. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: how do you view comp-3 fields?

Postby littlechicken » Tue Nov 09, 2010 4:15 pm

sridhar4mfs wrote:how do you view comp-3 fields?



In a CICS formatted dump? A abendaid dump? in which method are you referring to - In a database ?
littlechicken
 
Posts: 25
Joined: Thu Oct 28, 2010 10:15 am
Has thanked: 0 time
Been thanked: 0 time

Re: how do you view comp-3 fields?

Postby Quasar » Wed Nov 10, 2010 10:25 pm

Shridhar -

You have not clarified the context in which you have posted this query. Do you want to see this data in a File, or if it is an intermediate value in a COBOL Pgm.
1. In case the COMP-3 Data, that you want to see is the data in a Mainframe File, and you would like to see the contents on TSO/ISPF, you can turn the HEX ON on the Command Line. In the below file, the last 2 Bytes are COMP-3 Data. You read the Hexa-decimal value in a top-down fashion.

Image

2. If you have software tools like File-Aid or IBM's File Manager, you can use them to browse the contents of a File, and see the data in a COMP-3 Column. Take a look below, how I am browsing the file, using IBM's File Manager Tool -

Image

3. You may also DISPLAY this in COBOL, by first MOVE'ing the data to a Numeric-Edited DISPLAY Format Variable.
01 COMMISSION  PIC S9(03) COMP-3
01 WS-COMMISSION PIC -Z(03).

MOVE COMMISSION TO WS-COMMISSION
DISPLAY WS-COMMISSION


Thank you very much.
Quasar Chunawala,
Software Engineer, Lives at Borivali, Mumbai
User avatar
Quasar
 
Posts: 102
Joined: Wed Nov 10, 2010 7:11 pm
Location: Borivali, Mumbai
Has thanked: 13 times
Been thanked: 2 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post