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

WRITE AFTER POSITIONING Vs ADVANCING


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 771
Location: Germany

PostPosted: Mon Nov 20, 2006 2:22 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts JCL to write the log on to a PDS file JCL & VSAM 10
Search our Forums:

Back to Top