Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Starting a TASK from REXX vs Submitting a JOB

487 views
Skip to first unread message

Jeff Beech-Garwood

unread,
May 19, 2014, 12:50:11 PM5/19/14
to
I'm using REXX to edit some JCL inside a Stem and then EXECIO the Stem to
the Internal Reader.

It works fine, but it's treating the JCL as a JOB (using Submit) rather
than a Started Task (using START).

How can I issue a START against the JCL in my Stem, vs a Submit?

(I have tried ISFEXEC but the JCL it submits is what it finds in the
normal PROCLIB, not the JCL in my Stem)

Thanks kindly,

Jeff Beech-Garwood
Systems Programmer
Mainframe Network Support
US Bank, EP-MN-02NS
651-962-3809
U.S. BANCORP made the following annotations
---------------------------------------------------------------------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation.



---------------------------------------------------------------------


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Itschak Mugzach

unread,
May 19, 2014, 1:00:04 PM5/19/14
to
Strart requires the "JCL" to be stored in a proclib dataset member. You can
use an stub procedure that will run a rexx exec to allocate the datasets
and invoke your program. Just pass the name of the exec as a parameter.

ITschak

Don Imbriale

unread,
May 19, 2014, 1:01:15 PM5/19/14
to
JCL for a started task or started job must reside either in a proclib or in
a PDS defined to master JCL. You would somehow need to get the JCL you are
generating into one of those places.

I haven't looked into it, but maybe you could create a skeleton in one of
those places with an INCLUDE that somehow can reference your JCL.

Robert Zenuk

