IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to display COMP, COMP-1, COmp-2 and Comp-3 fields?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 02, 2009 5:50 pm
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: 6966
Location: porcelain throne

PostPosted: Thu Jul 02, 2009 5:55 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts How to display the leading zeros of a... DB2 7
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
Search our Forums:

Back to Top