Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Determine what library member is in, and pass it as variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mdwait

New User


Joined: 23 Jul 2020
Posts: 1
Location: United States

PostPosted: Thu Jul 23, 2020 3:02 am    Post subject: Determine what library member is in, and pass it as variable
Reply with quote

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
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2378
Location: Hampshire, UK

PostPosted: Thu Jul 23, 2020 1:14 pm    Post subject: Reply to: Determine what library member is in, and pass it as variable
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1210
Location: Vilnius, Lithuania

PostPosted: Thu Jul 23, 2020 9:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8553
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 23, 2020 9:24 pm    Post subject: Reply to: Determine what library member is in, and pass it as variable
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2443
Location: NY,USA

PostPosted: Thu Jul 23, 2020 11:01 pm    Post subject:
Reply with quote

Write a Rexx or Google it . That will give you the PDS and pass that as input to your program.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2378
Location: Hampshire, UK

PostPosted: Fri Jul 24, 2020 2:21 pm    Post subject: Reply to: Determine what library member is in, and pass it as variable
Reply with quote

I'm not sure how you Google and get the results in a running batch program.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2443
Location: NY,USA

PostPosted: Fri Jul 24, 2020 10:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2475
Location: Netherlands, Amstelveen

PostPosted: Sat Jul 25, 2020 2:22 pm    Post subject:
Reply with quote

As far as i remember one could find the jcllibrary from which jcl was extracted in the job log.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 847
Location: The Universe

PostPosted: Sat Jul 25, 2020 5:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2475
Location: Netherlands, Amstelveen

PostPosted: Sun Jul 26, 2020 2:58 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Submit Print Job For PDS Member With ... AllenSieracki TSO/ISPF 17 Fri Apr 10, 2020 9:31 pm
No new posts IEBGENER is not Creating Member in PD... sandeep prajapati JCL & VSAM 7 Mon Mar 23, 2020 11:50 pm
No new posts Dynamically adding CLIST Library to e... upendrasri TSO/ISPF 12 Sat Mar 14, 2020 4:33 pm
No new posts IEBCOPY - Not replace a existing PDS ... Aks1988 JCL & VSAM 15 Mon Mar 09, 2020 7:06 pm
No new posts COBOL - Array result in single variab... vinu78 COBOL Programming 3 Thu Feb 20, 2020 5:29 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us