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
 

 

WRITE AFTER POSITIONING Vs ADVANCING

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sri.sripathi

New User


Joined: 08 Oct 2006
Posts: 2

PostPosted: Sun Nov 19, 2006 5:32 pm    Post subject: WRITE AFTER POSITIONING Vs ADVANCING
Reply with quote

Hi,
I came across a VS cobol program which uses "WRITE AFTER POSITIONING var1". I converted it to COBOL370 version "WRITE AFTER ADVANCING var2" and EVALUATE verb.

The report file generated by the program RECFM is FBA. The report file record Layout in the VS COBOL program has first byte as the print control character(var1).

If we maintained the first byte in COBOL370 then the LRECL of the report file is incremented automatically by 1byte(n+1 bytes) during the execution of the COBOL370 version dynamically. This extra byte has the
print control character same as the print control character present as the 1st byte of the record layout in the program.

To overcome the problem ,i commented the first byte in the record layout in the program.
Is this a fool proof soulution
Does COBOL370 automatically prefix the output record with the print control character mentioned in the "WRITE AFTER ADVANCING" instruction.
I assume The solution of let the file record size increase definitely not optimal.

Thanking you,
Yours truly,
Srikanth
Back to top
View user's profile Send private message

UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 755
Location: Germany

PostPosted: Mon Nov 20, 2006 2:22 pm    Post subject:
Reply with quote

Hi !

You did right. By using Write after or write before then automatically the record is prefixed with one Byte for print-control-char. After that, there is your normal record-layout as you declared it in working storage.

Regards, UmeySan
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 Write R1 and R2 to OP1 and R1 to OP2 bhaskar_kanteti DFSORT/ICETOOL 10 Fri Mar 03, 2017 11:18 am
No new posts Can you write 2 recs on SORTOUT when ... Sysaron DFSORT/ICETOOL 6 Thu Feb 23, 2017 12:07 am
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts Compare 2 files & write Indicator... nagendrapgupta SYNCSORT 5 Sun May 15, 2016 10:42 am


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