View previous topic :: View next topic
|
Author |
Message |
mdwait
New User
Joined: 23 Jul 2020 Posts: 1 Location: United States
|
|
|
|
We have to use unique PDS(s) to execute JCL.
What I want to do is:
Determine what "PDS" that the JCL is being executed from and then
pass that to a program.
I know how to pass a parameter to the program; just don't know how to determine what unique PDS the JCL is being executed from |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
If the program that the parameter is being passed to is in the same jobstream then you cannot do it as the jobstream is fixed once it is submitted. However, if you can determine the source PDS of your JCL then that could be written to a dataset which could be read by that program. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1316 Location: Vilnius, Lithuania
|
|
|
|
Another insane "requirement" by a PHB?
There is no way for a job to find out from which PDS it has been submitted, unless the job starts with a program that reads SMF records. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
There is a relationship between the load library the program executes from that can (usually) be identified, but as far as the JCL source -- there is nothing I know of in the system that will tie JCL source to an executing program. The same JCL can be executed from multiple PDS and there's nothing to indicate which was used. And when debugging started task issues, system programmers will slap a job card on the PROC, save it in their PDS and submit it as a normal job to get additional information; this tells you that there is no way to tie a JCL stream to a particular PDS. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3077 Location: NYC,USA
|
|
|
|
Write a Rexx or Google it . That will give you the PDS and pass that as input to your program. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
I'm not sure how you Google and get the results in a running batch program. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3077 Location: NYC,USA
|
|
|
|
Obliviously, if Rexx is unknown then Search on Google "How to do thru Rexx to get the PDS your are in?" is what I meant to make it more clear. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
As far as i remember one could find the jcllibrary from which jcl was extracted in the job log. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
PeterHolland wrote: |
As far as i remember one could find the jcllibrary from which jcl was extracted in the job log. |
That's the library from which a cataloged procedure is obtained. I think the topic starter wants information about where the job came from. In other words, if a job is submitted using JCL like this -
Code: |
// EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD ...,DSN=library(member)
//SYSUT2 DD SYSOUT=(A,INTRDR) |
the topic starter wants library and member. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
That's the library from which a cataloged procedure is obtained |
True, where I worked all production JCL was submitted from cataloged procedure libraries. All JCL submission from "own" libraries was not allowed, except on test systems. |
|
Back to top |
|
|
|