Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts Detect break in the sequence tuxama DFSORT/ICETOOL 6 Tue Mar 20, 2018 1:35 pm
No new posts Copying only first and last word from... chandan.inst SYNCSORT 4 Wed Jan 31, 2018 4:19 pm
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us