substitute into JCL varying by job



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: substitute into JCL varying by job

Postby KGherlone » Thu Sep 01, 2016 1:25 am

LOL, I bet those synapses would be happy for the excitement...
No PL/1 or C/370. For mainframe production jobs just really COBOL and Sort for data manipulation... (I know I know...it isn't my choice...)
KGherlone
 
Posts: 9
Joined: Wed Aug 31, 2016 10:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: substitute into JCL varying by job

Postby Akatsukami » Thu Sep 01, 2016 1:39 am

::sigh:: I was afraid of that. Well, I'll see what I can do.

The data set of cancelled IDs: what is its format?
  • Does it have headers or trailers?
  • Is there one record type or many?
  • Where in the record is the HLQ?
  • Is the field or varying length?
  • If varying-length, how is it delimited, or how is the length specified?
"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
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: substitute into JCL varying by job

Postby KGherlone » Thu Sep 01, 2016 2:02 am

There will only be one record in the file and it will be a fixed-length 9 character alphanumeric value (this is the user's novel id). This value is to be read into a COBOL program where a VSAM file will be read with this 9 character value to ascertain the user's MVS id, which is the 6 character alphanumeric value that is used as the HLQ for the files that are to be deleted, so the RACF entry can be deleted. This 6 character value, therefore, is the one that I desire to have in a variable that can be substituted in the jcl.
KGherlone
 
Posts: 9
Joined: Wed Aug 31, 2016 10:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: substitute into JCL varying by job

Postby enrico-sorichetti » Thu Sep 01, 2016 1:08 pm

This value is to be read into a COBOL program ...


NO NEED FOR PARAMETER SUBSTITUTION,
just create the SYSTSIN dataset wit the proper data

1) modify the aforesaid cobol program to write to a dataset a record with the HRECALL command
use the dataset as input to the TSO step to issue the HRECALL command created

2) use a <sort> step to BUILD the hrecall statement ...
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: substitute into JCL varying by job

Postby KGherlone » Thu Sep 01, 2016 8:13 pm

After pondering this for a bit, it seems like the best way to go would be a COBOL program to get the record with the UserID to delete, get the HLQ value associated with that ID and then create the JCL to create a job calling a PROC and populating the substation variable for the HLQ in that PRO and sending it to the Internal Reader.
Does anyone see any flaws in that approach?
Kevin
KGherlone
 
Posts: 9
Joined: Wed Aug 31, 2016 10:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: substitute into JCL varying by job

Postby prino » Thu Sep 01, 2016 8:28 pm

KGherlone wrote:The shop standard here is to not use REXX for production jobs (don't ask...)

If REXX is the best tool to do something that's not done before, change the shop standards!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: substitute into JCL varying by job

Postby enrico-sorichetti » Thu Sep 01, 2016 8:48 pm

Does anyone see any flaws in that approach?


see my previous post ...
No need to create the JCL, it is enough to create the SYTSTSIN data
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: substitute into JCL varying by job

Postby KGherlone » Thu Sep 01, 2016 9:20 pm

I agree for the SYSTSIN parms, but unfortunately there are other nodes in the jcl that must be variable based on the HLQ. For example, in the copy step the dsn for the file being copied into will have a node using the HLQ. So I think the COBOL approach is the only way to go..

Kevin
KGherlone
 
Posts: 9
Joined: Wed Aug 31, 2016 10:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: substitute into JCL varying by job

Postby enrico-sorichetti » Thu Sep 01, 2016 9:28 pm

but unfortunately there are other nodes in the jcl that must be variable based on the HLQ.

if You had explained the full requirement from the beginning of the topic
I would not have wasted my time explaining a partial approach :twisted:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: substitute into JCL varying by job

Postby steve-myers » Fri Sep 02, 2016 1:58 am

KGherlone wrote:...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. ...

Actually, the issue is not the data sets; it's the RACF profiles - though you should delete the data sets anyway.

You cannot delete "files" in z/OS. The only "file" in z/OS is the data on magnetic tape between the beginning of the tape and a "tape mark," or between two "tape marks."
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post