Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 4648
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us