AW: Re: JCLLIB in started proc?

2014-12-21 Thread Peter Hunkeler

> Thanks. Digressing ... any idea of the WHY for this restriction?

What restriction? The restriction that JCLLIB is only allowed in cased 1a) and 
2a)?


Only guessing here. I suspect that it would have made things too complex if 
JCLLIB was allowed anywhere in JCL. Imagine a procedure was resolved and within 
that part, a new JCLLIB was defined before another procedure had to resolved, 
etc., etc. Nesting is allowed for up to 15 levels.


So a design decision was taken to allow JCLLIB only between the JOB statement 
and the first EXEC statement in a job.


If not case 1a) or 2a), the JOB and EXEC statements are built by the START 
command processor.  There is no way to place a JCLLIB, unless the START command 
itself would support some keyword to specify a library that trigged building a 
JCLLIB statement between the JOBs and the EXEC statments. It does not, and 
honestly why should it? You can create jobs including JCLLIB easily.


If this is not an answer to your question, please be more specific.


--
Peter Hunkeler







--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


AW: Re: JCLLIB in started proc?

2014-12-20 Thread Peter Hunkeler
>> If that requires the resolution of JCL procedures or JCL INCLUDEs, the
>> only source for this is the "procedure library" of the subsystem.
 >
> So you are saying that JCLLIB is never accepted in a started PROC?


No, I didn't mean to imply that. I just leaft out JCLLIB inadvertently. This 
statement should read:


If that requires the resolution of JCL procedures or JCL INCLUDEs, the only 
source for this is the "procedure library" of the subsystem, and any JCLLIB 
library which may be present in the JCL *if* the JCL was the result of step 1a) 
or 2a).


I changed this also in the text below.


--
Peter Hunkeler





-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Peter Hunkeler
Sent: Saturday, December 20, 2014 12:51 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: AW: Re: JCLLIB in started proc?

 The START command processor needs to build and "initiate" some JCL to start
what was requested. The JCL will be sent to a subsystem that is able to
process that JCL. The Master Subsystem (MSTR) and the Job Entry Subsystems 2
(JES2) and 3 (JES3) are the ones I know.


The first operand of the START command is shown as "membername" in the
System Command reference. For brevity, I name it "MEMBER" hereafter.
In order to build the JCL, the START command processor performs the
following steps:


1) Search for MEMBER in the data sets allocated under IEFJOBS in the master
scheduler JCL. If found, this member *must* contain a job, i.e. it must
start with a JOB statement.


1a) If it does, this JCL is used in step 4) below. Continue with step 4).


1b) If it does not, an error is returned and processing ends.


2) Search for MEMBER in the data sets allocated under IEFPDSI in the master
scheduler JCL.


2a) If found and if the member contains a job, i.e. it starts with a JOB
statement, this JCL is used in step 4) below. Continue with step 4).


2b) If found but the member does *not* start with a JOB statement, it is
ignored. Continue with step 3).


3) Build a job to invoke MEMBER as JCL procedure, i.e. build a JOB statement
and an EXEC PROC=MEMBER statement. Continue with step 4).


4) Send the JCL found or built in steps 1) - 3) to the subsystem for
processing. The subsystem is the primary JES by default, or the one named on
SUB=, if specified. Exception: If MEMBER is the name of a subsystem
(IEFSSNxx), then the default subsystem is MSTR.


5) START command processing ends.


After this point, the *subsystem* has to process the JCL. If that requires
the resolution of JCL procedures or JCL INCLUDEs, the only source for this
is the "procedure library" of the subsystem, and any JCLLIB library which may 
be present in the JCL *if* the JCL was the result of step 1a) or 2a).



- If the subsystem is the Master Subsystem, then the only "procedure
library" is the set of data sets allocated under IEFPDSI in the master
scheduler JCL.


- If the subsystem is one of the JESs, then the only "procedure library" is
the set of data sets allocated under the PROCnn (nn is the set assigned to
STC jobclass in JES).




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


AW: Re: JCLLIB in started proc?

2014-12-20 Thread Peter Hunkeler
 The START command processor needs to build and "initiate" some JCL to start 
what was requested. The JCL will be sent to a subsystem that is able to process 
that JCL. The Master Subsystem (MSTR) and the Job Entry Subsystems 2 (JES2) and 
3 (JES3) are the ones I know.
The first operand of the START command is shown as "membername" in the System 
Command reference. For brevity, I name it "MEMBER" hereafter.
In order to build the JCL, the START command processor performs the following 
steps:
1) Search for MEMBER in the data sets allocated under IEFJOBS in the master 
scheduler JCL. If found, this member *must* contain a job, i.e. it must start 
with a JOB statement.
1a) If it does, this JCL is used in step 4) below. Continue with step 4).
1b) If it does not, an error is returned and processing ends.
2) Search for MEMBER in the data sets allocated under IEFPDSI in the master 
scheduler JCL.
2a) If found and if the member contains a job, i.e. it starts with a JOB 
statement, this JCL is used in step 4) below. Continue with step 4).
2b) If found but the member does *not* start with a JOB statement, it is 
ignored. Continue with step 3).
3) Build a job to invoke MEMBER as JCL procedure, i.e. build a JOB statement 
and an EXEC PROC=MEMBER statement. Continue with step 4).
4) Send the JCL found or built in steps 1) - 3) to the subsystem for 
processing. The subsystem is the primary JES by default, or the one named on 
SUB=, if specified. Exception: If MEMBER is the name of a subsystem (IEFSSNxx), 
then the default subsystem is MSTR.
5) START command processing ends.

After this point, the *subsystem* has to process the JCL. If that requires the 
resolution of JCL procedures or JCL INCLUDEs, the only source for this is the 
"procedure library" of the subsystem.
- If the subsystem is the Master Subsystem, then the only "procedure library" 
is the set of data sets allocated under IEFPDSI in the master scheduler JCL.
- If the subsystem is one of the JESs, then the only "procedure library" is the 
set of data sets allocated under the PROCnn (nn is the set assigned to STC 
jobclass in JES).

HTH
--Peter Hunkeler

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN