Re: [EXTERNAL] The Condition Code as a return value from a called function and LEAVE in Rexx
It's not intuitive that the label is on the *correct* end. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Paul Gilmartin [0014e0e4a59b-dmarc-requ...@listserv.uga.edu] Sent: Tuesday, June 9, 2020 5:01 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: [EXTERNAL] The Condition Code as a return value from a called function and LEAVE in Rexx On 2020-06-09, at 14:46:30, Seymour J Metz wrote: > > No Rexx implementation; it's the original PL/I syntax. > > > -Original Message- > From: Seymour J Metz > Sent: Tuesday, June 9, 2020 1:54 PM > > If and when ANSI updates the Rexx standard, I hope that they use the syntax > > : DO LABEL ... > For the human reader it's more intuitive to label the END rather than the DO because that's where LEAVE goes and ITERATE increments and tests. And hardly more difficult for the translator. -- gil
Re: [EXTERNAL] The Condition Code as a return value from a called function and LEAVE in Rexx
On 2020-06-09, at 14:46:30, Seymour J Metz wrote: > > No Rexx implementation; it's the original PL/I syntax. > > > -Original Message- > From: Seymour J Metz > Sent: Tuesday, June 9, 2020 1:54 PM > > If and when ANSI updates the Rexx standard, I hope that they use the syntax > > : DO LABEL ... > For the human reader it's more intuitive to label the END rather than the DO because that's where LEAVE goes and ITERATE increments and tests. And hardly more difficult for the translator. -- gil
Re: [EXTERNAL] Re: The Condition Code as a return value from a called function and LEAVE in Rexx
Ah, OK. Thanks. -Original Message- From: IBM Mainframe Assembler List On Behalf Of Seymour J Metz Sent: Tuesday, June 9, 2020 2:47 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: [EXTERNAL] Re: The Condition Code as a return value from a called function and LEAVE in Rexx No Rexx implementation; it's the original PL/I syntax. -- 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=piDtybkWpl57lXYQmefZxUHXIka547xnmJi7vKRxAjA&s=jK1beERCkCvANh8cumSQsPDIpEWjtP0Fb8UADR6ko-E&e= From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Swarbrick, Frank [frank.swarbr...@efirstbank.com] Sent: Tuesday, June 9, 2020 4:36 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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 On Behalf Of Seymour J Metz Sent: Tuesday, June 9, 2020 1:54 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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 : 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 [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Bob Raicer [r...@raicer.com] Sent: Tuesday, June 9, 2020 3:44 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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. 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
Re: [EXTERNAL] Re: The Condition Code as a return value from a called function and LEAVE in Rexx
No Rexx implementation; it's the original PL/I syntax. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Swarbrick, Frank [frank.swarbr...@efirstbank.com] Sent: Tuesday, June 9, 2020 4:36 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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 On Behalf Of Seymour J Metz Sent: Tuesday, June 9, 2020 1:54 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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 : 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 [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Bob Raicer [r...@raicer.com] Sent: Tuesday, June 9, 2020 3:44 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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.
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 On Behalf Of Seymour J Metz Sent: Tuesday, June 9, 2020 1:54 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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 : 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 [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Bob Raicer [r...@raicer.com] Sent: Tuesday, June 9, 2020 3:44 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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.
Re: The Condition Code as a return value from a called function and LEAVE in Rexx
On 2020-06-09, at 13:44:57, Bob Raicer wrote: > > 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"). > I once had a colleague focused on MVS/XA who insisted on using Condition Code. That way he could do a BC after a call, sparing a LTR instruction to set the CC. Then I was assigned to backport the code to VM/370, lacking IPM ... > 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). > Standard Rexx and the IBM flavors support ITERATE control-variable and LEAVE control-variable for all DOs having a control-variable. I have sometimes resorted to introducing an otherwise otiose control-variable in order to identify the DO. I cite the control-variable on the END. This has the collateral benefit of facilitating checking of DO nesting for both the human reviewer and the interpreter. Likewise, I will code a DO solely for the purpose of using LEAVE as a notional GOTO. Clumsy, but I consider it worthwhile. -- gil
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 : DO LABEL ... rather than DO LABEL >label> ... and that they pick up OOREXX. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf of Bob Raicer [r...@raicer.com] Sent: Tuesday, June 9, 2020 3:44 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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 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