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
 
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: 757
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am

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