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

Running instream rexx in JCL

2,839 views
Skip to first unread message

Dennis Wilson

unread,
Jan 12, 1999, 3:00:00 AM1/12/99
to
I remember doing this, but it has been a few years and I lost my accumulated
papers.

The question is this:
//JOB........
//step0 exec pgm=ikjeft01
//systsprt dd sysout=*
//systsin dd *
/* rexx */
say "hello"

I think this was it but obviously my memory is faulty.

Any help would be appreciated.

Thanks

mixx...@eye_eye_echs.com

unread,
Jan 13, 1999, 3:00:00 AM1/13/99
to
On Wed, 13 Jan 1999 01:49:33, "Dennis Wilson" <linc...@teleport.com>
wrote:

> The question is this:
> //JOB........
> //step0 exec pgm=ikjeft01
> //systsprt dd sysout=*
>//systsin dd *
> /* rexx */
> say "hello"


Yep, that will do. You can also EXEC PGM=IRXJCL

Juergen Kehr

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
Hello,
I think you both are not completly right, like I remember it's possible
to code only
TSO commands for ddname SYSTSIN like EXEC,CALL etc. and no REXX
statements
like in your sample. Has there been a change I don't recognize ?

mixxerdw@eye_eye_echs.com schrieb:

___________________________________________________________

Freundliche Gruesse / Kind regards

Dipl.-Math. Juergen Kehr
IT Consultant

Tel. +49-511-463050
Fax +49-511-463055
Mobil +49-172-5129389

e-Mail KehrJ...@t-online.de
KehrJ...@netscape.net
KehrJ...@csi.com

Fax -> e-Mail +49-40-3603022846
___________________________________________________________

Room5_01

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
Dennis Wilson wrote:
>
> I remember doing this, but it has been a few years and I lost my accumulated
> papers.
>
> The question is this:
> //JOB........
> //step0 exec pgm=ikjeft01
> //systsprt dd sysout=*
> //systsin dd *
> /* rexx */
> say "hello"
>
> I think this was it but obviously my memory is faulty.
>
> Any help would be appreciated.
>
> Thanks

//TSO EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4M
//SYSPROC DD DSN=userid.REXX.EXEC,DISP=SHR
// DD DSN=userid.REXXDEMO.EXEC,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
CALC 12 * 4

will run userid.REXX.EXEC(CALC), as will

//TSO EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4M
//SYSEXEC DD DSN=userid.REXX.EXEC,DISP=SHR
// DD DSN=userid.REXXDEMO.EXEC,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
EXECUTIL SEARCHDD(YES)
CALC 12 * 4

or, even,

//S1 EXEC PGM=IRXJCL,PARM='CALC 12*4'
//SYSEXEC DD DSN=userid.REXX.EXEC,DISP=SHR
// DD DSN=userid.REXXDEMO.EXEC,DISP=SHR
//SYSTSPRT DD SYSOUT=*

using IRXJCL instead.

HTH

Peter

--
Peter Tillier <pet...@eq1152.demon.co.uk>

Opinions expressed are not necessarily those of my employer.

Gilbert Saint-flour

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
In <1tGZ16mMk7i4-p...@dsm4merlin.iix.com>, on 13 Jan 1999 at
15:52, mixxerdw@eye_eye_echs.com said:

>On Wed, 13 Jan 1999 01:49:33, "Dennis Wilson" <linc...@teleport.com>
>wrote:

>> //JOB........


>> //step0 exec pgm=ikjeft01
>> //systsprt dd sysout=*
>>//systsin dd *
>> /* rexx */
>> say "hello"

>Yep, that will do. You can also EXEC PGM=IRXJCL

I'm afraid neither will do. You can NOT run an in-stream REXX exec with
either IKJEFT01 or IRXJCL, which have the same restriction: they can only
execute a REXX exec that is stored on disk, either in a sequential data
set or in a PDS member.

One popular solution to this problem is to execute a utility (IEBGENER,
IEBUPDTE) to load the exec into a temporary PDS and specify the temp pds
in the SYSEXEC, for example:

