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
 
How to display COMP, COMP-1, COmp-2 and Comp-3 fields?

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

New User


Joined: 24 Jun 2006
Posts: 50

PostPosted: Thu Jul 02, 2009 5:19 pm    Post subject: How to display COMP, COMP-1, COmp-2 and Comp-3 fields?
Reply with quote

Hi ,

I want to know how we can display COMP, COMP-1, COmp-2 and Comp-3 fields?
Like i have to read a field S9(5)V9(3) and write it to output file in read able format.
Similarly i have to Display a field S9(3)v(2) usage comp.

Pls suggest.

Thanks!
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jul 02, 2009 5:37 pm    Post subject:
Reply with quote

Read the manuals.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 02, 2009 5:50 pm    Post subject:
Reply with quote

First, make up your mind what you want to do. DISPLAY is a specific COBOL verb with a specific meaning -- namely, to print upon the system output device (usually SYSOUT unless overridden). You cannot use DISPLAY to write a field to an output file as you appear to want to in your post.

Second, as Craq said -- read the manuals, they are quite clear about how each type of numeric field will be converted by the DISPLAY statement. And read up on the MOVE statement for moving numeric values around -- there's a table that will tell you how to do what you want with the output file.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Thu Jul 02, 2009 5:55 pm    Post subject:
Reply with quote

look for edit mask and display
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 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
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am

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