Page 1 of 2

EDIT a dataset without opening it?

PostPosted: Tue Nov 15, 2011 10:57 pm
by Burky319
I'm pretty new to JCL, but I'm catching on...we kick commands out to multiple systems using JOBCARDN, which sets up the jobcards for us. I've figured out how to push the following command and pull the user profile:

COMMAND(REBUILD USER)
????
COMMAND(END)

Then I can save it to a dataset on that system. What I would like to be able to do is edit the dataset from another system...for instance, do a CHANGE command on that dataset without ever opening it, and saving it. If I could figure that out, then I could save myself SO MUCH time in modifying datasets on the massive number of servers we have.

So, does anyone know how to modify a dataset without ever opening it, in the way that I could push those commands to another server? I know how to push it. I just need the change commands.

Any help is HUGELY appreciated!

Re: EDIT a dataset without opening it?

PostPosted: Tue Nov 15, 2011 11:07 pm
by enrico-sorichetti
here are the links to the relevant REXX and ISPF manuals ...
not the latest ones but enough to get You started
REXX
http://publibz.boulder.ibm.com/cgi-bin/ ... s/IKJ4BK90
ISPF
http://publibz.boulder.ibm.com/cgi-bin/ ... s/ISPZPM70

or here is the link to the root of the IBM manuals
http://www-03.ibm.com/systems/z/os/zos/ ... index.html

meditate on the manuals and search the forums for the creation and use of EDIT macros and how to run them in ISPF in batch

Re: EDIT a dataset without opening it?

PostPosted: Wed Nov 16, 2011 12:01 am
by steve-myers
Burky319 wrote:...Then I can save it to a dataset on that system. What I would like to be able to do is edit the dataset from another system...for instance, do a CHANGE command on that dataset without ever opening it, and saving it. If I could figure that out, then I could save myself SO MUCH time in modifying datasets on the massive number of servers we have.

So, does anyone know how to modify a dataset without ever opening it, in the way that I could push those commands to another server? I know how to push it. I just need the change commands.

Any help is HUGELY appreciated!
Ignoring issues about mechanics, you cannot edit data without finding out what the data is. To do this you must open and read the data.

Re: EDIT a dataset without opening it?

PostPosted: Wed Nov 16, 2011 12:10 am
by dick scherrer
Hello and welcome to the forum,

So, does anyone know how to modify a dataset without ever opening it,
No. In order to read/modify a dataset, something must open it. . .

Why not push some JCL that will make whatever update you want on the target dataset?

Possibly there is something i misunderstand.

Re: EDIT a dataset without opening it?

PostPosted: Wed Nov 16, 2011 12:18 am
by Burky319
Well, to be more specific, the dataset that is being created includes the ALU, AD, CO, and PE statements from the rebuild of an ID from Vangaurd. We are presently trying to duplicate current 4 character aliases and create an X0 ID (ABCD would be ABCDX0). ABCD would have TSO access and ABCDX0 would have no TSO and some other limitations. The difficult part is that we have over 100 systems where access could be present. We can push the command to all systems to create the dataset that includes those statements, but there's no easy way to do a CHANGE on it from ABCD to ABCDX0, then submit an EXEC command to all systems to create these new aliases. If anyone can think of an easier way to copy all of those commands on ALL systems and create a duplicate alias with a new name, I would be greatful!

Re: EDIT a dataset without opening it?

PostPosted: Wed Nov 16, 2011 12:27 am
by enrico-sorichetti
the requirement is clear as mud...
but if the concept is to edit something in order to change some strings without doing under interactive TSO
see my previous reply ...

meditate on the manuals and search the forums for the creation and use of EDIT macros and how to run them in ISPF in batch

Re: EDIT a dataset without opening it?

PostPosted: Wed Nov 16, 2011 3:11 am
by Burky319
found it!

PDSE '!!!!.BLDXID.OUTPUT' REPLACE /ID#1/ID#1X0/ WRITE

Push it out to any system and edit any dataset you want (that you have access to). It doesn't need to open it at all!

Re: EDIT a dataset without opening it?

PostPosted: Wed Nov 16, 2011 3:17 am
by mikereis
If your shop has JOB/SCAN or PRO/JCL (JSCAN or JEM edit macros) you can use those to do mass JCL changes. Other JCL scanning tools may also have that capability.....

Re: EDIT a dataset without opening it?

PostPosted: Wed Nov 16, 2011 3:23 am
by dick scherrer
Hello,

It doesn't need to open it at all!
Of course it does. . . It may not do what you want to consider an open, but the file IS opened in order to be read/changed.

PDSE '!!!!.BLDXID.OUTPUT' REPLACE /ID#1/ID#1X0/ WRITE
Suggest you learn what this actually does. Might it be some rexx code available on your system?

Re: EDIT a dataset without opening it?

PostPosted: Wed Nov 16, 2011 3:42 am
by Burky319
well yes, but not in the way that it interupts the processing. It will cut a 6 hours of work down to 5 minutes, where a macro would still have to step through each system and each command. That still wouldn't take terribly long, but this will be SO much faster.