//GO EXEC PGM=IKJEFT01
//SYSUT2 DD UNIT=VIO,SPACE=(TRK,(1,,1)),RECFM=FB,LRECL=80,BLKSIZE=800
//SYSEXEC DD DSN=*.SYSUT2,DISP=(OLD,PASS),VOL=REF=*.SYSUT2


//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *

CALL 'SYS1.LINKLIB(IEBUPDTE)' 'NEW'
%MYEXEC
//SYSIN DD *
./ ADD NAME=MYEXEC
/* REXX */ SAY 'hello world'

To simplify the process, I wrote an exec called EXECUTE that reads REXX
(or CLIST) statements from SYSTSIN, writes them to a temp data set, then
stacks an EXEC command to execute it. This is how the JCL looks:

//EXEC EXEC PGM=IKJEFT01,PARM='%EXECUTE EXEC'
//SYSEXEC DD DSN=<your EXEC library>,DISP=SHR


//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *

SAY "In-line EXEC executed by" USERID()

The EXECUTE exec can be found on my Web page at
http://members.home.net/gsf/

Gilbert Saint-flour <g...@ibm.net>

Jeff

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
>//JOB........
>//step0 exec pgm=ikjeft01
>//systsprt dd sysout=*
>//systsin dd *
> /* rexx */
> say "hello"
>
Never done it that way, but here is how I usually do it:

