Here is one way to do this, if you don't need to call other external Rexx
programs:
//*********************************************************************
//* This JCL demonstrates how to create and execute an in-stream
//* REXX procedure. The PARM field contains only a single x'00'.
//*********************************************************************
//STEP0020  EXEC  PGM=IRXJCL,PARM=' '
//SYSTSPRT  DD  SYSOUT=*
//SYSTSIN   DD  DUMMY
//SYSEXEC   DD  *
say "Hello world! Date = "date()", time = "time()
EXIT
/*
//*

If you need to concatenate different REXX libs to your SYSEXEC and still
want an instream batch job, here is another way:
//S0010    EXEC PGM=IKJEFT01
//SYSTSPRT DD  SYSOUT=*
//SYSEXEC  DD  UNIT=SYSALLDA,SPACE=(CYL,(5,1,5)),
//             DSN=&SYSEXEC,
//             RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PO
//         DD  DISP=SHR,DSN=MY.OTHER.ISPEXEC
//SYSUT2   DD  DISP=(OLD,PASS),VOL=REF=*.SYSEXEC,
//         DSN=&SYSEXEC(SIMPLERX)
//SYSTSIN  DD *
 REPRO IFILE(REXXSRC) OFILE(SYSUT2)
 SIMPLERX
/*
//REXXSRC  DD *,DLM='$$'
/*  Rexx */

Say "Hello world! Date = "date()", time = "time()

Call Datesamp           /* Rexx Pgm in other PDS */


$$
//

There may be other ways, but these are a couple I have used.
Billy


On Wed, Jan 6, 2016 at 6:19 PM, Paul Gilmartin <
0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Wed, 6 Jan 2016 14:03:36 -0600, John McKown  wrote:
>
> >On Wed, Jan 6, 2016 at 1:40 PM, Charles Mills  wrote:
> >
> >> > One of these days, I will looking into write a
> >> > program for IRXJCL which allows "in line" REXX code.
> >>
> >> Have not fully thought this through but couldn't you do it as a PROC
> that
> >> copied inline Rexx into a temporary PDS and then ran it with IRXJCL?
> >
> >​Many do this. I do it myself. But it is a "kludge" in my no-so-humble
> >opinion. But it is why this is not a big thing for me to do. If I do, I'll
> >put it up on the CBTTape.org site.
> >
> >> Kind of an unfortunate restriction on IRXJCL that it requires a PDS and
> a
> >> member name. Presumably would not have been terribly difficult for it to
> >> have supported a sequential dataset.
> >>
> A fiendish hacker (not I) has discovered an alternative, not documented,
> not supported.  If you execute IRXJCL with 8X'00' as a member name it
> takes SYSEXEC (which may be instream) as PS.  Somewhat inferred from
> the documented Rexx API where identical invocations distinguish between
> PS and PDS member solely by the member name's being zeroes.  I think
> it does only one CLI to decide.
>
> Of course, using a PS SYSEXEC precludes any library Rexx calls.  I rather
> execute IKJEFTfoobar with SYSTSIN starting with one or more REPROs
> to copy instream EXECs to a temporary DS as SYSEXEC to which I then
> concatenate my Rexx utility function library.
>
> There's also an API for Rexx EXEC text in storage; no data set needed.
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 
Thank you and best regards,
*Billy Ashton*

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

Reply via email to