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
 
How to change the record length of a dataset thru JCL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Matty

New User


Joined: 14 Dec 2005
Posts: 4
Location: Pune, India

PostPosted: Tue Jan 24, 2006 12:56 pm    Post subject: How to change the record length of a dataset thru JCL?
Reply with quote

I have one dataset (for ex. TEST.DAT') with record length 256. It is having some data also.

Now I want to reduce its record length to 80 thru JCL. Data truncation is not a problem. Only first 80 characters is enough. Here my condition is the output file should also have the same name (TEST.DAT) but with the record length 80.

Is there any single step to do this?
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 24, 2006 4:40 pm    Post subject:
Reply with quote

Yes, you can do that in one step using IEBGENER.

O.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Jan 24, 2006 4:48 pm    Post subject:
Reply with quote

Really interesting.
Mr O, are you sure that you can do it in only one step? icon_confused.gif
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 24, 2006 6:17 pm    Post subject:
Reply with quote

I just tried it, to make sure:
Code:
//OFERFFT JOB (),@IEBG,MSGCLASS=T,CLASS=A,NOTIFY=&SYSUID               
//**********************************************************************
//* IEBGENER UTILITY                                                   *
//**********************************************************************
//IEBG   EXEC PGM=IEBGENER                                             
//SYSPRINT DD SYSOUT=*                                                 
//SYSUT1   DD DSN=OFERF.IFS,DISP=SHR                                   
//SYSUT2   DD DSN=OFERF.IFR,DISP=SHR                                   
//SYSIN    DD *                                                         
 GENERATE MAXFLDS=1                                                     
 RECORD FIELD=(80)                                                     
/*                                                                     


Where LRECL of 'OFERF.IFS' = 3000 and LRECL of 'OFERF.IFR' = 80.

O.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Jan 24, 2006 6:33 pm    Post subject:
Reply with quote

Ok, but is not the same dataset... icon_wink.gif
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Jan 24, 2006 7:02 pm    Post subject:
Reply with quote

Ofer is right but you must do it in 2/3 step:
1) copy your file reblocking the content(as suggest ofer)
2) delete input file and reload it with new

or

1) rename your input file
2) copy the file, using the Ofer's method, in the original dataset

Depend on your usage of dataset(if temporary or not) you must use a delete before allocate the output dataset.

I hope in this.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Jan 24, 2006 7:15 pm    Post subject: Re: How to change the record length of a dataset thru JCL?
Reply with quote

I don't see where there is any way this can be done in a single job step. Sure, you can use IEBGENER or DFSORT/ICETOOL/SYNCSORT/SYNCTOOL to truncate the dataset to a temporary dataset, but the original dataset must be deleted, and then a new copy cataloged, which will require at least two job steps to avoid the JCL error.

The only way I can see this happening within a single job step is using a program and dynamic allocation/de-allocation of the required datasets.
Back to top
View user's profile Send private message
Matty

New User


Joined: 14 Dec 2005
Posts: 4
Location: Pune, India

PostPosted: Tue Jan 24, 2006 8:18 pm    Post subject: Re: How to change the record length of a dataset thru JCL?
Reply with quote

Thank you guys for your reply.
I just wanted to know whether there is any simple way to do this.
Now I have done this with two steps as told by SuperK
Once again thanks to you all!

Regards,
Matty
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm

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