No Rexx implementation; it's the original PL/I syntax.

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

________________________________________
From: IBM Mainframe Assembler List [[email protected]] on behalf 
of Swarbrick, Frank [[email protected]]
Sent: Tuesday, June 9, 2020 4:36 PM
To: [email protected]
Subject: Re: [EXTERNAL] Re: The Condition Code as a return value from a called 
function and LEAVE in Rexx

What Rexx implementations support the latter syntax?


-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of Seymour J Metz
Sent: Tuesday, June 9, 2020 1:54 PM
To: [email protected]
Subject: [EXTERNAL] Re: The Condition Code as a return value from a called 
function and LEAVE in Rexx

If and when ANSI updates the Rexx standard, I hope that they use the syntax

     <label>: DO LABEL ...

rather than

     DO LABEL >label> ...

and that they pick up OOREXX.


--
Shmuel (Seymour J.) Metz
https://urldefense.proofpoint.com/v2/url?u=http-3A__mason.gmu.edu_-7Esmetz3&d=DwIFAg&c=93gI-qvDzOqjAhl5WCio4Vi8HsYhTiwto8TEKTLDJl8&r=MLqSQDjY_xXgyLjIKvsPODAWYCCf32YAlH2zNqd_ogQ&m=5vL2u6cK21r1jyfjpJU0nKnIaT5sqgvsyg_u2YXjXdw&s=_P4Nr1m62Cpyw2X5GQDegBk_SiQCewNbou6XKCyv0ZA&e=

________________________________________
From: IBM Mainframe Assembler List [[email protected]] on behalf 
of Bob Raicer [[email protected]]
Sent: Tuesday, June 9, 2020 3:44 PM
To: [email protected]
Subject: The Condition Code as a return value from a called function and LEAVE 
in Rexx

I am no doubt joining in on the conversation regarding using the Condition Code 
as a return value from a called function/sub-routine, as well as the 
conversation regarding the LEAVE construct in Rexx.

I am certainly not a fan of using the Condition Code as a return value from a 
called function.  It is rather limited (only a two bit
integer) and does not work for functions invoked by other programming languages 
(for example, "C").

The SPM (Set Program Mask) instruction has been around since the introduction 
of the S/360 (announced in 1964, 56 years ago).  The
S/370 was announced in 1970 (50 years ago).  MVS/XA was announced in 1983 (37 
years ago) and that's when the IPM (Insert Program Mask) instruction appeared.

Unfortunately, IBM Rexx for z/OS is way behind the times. ooRexx has supported 
the "Label" keyword on the "Do" instruction (and several other instructions, 
for example, "Select") for quite some time (the support was present in Version 
4.0 in August 2009).

The syntax is roughly this, where optional components are shown within braces:

DO {LABEL name} {repetitor} {conditional} ...

Here is an excerpt from the documentation of the "Do" instruction regarding the 
"LABEL" component/phrase:

"The LABEL phrase, if used, must precede any repetitor or conditional."

Here is an excerpt from the documentation of the "Leave" instruction which 
describes how the "Label" on a "Do" is used:

"The name is a symbol, taken as a constant.  If name is not specified, LEAVE 
ends the innermost active repetitive loop.  If name is specified, it must be 
the name of the control variable or LABEL name of a currently active LOOP, DO, 
or SELECT, which can be the innermost, and that block, and any active block 
inside it, are then ended.  Control then passes to the clause following the END 
that matches the instruction of the selected block."

The ANSI Standard for Rexx (X3J18) has not been updated since
1998 and consequently does not reflect the notion of the "Label"
keyword on "Do", etc.

Bob Raicer

The information contained in this electronic communication and any document 
attached hereto or transmitted herewith is confidential and intended for the 
exclusive use of the individual or entity named above. If the reader of this 
message is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, you are hereby notified that any 
examination, use, dissemination, distribution or copying of this communication 
or any part thereof is strictly prohibited. If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this communication. Thank you.

Reply via email to