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

A command to change LRECL of an existing file using REXX


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Lithikshaa

New User


Joined: 11 Dec 2020
Posts: 4
Location: India

PostPosted: Mon Dec 14, 2020 2:38 pm
Reply with quote

Team,
Please provide me a command to change LRECL of an existing file using REXX.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Dec 14, 2020 2:53 pm
Reply with quote

There is no "command". Rexx is a programming language with keywords and functions. You use those to create a program that does what you want as with any other programming language. And to learn that you read the manual (you can skim a lot of it first time through) and experiment.

Please present what you have tried and what problems you are having with your code.

And why is this in the JCL & VSAM section of the forum when you are expressly asking about Rexx?
Back to top
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 452
Location: Bamberg, Germany

PostPosted: Mon Dec 14, 2020 2:56 pm
Reply with quote

Please provide what YOU have tried so far. Err Msgs and so on.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 443
Location: Denmark

PostPosted: Mon Dec 14, 2020 10:17 pm
Reply with quote

It depends on the dataset. If a sequential dataset I think that you can use the EXECIO command in a REXX pgm to write 0 records with a new lrecl and disp MOD.
My recommendation would be to install the PDS86 program from Use [URL] BBCode for External Links file 182 and use the FIX subcommand.
But whatever tool you choose, there is a very good chance that you shoot yourself in the foot. I would much rather do a copy, using IEBGENER or like, and rename because then I can verify the result, before deleting the old dataset. Using the IDCAMS REPRO command would actually justify your putting the request in this section. icon_smile.gif
Back to top
View user's profile Send private message
steve-myers

Active Member


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

PostPosted: Mon Dec 14, 2020 11:02 pm
Reply with quote

Willy -

I thought about your idea. I even had most of the post written, and killed it. There are just too many ways for the user to “irrevocably destroy the data set” (I thought that was a nice way of putting it). So probably better the user does nothing.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1009

PostPosted: Tue Dec 15, 2020 2:25 am
Reply with quote

Lithikshaa wrote:
Team,
Please provide me a command to change LRECL of an existing file using REXX.

This would be a serious violation of any common-sense agreements.

The only “normal” way to do this should be: copying the original dataset to another one, with desired new LRECL.

A temporary change of LRECL, only for a single run of the program, is: to specify new LRECL in DD statement used to access this dataset.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2632
Location: NYC,USA

PostPosted: Tue Dec 15, 2020 3:48 am
Reply with quote

Lithikshaa wrote:
Team,
Please provide me a command to change LRECL of an existing file using REXX.
Let us know why thru REXX or just because someone is asking you to do ONLY thru REXX? A simple DFSORT copy could do it.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Dec 15, 2020 5:02 pm
Reply with quote

From the DFSMSdfp Utilities manual
Quote:
You can use IEBGENER to perform these tasks:

    . Create a backup copy of a sequential data set, a member of a partitioned data set or PDSE or a z/OS UNIX System Services (z/OS UNIX) file such as a HFS file.
    . Produce a partitioned data set or PDSE, or a member of a partitioned data set or PDSE, from a sequential data set or a z/OS UNIX file.
    . Expand an existing partitioned data set or PDSE by creating partitioned members and merging them into the existing data set.
    . Produce an edited sequential or partitioned data set or PDSE.
    . Manipulate data sets containing double-byte character set data.
    . Print sequential data sets, members of partitioned data sets or PDSEs or z/OS UNIX files.
    . Reblock or change the logical record length of a data set.
    . Copy user labels on sequential output data sets.
    . Supply editing facilities and exits for your routines that process labels, manipulate input data, create keys, and handle permanent input/output errors.

Recommendation: If you have the DFSORT product installed, you should be using
ICEGENER as an alternative to IEBGENER when making an unedited copy of a
data set or member. It may already be installed in your system under the name
IEBGENER. It generally gives better performance.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Get two files from one file with diff... DFSORT/ICETOOL 10
No new posts REXX allocated datasets in JCL CLIST & REXX 9
No new posts getting RC=3650 when invoking REXX wi... CLIST & REXX 7
No new posts View GDG data which is copied from a ... JCL & VSAM 2
No new posts How to read unpacked field created in... DFSORT/ICETOOL 11
Search our Forums:

Back to Top