//xxxxxxxx job ......
//REXXLIB EXEC PGM=IEFBR14
//REXXLIB DD DSN=&&REXXLIB,DISP=(NEW,PASS,KEEP),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=0),
// SPACE=(80,(100,50,1),RLSE)
//*******************************************
//REXXCOPY EXEC PGM=IEBGENER
//SYSUT2 DD DSN=&&REXXLIB(RXPGM),DISP=(SHR,PASS,KEEP)
//SYSUT1 DD *
/*REXX*/
SAY 'HELLO'
/*
//* MAKE SURE THERE IS A SPACE IN COL 1 OF SYSUT1 CARDS
//********************************************
//STEP0 EXEC PGM=IKJEFT01,PARM='RXPGM'
//SYSPROC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
//SYSEXEC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
//* MAY NOT NEED ONE OF THESE, EITHER SHOULD WORK
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
//

Its a little clumsy, but it works everywhere I have worked. A similar
process could be used to write a REXX which writes a REXX and then calls it.
If you assign more then one REXX per REXXLIB change the SPACE parameter to
// SPACE=(80,(100,50,99),RLSE)
where 99 is the number of directory entries, or members in REXXLIB. It can
make for quite lengthy JCL, but you could also put the REXX cards in a
CONTROL card library if your shop doesn't allow for REXX in production and
use this method to copy the needed REXX exec's to the &&REXXLIB as needed.
Still rather complicated.

Just one more way to do it.

Peter S Tillier

unread,
Jan 15, 1999, 3:00:00 AM1/15/99
to

Jeff wrote in message <79wn2.3246$hE2.20...@storm.twcol.com>...
<snip>

>Never done it that way, but here is how I usually do it:
>
<snip>

>//********************************************
>//STEP0 EXEC PGM=IKJEFT01,PARM='RXPGM'
>//SYSPROC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
>//SYSEXEC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
<Snip>
You only need one or other of SYSPROC or SYSEXEC - SYSPROC is easier since
for SYSEXEC to be searched you need to execute:

EXECUTIL SEARCHDD(YES)

at some point.

HTH

Peter
--
Peter S Tillier <pet...@eq1152.demon.co.uk>

Gilbert Saint-flour

unread,
Jan 15, 1999, 3:00:00 AM1/15/99
to
In <916380630.8742.0...@news.demon.co.uk>, on 15 Jan 1999 at

06:10, "Peter S Tillier" <pet...@eq1152.demon.co.uk> said:

>Jeff wrote in message <79wn2.3246$hE2.20...@storm.twcol.com>... <snip>

><snip>


>>//STEP0 EXEC PGM=IKJEFT01,PARM='RXPGM'
>>//SYSPROC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
>>//SYSEXEC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
><Snip>
>You only need one or other of SYSPROC or SYSEXEC - SYSPROC is easier
>since for SYSEXEC to be searched you need to execute:

>EXECUTIL SEARCHDD(YES)

You do NOT need EXECUTIL SEARCHDD(YES) if the SYSEXEC DD is present in the
JCL.

If you refer to the same passed data set in a given step (see &&REXXLIB in
the quoted example), you'll get a "data set not found" error on the second
DD, unless you add a volume refer-back as follows:

//SYSEXEC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP),
// VOL=REF=*.SYSPROC

Gilbert Saint-flour <g...@ibm.net>

Peter S Tillier

unread,
Jan 16, 1999, 3:00:00 AM1/16/99
to

Gilbert Saint-flour wrote in message <369f4065$3$tfs$mr2ice@news>...
<snip>

>You do NOT need EXECUTIL SEARCHDD(YES) if the SYSEXEC DD is present in the
>JCL.

<snip>


That's new to me - I found the information in one of IBM's manuals. Has
this changed?

Peter


Jeff

unread,
Jan 19, 1999, 3:00:00 AM1/19/99
to
All interesting comments. But none of them address the reason why << I >>
did it. I did it because the process at different sites for doing this same
thing seems slightly different from site to site. Currently the site I am at
does not recognize the SYSEXEC DD no matter what I do. So I added the
SYSPROC. The SYSPROC worked. So I removed the SYSEXEC, it still worked. So
for clarity I did it both ways just in case.

Overkill I geuss, but everything can be fixed with a vice-grip and a sledge
hammer.

Gilbert Saint-flour

unread,
Jan 19, 1999, 3:00:00 AM1/19/99
to
In <kuUo2.5796$hE2.23...@storm.twcol.com>, on 19 Jan 1999 at 00:11,
"Jeff" <a...@a.com> said:

>... Currently the site I am at does not recognize the SYSEXEC DD ...

You're probably using a non-standard parameter module. Check what the
ddname is at offset x'50' in the IRXTSPRM, IRXISPRM and IRXPARMS modules.
Parameter modules are described in the "Language Processor Environments"
chapter of the TSO/E REXX Reference manual.

Gilbert Saint-flour <g...@ibm.net>

Jeff

unread,
Jan 20, 1999, 3:00:00 AM1/20/99
to
>You're probably using a non-standard parameter module. Check what the
>ddname is at offset x'50' in the IRXTSPRM, IRXISPRM and IRXPARMS modules.
>Parameter modules are described in the "Language Processor Environments"
>chapter of the TSO/E REXX Reference manual.


Are you talking about browsing the executable? If so how do I find it?
Otherwise I don't know how to look at the parameter modules.

It is definitely non-standard. I have worked at several sites and this was
the first time I had any problems.

Jeff

unread,
Jan 20, 1999, 3:00:00 AM1/20/99
to
>>>//STEP0 EXEC PGM=IKJEFT01,PARM='RXPGM'
>>>//SYSPROC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
>>>//SYSEXEC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
>><Snip>

>If you refer to the same passed data set in a given step (see &&REXXLIB in
>the quoted example), you'll get a "data set not found" error on the second
>DD, unless you add a volume refer-back as follows:
>
> //SYSEXEC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP),
> // VOL=REF=*.SYSPROC


I have used this exact code. I am not creating the DSN in this step, thus no
DSN not found. I have done this same thing in COBOL. where I have one DD
refer to a File-ID in COBOL to read, and another to append to the end. Both
DD's referring to the same DSN.

Gilbert Saint-flour

unread,
Jan 21, 1999, 3:00:00 AM1/21/99
to
In <y1wp2.339$eX.8...@storm.twcol.com>, on 20 Jan 1999 at 21:11, "Jeff"
<a...@a.com> said:

>>You're probably using a non-standard parameter module. Check what the
>>ddname is at offset x'50' in the IRXTSPRM, IRXISPRM and IRXPARMS modules.

>Are you talking about browsing the executable? If so how do I find it?


>Otherwise I don't know how to look at the parameter modules.

If you have ISPF 4.5, type TSO ISRDDN then LOAD IRXPARMS to browse the
parameter module. If you don't have ISPF 4.5, browse
'SYS1.LPALIB(IRXPARMS)'.

Gilbert Saint-flour <g...@ibm.net>

Gilbert Saint-flour

unread,
Jan 21, 1999, 3:00:00 AM1/21/99
to
In <U4yp2.518$eX.9...@storm.twcol.com>, on 20 Jan 1999 at 23:31, "Jeff"
<a...@a.com> said:

I stand firmly by my original statement: if the data set is passed, you
need the VOL=REF on the 2nd DD. If it's catalogued, you don't. In your
example, &&REXXLIB is passed, so you need it. If this exact JCL works on
your system, then there must be some local system modification (such as a
JES or SMF exit) that adds the VOL=REF info under the covers.

Gilbert Saint-flour <g...@ibm.net>

Jan Lend

unread,
Jan 24, 1999, 3:00:00 AM1/24/99
to
Your Rexx program can return 9999 by saying:

return 9999

but unless you create some horrendous code that crashes the program
yourself, its not going to abend.

If you want the JCL to perform no further steps, you need COND
parameters on those steps that will exclude them from processing if
STEP0 issues a rc of more than whatever you define.

Jan Lend

remove the denial, to email me!


and...@usa.net wrote:
>
> In article <U4yp2.518$eX.9...@storm.twcol.com>,


> "Jeff" <a...@a.com> wrote:
> > >>>//STEP0 EXEC PGM=IKJEFT01,PARM='RXPGM'
> > >>>//SYSPROC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
> > >>>//SYSEXEC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP)
> > >><Snip>
>

> This step always has RC=0 no matter what. Could you tell me how I can force
> it to abend with the RC from the REXX program (i.e. "exit 999")
>
> Thanks,
> Andy
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

and...@usa.net

unread,
Jan 25, 1999, 3:00:00 AM1/25/99
to

Jeff

unread,
Jan 25, 1999, 3:00:00 AM1/25/99
to
>return 9999


This is how I have done it with the same code.

Jeff

unread,
Jan 25, 1999, 3:00:00 AM1/25/99
to
>>>If you refer to the same passed data set in a given step (see &&REXXLIB
in
>>>the quoted example), you'll get a "data set not found" error on the
second
>>>DD, unless you add a volume refer-back as follows:
>>>
>>> //SYSEXEC DD DSN=&&REXXLIB,DISP=(SHR,PASS,KEEP),
>>> // VOL=REF=*.SYSPROC
>
>>I have used this exact code. I am not creating the DSN in this step, thus
>>no DSN not found. I have done this same thing in COBOL. where I have one
>>DD refer to a File-ID in COBOL to read, and another to append to the end.
>>Both DD's referring to the same DSN.
>
>I stand firmly by my original statement: if the data set is passed, you
>need the VOL=REF on the 2nd DD. If it's catalogued, you don't. In your
>example, &&REXXLIB is passed, so you need it. If this exact JCL works on
>your system, then there must be some local system modification (such as a
>JES or SMF exit) that adds the VOL=REF info under the covers.


Can you explain what VOL=REF actually means? I have never seen it in 4 years
of JCL coding at several different sites. The current site I am at does have
some weird EXITS to fill in certain info. For instance, if you are creating
a small DSN, you only need to code the DISP and no other parameters, besides
DSN. And obviously this is not a standard IKJEFT01 load module.

René Jansen

unread,
Jan 25, 1999, 3:00:00 AM1/25/99
to
Andy,


for this IKJEFT has another entrypoint, which is called IKJEFT1A
I think this serves your purpose.


greetings,

René.

0 new messages