Hello all,
We have a requirement to automatedly remove terminated users from RACF. This cannot be done if there are any files allocated to that user, whos ID is the High Level qualifier for the files. I have some JCL that would 1)recall any migrated files for the HLQ 2) copy the files for that HLQ for archive purposes then 3) delete all the file with the HLQ. A file is populated with the value of the HLQ to delete, but my issue is getting the value from that file to the JCL needed on a variable basis. For Example here is the recall step:
//*********************************************************************
//* -STEP- -PROGRAM- -DESCRIPTION-
//* STEP0010 IKJEFT01 RECALL FILES BY HL QUALIFIER
//*********************************************************************
//*
//STEP0010 EXEC PGM=IKJEFT01
//SYSTSIN DD *
HRECALL P13KGH.**' WAIT
/*
//SYSTSPRT DD DISP=(,CATLG,DELETE),DSN=PSTSM.RCALLRPT.P13KGH,
// DCB=(RECFM=FB,LRECL=132),
// SPACE=(CYL,(10,1),RLSE)
Where P13KGH is the value to be provided for each run.
How can I get this HLQ variable into the JCL on a run by run basis.
Thanks,
Kevin
//SYSOUT DD SYSOUT=*
substitute into JCL varying by job
- Akatsukami
- Global moderator
- Posts: 1058
- Joined: Sat Oct 16, 2010 2:31 am
- Skillset: Rexx, JCL, DB2/SQL, TSO/ISPF, PL/I
- Referer: ibmmainframes
- Location: Bloomington, IL
- Contact:
Re: substitute into JCL varying by job
Would making the steps into a proc, substituting the HLQ with a variable, and updating a SET statement manually fulfill your requirement?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
-
- Posts: 9
- Joined: Wed Aug 31, 2016 10:27 pm
- Skillset: IBM utilities, COBOL, BAL, RPGs SQL, FileAid
- Referer: found through Google search
Re: substitute into JCL varying by job
Using a PROC and manually substituting a variable would not handle the requirement, which is a hands-off removal of any trace of a User when they are terminated. When a User is dropped from the Novel Active Directory a file will be created with the terminated User ID. This file will be interrogated and the hope is to then programmatically populate a variable with that value. The jcl then would use this value as a substitution variable in the recall, copy and delete steps.
Kevin
Kevin
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: substitute into JCL varying by job
Write a program in the language of your choice to read the user id from the data set (the only files in z/OS are on tape or in Unix System Services), generate the JCL you need, then submit that job via the internal reader.my issue is getting the value from that file to the JCL needed on a variable basis
-
- Posts: 9
- Joined: Wed Aug 31, 2016 10:27 pm
- Skillset: IBM utilities, COBOL, BAL, RPGs SQL, FileAid
- Referer: found through Google search
Re: substitute into JCL varying by job
Generating the JCL programmatically and submitting via the internal reader was one approach considered. The preference, of course, is to just have a PROC that has a variable that could be populated by a program and picked up in the JCL as a substitution. If there is not a way to do this, then the internal reader approach, unfortunately, will have to be used.
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: substitute into JCL varying by job
What release of z/OS are you running? With recent releases (2.1 and 2.2), you have the option to use SET (i.e., JCL symbolic) variables with in-stream data. If you're not running a version of z/OS that supports in-stream variable substitution, then you have to create a job to be submitted to the internal reader as otherwise your HRECALL won't work.
-
- Posts: 9
- Joined: Wed Aug 31, 2016 10:27 pm
- Skillset: IBM utilities, COBOL, BAL, RPGs SQL, FileAid
- Referer: found through Google search
Re: substitute into JCL varying by job
We are running z/OS 2.1. I don't see how using a SET statement would do the trick in this case, though. The value for the variable would, ideally, be set in a program and then that variable used as a substitution in the PROC.
- Akatsukami
- Global moderator
- Posts: 1058
- Joined: Sat Oct 16, 2010 2:31 am
- Skillset: Rexx, JCL, DB2/SQL, TSO/ISPF, PL/I
- Referer: ibmmainframes
- Location: Bloomington, IL
- Contact:
Re: substitute into JCL varying by job
In that case, can you submit a job that runs a Rexx exec that reads the data set and tailors a JCL skeleton? (You could also write a program in another language, although that would be a little more effort.)
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
-
- Posts: 9
- Joined: Wed Aug 31, 2016 10:27 pm
- Skillset: IBM utilities, COBOL, BAL, RPGs SQL, FileAid
- Referer: found through Google search
Re: substitute into JCL varying by job
The shop standard here is to not use REXX for production jobs (don't ask...), so the preference is to read the file with the terminated user id into COBOL program, set a variable there (similar to what a ISPF panel would do) then use the variable in the JCL.
It sounds so easy, yet is proving to be so painful...
It sounds so easy, yet is proving to be so painful...
- Akatsukami
- Global moderator
- Posts: 1058
- Joined: Sat Oct 16, 2010 2:31 am
- Skillset: Rexx, JCL, DB2/SQL, TSO/ISPF, PL/I
- Referer: ibmmainframes
- Location: Bloomington, IL
- Contact:
Re: substitute into JCL varying by job
I haven't written COBOL in this century(although I suppose the practice would be good for me). Does your shop use PL/I or C/370?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
-
- Similar Topics
- Replies
- Views
- Last post
-
-
sort card to add zeros to varying alphanumeric field.
by longfall » Thu Mar 09, 2023 12:03 am » in DFSORT/ICETOOL/ICEGENER - 1
- 1841
-
by sergeyken
View the latest post
Thu Mar 09, 2023 2:04 am
-