Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Altering output file attributes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Altering output file attributes
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: 8567
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 06, 2020 6:39 pm    Post subject: Reply to: Altering output file attributes
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

Active Member


Joined: 29 Apr 2008
Posts: 865
Location: Maryland

PostPosted: Tue Oct 06, 2020 7:30 pm    Post subject:
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: 860
Location: The Universe

PostPosted: Tue Oct 06, 2020 7:57 pm    Post subject:
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    Post subject: Reply to: Altering output file attributes
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

Active Member


Joined: 29 Apr 2008
Posts: 865
Location: Maryland

PostPosted: Wed Oct 07, 2020 5:28 pm    Post subject: Re: Reply to: Altering output file attributes
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Hex Value - vb file replace old date ... premnath DFSORT/ICETOOL 10 Sat Oct 17, 2020 3:15 am
No new posts Related to using a file in comparison Kumar Sandeep JCL & VSAM 7 Fri Oct 16, 2020 5:30 pm
No new posts Creating a single-record file with CO... Joerg.Findeisen DFSORT/ICETOOL 8 Tue Oct 06, 2020 8:19 pm
No new posts DB2 - row_number function - Need 1st ... Q5P418 DB2 5 Wed Sep 09, 2020 8:35 am
No new posts TWS - ETT File triggering does not wo... me00266 IBM Tools 4 Mon Sep 07, 2020 11:58 pm

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