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 Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm


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