Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Prblem with mail having MIME contents harsh.saxena579 JCL & VSAM 2 Tue Dec 12, 2017 3:48 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us