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

Altering output file attributes


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
f8ful

New User


Joined: 02 Nov 2006
Posts: 30

PostPosted: Tue Oct 06, 2020 4:07 pm
Reply with quote

I have a sequential file I'm modding to. When I run a batch job to mod the file the attributes of the "modded to" file are being changed. How can I prevent this?

Before attributes of the input and output file:

Record format . . . : VB
Record length . . . : 0
Block size . . . . : 32760

Attributes after modding:

Record format . . . : VB
Record length . . . : 32756
Block size . . . . : 32760

The JCL I've tried to mod

//STEP2 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=(Indataset),DISP=SHR
//SYSUT2 DD DSN=(Outdataset),DISP=MOD,
// DCB=(RECFM=VB,LRECL=0,BLKSIZE=32760)
//SYSIN DD DUMMY

and

//SYSUT1 DD DSN=(Indataset),DISP=SHR
//SYSUT2 DD DSN=(Outdataset),DISP=MOD,
// DCB=(RECFM=VB,BLKSIZE=32760)

and

//SYSUT1 DD DSN=(Indataset),DISP=SHR
//SYSUT2 DD DSN=(Outdataset),DISP=MOD

All JCL has produced the same results.

There must be some type of JCL coding that will prevent the LRECL from changing.

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 06, 2020 6:39 pm
Reply with quote

Quote:
There must be some type of JCL coding that will prevent the LRECL from changing.
Actually, no there does not have to be.

LRECL=0 is valid ONLY for RECFM=U. Your data set is VB, not U, and hence it is NOT valid for you to have LRECL=0. The system is properly changing your invalid value to a valid value.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2017
Location: USA

PostPosted: Tue Oct 06, 2020 7:30 pm
Reply with quote

Parameter LRECL (and other DCB subparameters) from DD statement always have priority over the same values stored in DSCB (e.g. “dataset control block”). Whenever your output dataset is OPEN/CLOSED, those high-priority values do mandatory replace the previous ones.

BTW: if no LRECL>0 were defined anywhere, then most likely you would get OPEN ABEND...
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Tue Oct 06, 2020 7:57 pm
Reply with quote

The probability is high that it was IEBGENER that changed the LRECL, because it was 0. Look in the IEBGENER SYSPRINT data set: I think you will see a message that it copied the input LRECL to the output LRECL.

Mr. Sample is incorrect when he says LRECL 0 is valid only for RECFM U. It is always valid when allocating a data set; it must be set before opening the data set for the first time. For V record formats the LRECL defines the maximum length for the data set. The exception to that particular rule is RECFM U data sets where BLKSIZE defines the maximum record length; Assembler programs that use QSAM to write to the data set use LRECL to specify the length of the next record the program is writing to the data set.
Back to top
View user's profile Send private message
f8ful

New User


Joined: 02 Nov 2006
Posts: 30

PostPosted: Wed Oct 07, 2020 4:36 pm
Reply with quote

Thanks all. In particular Steve Myers. Yes it was IEBGENER with the SYSPRINT message you mentioned, causing the problem. I used another utility to do the MOD and it did not change the LRECL upon the mod.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2017
Location: USA

PostPosted: Wed Oct 07, 2020 5:28 pm
Reply with quote

f8ful wrote:
Thanks all. In particular Steve Myers. Yes it was IEBGENER with the SYSPRINT message you mentioned, causing the problem. I used another utility to do the MOD and it did not change the LRECL upon the mod.

It all sounds like playing an unknown game with the computer...
Doesn’t make any sense. What is your goal in doing this strange activity?
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top