Addin USER= xxx to all JCL in a PDS at onc

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
TomA
Member
Posts: 1
Joined: Thu Dec 27, 2012 9:36 pm

Addin USER= xxx to all JCL in a PDS at onc

Post by TomA » Thu Dec 27, 2012 9:48 pm

Hi,

I am trying to find a way to quickly add a USER= statement to all exisiting JCL in a PDS without having to manually touch/change each one.

Basically, I have a PDS with approximately 1800 jobs/JCL. The JCL uses a naming standard in which the three first characters identify a "system"

for example:

DISxxxx
DISyxyx
DISyyyy

GCLxxxx
GCLyxyx
GCLyyyy

and so on, so for each three character qualifier, I need to insert/add USER=DISxxxx or GCLxxxx and so on. Meaning that every DIS qualifier would have the same USER. That being said, for each of the three character qualifiers, there can be hundreds of jobs/JCL. I would like to insert/add the USER in mass if possible and save myself the time of doing 1800 jobs individually.

Does anyone have any ideas or suggestions please?

P.S. I realize that these should have been added when the jobs were written, but as most of them are older than I am and the company I work for is just now realizing the audit issues with this, it is something beyond my control :)

Thanks!!
TomA

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Dec 28, 2012 1:52 am

Do the existing jobs already have some USER= specified?

Do the existing job statements all follow the same format? Inserting a new line between the JOB statement and the "next" line may be the way to go.

Do you (or a co-worker) know REXX - which may be how you want to address this?
Have a good one

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Fri Dec 28, 2012 5:26 am

The usual methods:

1. Use IPOUPDTE to change a specific field in all the members.

2. Copy the PDS to a sequential dataset using IEBPTPCH. Reformat and make the changes using SORT and create an IEBUPDTE-ready output stream. Use IEBUPDTE to build a new PDS.

3. Write your own utility using ISPF Library Management (LM) Services.

4. Use a third-party product designed for such a task.

chaat
Member
Posts: 20
Joined: Sun Apr 18, 2010 11:51 pm
Location: St. Cloud, Minnesota, USA

Post by chaat » Sun Dec 30, 2012 8:49 am

Tom,

if you have File-Aid available, there is a way to have it process in JCL format. Check the manual on how to do that. There may be an easy way to do this with File-Aid.

ps... don't try to update the existing pds, rather copy it to a new pds and make the changes as you're doing the copy member function, i've done something like this before.

Chuck H.
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others