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
 

 

cobol code to write header for report program

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

New User


Joined: 10 Feb 2009
Posts: 26
Location: chennai

PostPosted: Tue Feb 10, 2009 10:23 pm    Post subject: cobol code to write header for report program
Reply with quote

hi all,

i have a PS file which has records with indicators 'A ' & 'AB'. i need to write 2 seperate headers for these 2 sets of records in the report. the thing is that the file has first all 'A ' records and then followed by all 'AB' records. so first we have to write a header for 'A ' records and the when it encounters a 'AB' record, it must write another header and then continue with the report. how to do this funtionality. kindly help me.

example of the input file:

Code:
001A 1111111111111111111111
002A 1111111111111111111111
003A 1111111111111111111111
004A 1111111111111111111111
005A 1111111111111111111111
001AB1111111111111111111111
002AB1111111111111111111111
003AB1111111111111111111111
004AB1111111111111111111111
005AB1111111111111111111111


thanks,
Raki
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 11, 2009 2:51 am    Post subject:
Reply with quote

Hello,

In working-storage define a "hold" indicator.

In the procedure code, read a record and if the input indicator is not = the hold indicator write the header and move the input indicator to the hold indicator. Write the report. Continue until end of file.
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 Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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