> I've found no use for ADDRESS LINK/ATTACH.  They seem to be
relics of Rexx's gestation under CMS. 

I doubt it. It doesn't look like either the CMS tokenized parameter list or the 
CMS extended parameter list. 

>   IIRC, they use R0 as a parameter register.

Passing the address of the ENVBLOCK in R0 is pervasive in REXX. In particular, 
REXX also passes the ENVBLOCK in R0 when calling commands in the ATTACHMVS and 
LINKMVS environments.

> ADDRESS LINKMVS/ATTCHMVS are similar, but Rexx automatically supplies the 
> length prefix.

Prefixes. They seem tailored to calling language processors and utilities, 
which include halfword lengths at the beginnings of, e.g., ddname lists.

> Sigh.  "IDCAMS" appears to be an implied string literal while context implies
> that "Infile" and "outfile" are Rexx variables.

Bog standard, and perfectly readable, especially if you adopt the convention of 
putting the names of uninitialized variables in upper case. I see no value in 
novalue.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [0000000433f07816-dmarc-requ...@listserv.ua.edu]
Sent: Wednesday, May 20, 2020 11:55 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX assistance

On Wed, 20 May 2020 06:45:57 -0500, Dave Jousma <david.jou...@53.com> wrote:

>All,
>
>We have some relatively new Netview automation to process inbound FTP 
>processing that is written in REXX,
>
ITschak or Eileen can surely give you better information about
TSO, IDCAMS, and Netview than I.  But I know some Rexx.

>Look at how IDCAMS is being called in line 318. ... Is that the equivalent of 
>just a standard CALL? Or like entering TSO IDCAMS at a command line in TSO?
>
I believe it's the eqivalent of entering "IDCAMS ..." on the
TSO command line (READY prompt).  I believe I've encountered
errors entering such as "TSO IDCAMS ..." as a TSO command.
I find neither TSO nor IDCAMS in the TSO Command Ref.

> ...   I see references to LINK, ATTACH, LINKMVS, ATTCHMVS, LINKPGM, ATTCHPGM.
>
I've found no use for ADDRESS LINK/ATTACH.  They seem to be
relics of Rexx's gestation under CMS.  IIRC, they use R0 as a parameter
register.  ADDRESS LINKPGM/ATTCHPGM are similar to their Assembler
macro counterparts.  The caller is expected to supply a 16-bit length
prefix if the function called requires it.  ADDRESS LINKMVS/ATTCHMVS
are similar, but Rexx automatically supplies the length prefix.

>000309 /*  We have now created all the IDCAMS statements, we now write them*/
>000310 /*  to our dataset to be used as SYSIN for IDCAMS command           */
>000311 /*                                                                  */
>000312   Say "Number of Queued Lines is " QueuedLines
>000313      Address MVS 'EXECIO 'QueuedLines' DISKW 'Infile' (FINIS'
>000314 /*                                                                  */
>000315 /*  The IDCAMS statement calls IDCAMS using the 2 DD names listed   */
>000316 /*  after the command as SYSIN and SYSPRINT                         */
>000317 /*                                                                  */
>000318      IDCAMS Infile Outfile
>
Sigh.  "IDCAMS" appears to be an implied string literal while context implies
that "Infile" and "outfile" are Rexx variables.
The coder could have clarified this enormously with
           signal on novalue
           SaveTrace = trace( 'R' )
           "IDCAMS" Infile Outfile
           call trace( SaveTrace )

>000319   Say "IDCAMS RC for File Rename = " RC
>000320      If RC > 4 Then
>000321         Do
>000322           Address MVS 'EXECIO * DISKR 'Outfile' (STEM Prtrex. FINIS'
>000323           do xy = 1 to Prtrex.0
>000324              Say "Idcams output = " Prtrex.xy
>000325           end
>000326         end
>000327   "free fi("Infile")"
>000328   "free fi("Outfile")"
>000329

-- gil

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

----------------------------------------------------------------------
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