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

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
Reply with quote

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

Superior Member


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

PostPosted: Thu Jan 10, 2008 1:28 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top