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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am

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