View previous topic :: View next topic
|
Author |
Message |
Lithikshaa
New User
Joined: 11 Dec 2020 Posts: 4 Location: India
|
|
|
|
Team,
Please provide me a command to change LRECL of an existing file using REXX. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1335 Location: Bamberg, Germany
|
|
|
|
Please provide what YOU have tried so far. Err Msgs and so on. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
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. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
|