View previous topic :: View next topic
|
Author |
Message |
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
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 |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
do you mean something so difficult and strange like?
Code: |
WRITE youroutputfile FROM ws-rec1
WRITE youroutputfile FROM ws-rec2 |
|
|
Back to top |
|
|
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
Yes! exactly |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Define ws-rec1 & ws-rec2 on 01 level. |
|
Back to top |
|
|
|