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
 

 

How to break a record onto new line while writing into a fil

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

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Jan 10, 2008 12:26 pm    Post subject: How to break a record onto new line while writing into a fil
Reply with quote

Hi all,
I am trying to write a structure into a sequential file, i am having a sigle structure. Now I want to split the structure into number of records. Can anyone let me know is there a new line character in cobol which if put in between a structure makes the rest of the data to be written as a new record.

Ex:

Code:
01 ws-output-rec
     05 ws-rec1
          10 ws-field1 PIC x(30)
          10 ws-field2 PIC x(40)
          10 filler       PIC x(10)
     05 ws-rec2
          10 ws-field3 PIC x(30)
          10 ws-field4 PIC x(40)
          10 filler       PIC x(10)


Now while writing this ws-output-rec into a sequential file, can i have the ws-rec1 in first line and ws-rec2 in a new line.

Please let me know, Thanks in advance.
Back to top
View user's profile Send private message

acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Jan 10, 2008 12:31 pm    Post subject:
Reply with quote

do you mean something so difficult and strange like?

Code:
WRITE youroutputfile             FROM ws-rec1
WRITE youroutputfile             FROM ws-rec2
Back to top
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Jan 10, 2008 12:32 pm    Post subject: Reply to: How to break a record onto new line while writing
Reply with quote

Yes! exactly
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jan 10, 2008 1:28 pm    Post subject:
Reply with quote

Define ws-rec1 & ws-rec2 on 01 level.
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 Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


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