Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to display comp-3 variable in SYSOUT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
yogeshbabu

New User


Joined: 30 Nov 2005
Posts: 19
Location: India

PostPosted: Mon Jan 30, 2006 5:14 pm    Post subject: How to display comp-3 variable in SYSOUT
Reply with quote

Hi all,
I want to know how we can display a comp-3 variable in SYSOUT?

Thanks & Regards,
Yogesh.
Back to top
View user's profile Send private message

raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Mon Jan 30, 2006 7:19 pm    Post subject: display comp-3
Reply with quote

there is no direct way to display.

you define equivalent working storage variable and display that variable.
Ex:
01 filed1 pic s9(3) comp-3.
01 filed2 pic -z99.

move field1 to field2.
display 'data:' field2
Back to top
View user's profile Send private message
Mane Sagar

New User


Joined: 12 Jul 2005
Posts: 41
Location: mumbai

PostPosted: Mon Jan 30, 2006 9:42 pm    Post subject:
Reply with quote

Hi yogeshbabu,

raghunathns is very right..
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jan 31, 2006 5:13 am    Post subject:
Reply with quote

I think it should be mentioned that comp-3 #s diSplay well except for the 1 lowest order digit.

If you're using displays for testing it's probably not worth the effort to do the moves. I just display them the way they are and use the following table to get the lowest #:
Code:

 0 {or}
+1 A   -1 J   
+2 B   -2 K   
+3 C   -3 L   
+4 D   -4 M
+5 E   -5 N
+6 F   -6 O
+7 G   -7 P   
+8 H   -8 Q
+9 I   -9 R
Back to top
View user's profile Send private message
yogeshbabu

New User


Joined: 30 Nov 2005
Posts: 19
Location: India

PostPosted: Tue Jan 31, 2006 10:18 am    Post subject: Re: How to display comp-3 variable in SYSOUT
Reply with quote

Thanks a lot
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us