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
 

 

Display the contents in comp and comp3 fields

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

New User


Joined: 20 May 2008
Posts: 21
Location: bangalore

PostPosted: Mon Jun 02, 2008 9:45 am    Post subject: Display the contents in comp and comp3 fields
Reply with quote

Hi Forum,

Iam working on a report generation module.I have problem, I need to display the contents in comp and comp3 fields which are described below.

01 countrs- subscrts
02 usub1 pic s9(4) comp value


01 imdt -rslts
02 int-sum pic s9(5)v(2) comp3

Please suggest me the equivalent variabbles with display usage.

Thevalue in comop is -5634 and in comp3 is -9999999.
Back to top
View user's profile Send private message

chandu.be

New User


Joined: 17 Jul 2006
Posts: 9
Location: Bagalore

PostPosted: Mon Jun 02, 2008 11:34 am    Post subject:
Reply with quote

Hi,

For reporting purpose always it is suggestable to use editing variables.

For your requirement you can use the following type variables:

1. To display the value of COMP you can use 'PIC -9(4)' variable.
2. To display the value of COMP-3 you can use 'PIC -9(3).9(2)' variable.
Note that -99999 value will be displayed as -999.99



Regards,
Chandu
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 276
Location: Bang,iflex

PostPosted: Mon Jun 02, 2008 11:38 am    Post subject:
Reply with quote

Hi,

Code:

For reporting purpose always it is suggestable to use editing variables.

For your requirement you can use the following type variables:

1. To display the value of COMP you can use 'PIC -9(4)' variable.
2. To display the value of COMP-3 you can use 'PIC -9(3).9(2)' variable.
Note that -99999 value will be displayed as -999.99


Adding to above, just move the COMP variable to a equivalent local W-S variable or to report variable and display as you wish.
Back to top
View user's profile Send private message
baramesh

New User


Joined: 20 May 2008
Posts: 21
Location: bangalore

PostPosted: Mon Jun 02, 2008 4:50 pm    Post subject: Reply to: Display the contents in comp and comp3 fields
Reply with quote

Thank you every body for your valuable contributions.its working fine.
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 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
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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