unread,
May 19, 2014, 1:43:55 PM5/19/14
to
Started tasks (STC's) are run from the IEFPDSI DD in the MSTJCLxx and/or the PROC00 concatenation in the JES2 PROC (JCL or PROCLIB statements) using the MVS START command for the STC member name. If the STC PROC you intend to run is not in this concatenation it will not be a started task. You can not submit JCL from the Internal Reader to START a STC unless the JCL is copying/overlaying the desired member then issuing a START command for the desired member (which would be jumping through flaming hoops aka Rube Goldberg approach and probably a security violation).

STC's receive some special treatment in the system. Therefore the datasets eligible to run STC's from usually have a little higher security access (UACC READ ONLY). STC's usually do not change frequently. So, a dynamically changing PROC as a result of every time a person runs a REXX EXEC seems odd.

What is it you are actually trying to accomplish?

Rob



-----Original Message-----
From: Jeff Beech-Garwood <jeff.bee...@USBANK.COM>
To: TSO-REXX <TSO-...@VM.MARIST.EDU>
Sent: Mon, May 19, 2014 9:50 am
Subject: Starting a TASK from REXX vs Submitting a JOB


I'm using REXX to edit some JCL inside a Stem and then EXECIO the Stem to
he Internal Reader.
It works fine, but it's treating the JCL as a JOB (using Submit) rather
han a Started Task (using START).
How can I issue a START against the JCL in my Stem, vs a Submit?
(I have tried ISFEXEC but the JCL it submits is what it finds in the
ormal PROCLIB, not the JCL in my Stem)
Thanks kindly,
Jeff Beech-Garwood
ystems Programmer
ainframe Network Support
S Bank, EP-MN-02NS
51-962-3809
.S. BANCORP made the following annotations
--------------------------------------------------------------------
lectronic Privacy Notice. This e-mail, and any attachments, contains
nformation that is, or may be, covered by electronic communications privacy
aws, and is also confidential and proprietary in nature. If you are not the
ntended recipient, please be advised that you are legally prohibited from
etaining, using, copying, distributing, or otherwise disclosing this
nformation in any manner. Instead, please reply to the sender that you have
eceived this communication in error, and then immediately delete it. Thank you
n advance for your cooperation.

---------------------------------------------------------------------

---------------------------------------------------------------------
or TSO-REXX subscribe / signoff / archive access instructions,

Jeff Beech-Garwood

unread,
May 19, 2014, 2:34:33 PM5/19/14
to
Don, Rob & Itschak,

Thankyou kindly for your responses.

Rob asked what I was trying to do. Initially I was trying to eliminate JCL
entirely and use just REXX (excellent document by Hobart Spitz entitled
'Converting MVS/JCL to REXX/TSO') but I hit the constraint that I couldn't
allocate a STEPLIB.

So, I then thought I'd use REXX to build some JCL and submit it to the
internal reader. Used BPXWDYN and EXECIO (Thanks John McKown) and it
worked - but I could only submit as a job not start as a started task.

Why was I trying to do this? Well we have an MVS System Symbol that I
wanted to use as part of a member name. Unfortunately the value of that
symbol begins with a full-stop (period) thus I couldn't use it as a member
name (It's normally used as the suffix to a dataset). So, I thought of my
favourite language and this is where I ended up.

I'm going to stop now as the constraints mentioned by Don, Rob & Itschak
are more of a road-block than I want to have to fight with. Oh, and we
have RACF set to prevent batch jobs or started tasks from issuing a START
command.

Thankyou again gentlemen.

Jeff Beech-Garwood
Systems Programmer
Mainframe Network Support
US Bank, EP-MN-02NS
651-962-3809



U.S. BANCORP made the following annotations
---------------------------------------------------------------------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation.



---------------------------------------------------------------------

Stevet

unread,
May 19, 2014, 2:45:30 PM5/19/14
to
So couldn't you have a started task that you pass a member name to where it would then point IKJEFT01 to it for SYSIN?

Sent from iPhone - small keyboard fat fingers - expect spellinf errots.

Nims,Alva John , Al

unread,
May 19, 2014, 3:32:01 PM5/19/14
to
I do not know if you have a restriction/aversion to doing so, but on the CBTTAPE (www.cbttape.org) FILE 452 is a "STEPLIB" program that will allow you to dynamically add/change the STEPLIB being used.

Al Nims
Systems Admin/Programmer 3
Information Technology
University of Florida
(352) 273-1298

John McKown

unread,
May 19, 2014, 4:05:23 PM5/19/14
to
Why don't you access the System Symbol in your REXX code using the MVSVAR
function. You can then strip the leading period (full stop) and use that as
the member name in the JCL. Or you can even "override" the system symbol in
the JCL, by including a // SET SYSVAR=value in your submitted JCL. Eg.

MEMBER=SUBSTR(MVSVAR("SYMDEF",'SYSVAR'),2) /* GET VALUE OF SYSVAR SYSTEM
SYMBOL AND REMOVE LEADING .
JCL.1="//MYJOB JOB OTHER,STUFF,CLASS=A,MSGCLASS=H"
JCL.2="// SET SYSVAR="MEMBER
JCL.3="//PROC EXEC PROC=SYSPROC"
JCL.4="//"
JCL.0=4
"EXECIO "JCL.0" DISKW INTRDR (STEM JCL. FINIS"

In the above, I _assume_ that SYSVAR is the name of your system symbol. I
get its value with the MVSVAR's SYMDEF function. I strip of the leading
full stop. I then create a JCL symbol with the same name as the system
symbol using the SET, but give it the proper value.
--
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! <><
John McKown

Jeff Beech-Garwood

unread,
May 19, 2014, 4:19:42 PM5/19/14
to
Hi John,

That's pretty much exactly what I was doing. I hit the problem that the
JCL I built in the Stem could be submitted as a Job but not started as a
Started Task.

Thanks.

Jeff Beech-Garwood
Systems Programmer
Mainframe Network Support
US Bank, EP-MN-02NS
651-962-3809



Lizette Koehler

unread,
May 19, 2014, 7:48:07 PM5/19/14
to
So, if I understand, you want to Submit a JOB or START an STC depending on
what your REXX is doing. Is that correct?

If so, you would need to place the JCL you are generating into a PROCLIB
dataset that is accessible by z/OS.

See if after the JCL is created you can "save" it to a PROCLIB, then use the
CONSPROF (or SDSF ISFSLASH) to issue the S stcname.

Started tasks only happen with a START command to the MVS OS.

I would also ask, what is the difference if you run a JOB or STC? What
benefit will you get from doing an STC?


Lizette


> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On
> Behalf Of Jeff Beech-Garwood

Don Imbriale

unread,
May 19, 2014, 7:57:09 PM5/19/14
to
Is it essential that it be a started task or is it just to access a system
symbol?


On Mon, May 19, 2014 at 4:19 PM, Jeff Beech-Garwood <

Robert Zenuk

unread,
May 19, 2014, 9:38:02 PM5/19/14
to
I'm still completely at a loss as to why a JCL-less STC makes sense (a contradiction in terms to begin with). Which System Symbol are you using? I have seen &SYSNAME and &SYSCLONE used that way (to suffix a common prefix). Beginning with a period it must be a locally defined symbol in IEASYMxx. Based on stuff I have seen in IEASYMxx in the past I am going to guess this an octet of an IP address. If not, what are you trying to do that this makes sense?

One approach for uniquely named STC's is to use a common PROC, then use the JOBNAME parm of the START command to "rename" the task.

S member,JOBNAME=name

This would start MEMBER from a valid PROCLIB and name it NAME when it runs. Since System Symbols can be used in commands, you could do something like this to get them all started

ROUTE *ALL,START member,JOBNAME=XXX&yoursym

To deal with the leading "." you could use the Substring syntax of &symbols (2:3 starts in position 2 for 3 bytes)

ROUTE *ALL,START member,JOBNAME=XXX&yoursym(2:3)

That all being said, it kind of sounds like you are trying to get around working with the people that control the PROCLIBS and can issue START commands.

Rob


-----Original Message-----
From: Jeff Beech-Garwood <jeff.bee...@USBANK.COM>
To: TSO-REXX <TSO-...@VM.MARIST.EDU>
Sent: Mon, May 19, 2014 1:19 pm
Subject: Re: Starting a TASK from REXX vs Submitting a JOB


Hi John,
That's pretty much exactly what I was doing. I hit the problem that the
CL I built in the Stem could be submitted as a Job but not started as a
tarted Task.
Thanks.
Jeff Beech-Garwood
ystems Programmer
ainframe Network Support
S Bank, EP-MN-02NS
51-962-3809

From: John McKown <john.arch...@GMAIL.COM>
o: TSO-...@VM.MARIST.EDU,
ate: 05/19/2014 03:06 PM
ubject: Re: [TSO-REXX] Starting a TASK from REXX vs Submitting a
OB
ent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>

Why don't you access the System Symbol in your REXX code using the MVSVAR
unction. You can then strip the leading period (full stop) and use that
s
he member name in the JCL. Or you can even "override" the system symbol
n
he JCL, by including a // SET SYSVAR=value in your submitted JCL. Eg.
MEMBER=SUBSTR(MVSVAR("SYMDEF",'SYSVAR'),2) /* GET VALUE OF SYSVAR SYSTEM
YMBOL AND REMOVE LEADING .
CL.1="//MYJOB JOB OTHER,STUFF,CLASS=A,MSGCLASS=H"
CL.2="// SET SYSVAR="MEMBER
CL.3="//PROC EXEC PROC=SYSPROC"
CL.4="//"
CL.0=4
EXECIO "JCL.0" DISKW INTRDR (STEM JCL. FINIS"
In the above, I _assume_ that SYSVAR is the name of your system symbol. I
et its value with the MVSVAR's SYMDEF function. I strip of the leading
ull stop. I then create a JCL symbol with the same name as the system
ymbol using the SET, but give it the proper value.

On Mon, May 19, 2014 at 1:34 PM, Jeff Beech-Garwood <
eff.beec...@usbank.com> wrote:
> Don, Rob & Itschak,

Thankyou kindly for your responses.

Rob asked what I was trying to do. Initially I was trying to eliminate
CL
entirely and use just REXX (excellent document by Hobart Spitz entitled
'Converting MVS/JCL to REXX/TSO') but I hit the constraint that I
ouldn't
allocate a STEPLIB.

So, I then thought I'd use REXX to build some JCL and submit it to the
internal reader. Used BPXWDYN and EXECIO (Thanks John McKown) and it
worked - but I could only submit as a job not start as a started task.

Why was I trying to do this? Well we have an MVS System Symbol that I
wanted to use as part of a member name. Unfortunately the value of that
symbol begins with a full-stop (period) thus I couldn't use it as a
ember
name (It's normally used as the suffix to a dataset). So, I thought of
y
favourite language and this is where I ended up.

I'm going to stop now as the constraints mentioned by Don, Rob & Itschak
are more of a road-block than I want to have to fight with. Oh, and we
have RACF set to prevent batch jobs or started tasks from issuing a
TART
command.

Thankyou again gentlemen.

Jeff Beech-Garwood
Systems Programmer
Mainframe Network Support
US Bank, EP-MN-02NS
651-962-3809



From: Robert Zenuk <robz...@AOL.COM>
To: TSO-...@VM.MARIST.EDU,
Date: 05/19/2014 12:44 PM
Subject: Re: [TSO-REXX] Starting a TASK from REXX vs Submitting a
JOB
Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>



Started tasks (STC's) are run from the IEFPDSI DD in the MSTJCLxx and/or
the PROC00 concatenation in the JES2 PROC (JCL or PROCLIB statements)
using the MVS START command for the STC member name. If the STC PROC
ou
intend to run is not in this concatenation it will not be a started
ask.
You can not submit JCL from the Internal Reader to START a STC unless
he
JCL is copying/overlaying the desired member then issuing a START
ommand
for the desired member (which would be jumping through flaming hoops aka
Rube Goldberg approach and probably a security violation).

STC's receive some special treatment in the system. Therefore the
datasets eligible to run STC's from usually have a little higher
ecurity
access (UACC READ ONLY). STC's usually do not change frequently. So, a
dynamically changing PROC as a result of every time a person runs a REXX
EXEC seems odd.

What is it you are actually trying to accomplish?

Rob



-----Original Message-----
From: Jeff Beech-Garwood <jeff.bee...@USBANK.COM>
To: TSO-REXX <TSO-...@VM.MARIST.EDU>
Sent: Mon, May 19, 2014 9:50 am
Subject: Starting a TASK from REXX vs Submitting a JOB


I'm using REXX to edit some JCL inside a Stem and then EXECIO the Stem
o
he Internal Reader.
It works fine, but it's treating the JCL as a JOB (using Submit) rather
han a Started Task (using START).
How can I issue a START against the JCL in my Stem, vs a Submit?
(I have tried ISFEXEC but the JCL it submits is what it finds in the
ormal PROCLIB, not the JCL in my Stem)
Thanks kindly,
Jeff Beech-Garwood
ystems Programmer
ainframe Network Support
S Bank, EP-MN-02NS
51-962-3809
.S. BANCORP made the following annotations
--------------------------------------------------------------------
lectronic Privacy Notice. This e-mail, and any attachments, contains
nformation that is, or may be, covered by electronic communications
privacy
aws, and is also confidential and proprietary in nature. If you are not
the
ntended recipient, please be advised that you are legally prohibited
rom
etaining, using, copying, distributing, or otherwise disclosing this
nformation in any manner. Instead, please reply to the sender that you
have
eceived this communication in error, and then immediately delete it.
here is nothing more pleasant than traveling and meeting new people!
enghis Khan
Maranatha! <><
ohn McKown
----------------------------------------------------------------------

Jeff Beech-Garwood

unread,
May 20, 2014, 9:54:16 AM5/20/14
to
To everyone who has provided input to this I heartily THANKYOU.

Al Nims, of UFL has come up with the best solution for me. Apparently you
can substring the MVS System symbols within JCL (as well as in the
IEASYMxx member)

So for example if my symbol is &MYSYM = .ABC and I want to use just the
ABC not the period then I would write &MYSYM(2:3). (with a period on the
end)

It works. I didn't need to break out REXX to do what I needed to do.

Thankyou again.
0 new messages