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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am


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