Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread Seymour J Metz
of > CM Poncelet > Sent: Tuesday, September 8, 2020 7:53 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > Mr Bridges, > > 1) The reason the program does not abend is it has a "SIGNAL ON SYNTAX > NAME ERROR3"

Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread Seymour J Metz
@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) Confused? Difficult to say--the brash nature of this debate is clouding things. There is an example above which uses something like ''0001'B to initialise a variable. In Rexx, that is not a boolean value. Depending on which

Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread Bob Bridges
I dunno, though, the first part of it was entertaining. And as I'm not a systems programmer (I came into mainframe security through the development door), many of the more on-topic threads here are opaque to me, so the occasional fight over COBOL or CLIST provides some diversion. --- Bob

Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread David Crayford
On 2020-09-10 8:05 PM, Rupert Reynolds wrote: Confused? Difficult to say--the brash nature of this debate is clouding things. Perfect example of bike shedding! A rambling thread where people argue over stuff that is not really useful! IBMMAIN is difficult to read these days. The good stuff

Re: REXX true/false (was Constant Identifiers)

2020-09-10 Thread Rupert Reynolds
Confused? Difficult to say--the brash nature of this debate is clouding things. There is an example above which uses something like ''0001'B to initialise a variable. In Rexx, that is not a boolean value. Depending on which interpreter you use, it is either a byte with contents x'01', which

Re: REXX true/false (was Constant Identifiers)

2020-09-09 Thread CM Poncelet
Sent: Tuesday, September 8, 2020 7:53 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > Mr Bridges, > > 1) The reason the program does not abend is it has a "SIGNAL ON SYNTAX > NAME ERROR3" coded before the "IF TRUE THE

Re: REXX true/false (was Constant Identifiers)

2020-09-09 Thread Paul Gilmartin
On Wed, 9 Sep 2020 00:45:12 -0400, Phil Smith III wrote: >Y'all are dancing on the head of a pin. As Shmuel said, Rexx has one datatype, >period. It has the DATATYPE function that can do some >analysis on a variable's contents and tell you whether it's all numeric, hex, >etc. That's basically

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Seymour J Metz
Subject: Re: REXX true/false (was Constant Identifiers) Mr Bridges, 1) The reason the program does not abend is it has a "SIGNAL ON SYNTAX NAME ERROR3" coded before the "IF TRUE THEN...", which traps the abend and resumes execution at label ERROR3. 2) I disagree with Mr

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Phil Smith III
Y'all are dancing on the head of a pin. As Shmuel said, Rexx has one datatype, period. It has the DATATYPE function that can do some analysis on a variable's contents and tell you whether it's all numeric, hex, etc. That's basically it. Arguing about whether it's a "string" or a "character

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread CM Poncelet
Don't bother. IBM will reply NAPWAD (not a problem, working as designed). ;-) On 08/09/2020 16:22, Paul Gilmartin wrote: > (cross-posting to IBM-Main and TSO-REXX) > On 2020-09-08, at 00:23:52, CM Poncelet wrote: >> A *character* string is either any string that has DATATYPE CHAR but not >>

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread CM Poncelet
Mr Bridges,   1) The reason the program does not abend is it has a "SIGNAL ON SYNTAX NAME ERROR3" coded before the "IF TRUE THEN...", which traps the abend and resumes execution at label ERROR3.   2) I disagree with Mr Metz on the grounds that he argues that "everything in REXX is a character

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Seymour J Metz
; Sent: Tuesday, September 8, 2020 11:22 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) (cross-posting to IBM-Main and TSO-REXX) On 2020-09-08, at 00:23:52, CM Poncelet wrote: > > A *character* string is either any string that has DATATYPE CHAR but not &g

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Bob Bridges
Mr Poncelet, I'm interested in this example. Two questions: 1) Once TRUE is set to a '1'b in the last two sections, why does the program not abend when it encounters "IF TRUE THEN..."? Seems to me REXX should complain that TRUE is not 1 or 0. 2) From your preceding posts I got the impression

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Paul Gilmartin
(cross-posting to IBM-Main and TSO-REXX) On 2020-09-08, at 00:23:52, CM Poncelet wrote: > > A *character* string is either any string that has DATATYPE CHAR but not > DATATYPE NUM, or is *any* string (and it might as well then be called > 'anything string' instead of 'character string'). >

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread Seymour J Metz
tp://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of CM Poncelet Sent: Monday, September 7, 2020 10:33 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) You said, "It isn't boolean; everything in REXX i

Re: REXX true/false (was Constant Identifiers)

2020-09-08 Thread CM Poncelet
A *character* string is either any string that has DATATYPE CHAR but not DATATYPE NUM, or is *any* string (and it might as well then be called 'anything string' instead of 'character string'). Q: "What's your motivation and the motivation of the recondite examples you supplied (which I

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Paul Gilmartin
On Tue, 8 Sep 2020 03:33:18 +0100, CM Poncelet wrote: >You said, "It isn't boolean; everything in REXX is a character string." >� >I agree that "it's all strings", but not that "everything in REXX is a >*character* string." >� Persuing the Rexx Reference, SA32-0972-40, I find various

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread CM Poncelet
/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf of > CM Poncelet > Sent: Monday, September 7, 2020 9:30 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > No, REXX has both

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Paul Gilmartin
On Tue, 8 Sep 2020 02:30:01 +0100, CM Poncelet wrote: > >My mistake was to think that setting a variable to a quoted value, in >REXX, made that variable a type CHAR. But REXX considers it to be NUM if >it contains only numerics, regardless of whether its set value was > Not only numerics. For

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Seymour J Metz
It isn't boolean; everything in REXX is a character string. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf of > CM Poncelet > Sent: Monday, Septe

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread CM Poncelet
isn't boolean; everything in REXX is a character string. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf of > CM Poncelet > Sent: Monday, September 7, 2020 1

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Seymour J Metz
, alas. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Bob Bridges Sent: Monday, September 7, 2020 8:20 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Bob Bridges
"Mehitabel" - wow! You're a lot older than I assumed, Mr Metz! --- Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 /* In its state of nature [a dog] has a smell, and habits, which frustrate man's love; he washes it, house-trains it, teaches it not to steal, and is so enabled to love it

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Paul Gilmartin
On Mon, 7 Sep 2020 18:52:55 +, Seymour J Metz wrote: >Hindsight? I never understood the purpose of the web, given that gopher and >SGML were already here. All we were missing was a protocol called Mehitabel ;-) > It's easy to understand. Just remember, you're not the customer; you're the

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Seymour J Metz
on behalf of Rupert Reynolds Sent: Sunday, September 6, 2020 5:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) Hindsight is a wonderful thing :-) On Sun, 6 Sep 2020 at 21:55, Seymour J Metz wrote: > You didn't read The World According to A

Re: REXX true/false (was Constant Identifiers)

2020-09-07 Thread Seymour J Metz
on behalf of CM Poncelet Sent: Monday, September 7, 2020 1:23 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) ARG DEBUG IF DEBUG = 'DEBUG' THEN , TRACE I TRUE = (1-1=0 & 4¬=6) TVAL = '0011'||X2B(D2X(TRUE)) SAY 'TRUE = 'TRUE SAY 'TVAL = 'TVAL IF TRUE THEN

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Subject: Re: REXX true/false (was Constant Identifiers) "ELSE IF ¬TRUE THEN " was just to demonstrate that "TRUE" is Boolean. On 07/09/2020 05:24, Seymour J Metz wrote: > First, that code is highly obfuscated. Why would you ever want to write "IF > foo & TR

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread CM Poncelet
M Mainframe Discussion List on behalf of > CM Poncelet > Sent: Sunday, September 6, 2020 9:31 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > In the following example, > TRUE = (1 - 1 = 0 & 1 ¬= 0) [or whatever is more app

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread CM Poncelet
ARG DEBUG IF DEBUG = 'DEBUG' THEN ,   TRACE I TRUE = (1-1=0 & 4¬=6) TVAL = '0011'||X2B(D2X(TRUE)) SAY 'TRUE = 'TRUE SAY 'TVAL = 'TVAL IF TRUE THEN SAY 'TRUE' IF TVAL THEN SAY 'TVAL' IF ¬TRUE THEN SAY 'NOT TRUE' IF ¬TVAL THEN SAY 'NOT TVAL' EXIT 0   gives (in ASCII):   TRUE = 1 TVAL = 00110001 TRUE

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of CM Poncelet Sent: Sunday, September 6, 2020 9:31 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) In the following example, TRUE =

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Bob Bridges
Because I wasn't paying attention, I guess. Maybe I did do it that way in the past, but just now the below is what I remembered. Absent of me. --- Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 /* God's never been disappointed in me, because he never had any illusions about me. -Clay

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Paul Gilmartin
On Mon, 7 Sep 2020 02:31:33 +0100, CM Poncelet wrote: >In the following example, >TRUE = (1 - 1 = 0 & 1 ¬= 0) [or whatever is more appropriate], >it is then sufficient e.g. to code: >IF 4 ¬= 6 & TRUE THEN >ELSE IF ¬TRUE THEN >  >I.e. TRUE can be defined as a Boolean '1'b in REXX, as per above.

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread CM Poncelet
In the following example, TRUE = (1 - 1 = 0 & 1 ¬= 0) [or whatever is more appropriate], it is then sufficient e.g. to code: IF 4 ¬= 6 & TRUE THEN ELSE IF ¬TRUE THEN   I.e. TRUE can be defined as a Boolean '1'b in REXX, as per above. On 06/09/2020 20:43, Paul Gilmartin wrote: > On Sun, 6 Sep

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
mason.gmu.edu/~smetz3 > > > > From: IBM Mainframe Discussion List on behalf > of Rupert Reynolds > Sent: Sunday, September 6, 2020 4:48 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > Loss of Internet access would have

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
4:48 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) Loss of Internet access would have been sheer luxury! (insert The Four Yorkshiremen sketch here) as this was the 1980s :-) The Internet was there, but nobody had heard of it unless he was the sort of geek

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
Loss of Internet access would have been sheer luxury! (insert The Four Yorkshiremen sketch here) as this was the 1980s :-) The Internet was there, but nobody had heard of it unless he was the sort of geek who soldered his own modem cable, and WWW was probably not even a twinkle in timbl's eye

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
of Rupert Reynolds Sent: Sunday, September 6, 2020 3:45 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) It almost boils down to a matter of style, I suppose. The only thing against that is that I had no access to any sort of docs, as I said. I had no way of knowing

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
ISTSERV.UA.EDU > Subject: Re: REXX true/false (was Constant Identifiers) > > I don't see any advantage in 'Y', because then you have to code IF or WHEN > variable = 'Y'. > > The advantage of Boolean is clarity in something like:- > /* Rexx */ > TRUE = (1=1) > ... > SEL

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Paul Gilmartin
On Sun, 6 Sep 2020 12:03:18 -0400, scott Ford wrote: >I have done things like true =‘Y’ and then > >If true > .. >end > What language? That would certainly be a syntax error in Rexx. And why? You could just omit the "if true" and code: do .. end n Sun, 6 Sep

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) To expand, I had some code monitoring input data as it arrived, waiting for a fault condition that was in several parts, order unknown. So I used a few Rexx variables as Booleans, as they made the conditional code shorter

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) I have done things like true =‘Y’ and then If true .. end Scott On Sun, Sep 6, 2020 at 8:11 AM Rupert Reynolds wrote: > To expand, I had some code monitoring input data as it arrived, waiting for > >

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Subject: Re: REXX true/false (was Constant Identifiers) I don't see any advantage in 'Y', because then you have to code IF or WHEN variable = 'Y'. The advantage of Boolean is clarity in something like:- /* Rexx */ TRUE = (1=1) ... SELECT WHEN logmode = "D4A32782" & (GotASCII & Got

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
I don't see any advantage in 'Y', because then you have to code IF or WHEN variable = 'Y'. The advantage of Boolean is clarity in something like:- /* Rexx */ TRUE = (1=1) ... SELECT WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do (from a similar exec I found in archives, not the

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread scott Ford
I have done things like true =‘Y’ and then If true .. end Scott On Sun, Sep 6, 2020 at 8:11 AM Rupert Reynolds wrote: > To expand, I had some code monitoring input data as it arrived, waiting for > > a fault condition that was in several parts, order unknown. > > > > So I used a few

Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
To expand, I had some code monitoring input data as it arrived, waiting for a fault condition that was in several parts, order unknown. So I used a few Rexx variables as Booleans, as they made the conditional code shorter and clearer. But someone will reuse my code another day (perhaps me), and

Re: REXX true/false (was Constant Identifiers)

2020-09-05 Thread Robin Vowels
On 2020-09-06 11:50, Seymour J Metz wrote: Eschew obfuscation. Either just use 0 and one, or write false=0;true=1. Similarly, for PL/I either just use '0'b and '1'b or write false='0'b;true='1'b;. VALUE is a good alternative also.

Re: REXX true/false (was Constant Identifiers)

2020-09-05 Thread Seymour J Metz
on behalf of Bob Bridges Sent: Saturday, September 5, 2020 4:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: REXX true/false (was Constant Identifiers) I've never done that, but I have done something like it: str=word('true false',(0-fx)+2) ...where fx is Boolean. I hope I've done it only

Re: REXX true/false (was Constant Identifiers)

2020-09-05 Thread Paul Gilmartin
On Sat, 5 Sep 2020 23:36:37 +0100, Rupert Reynolds wrote: >Writing Rexx for myself (therefore no local standards to follow) I had to >set an internal boolean in a few places. >So I started it with >TRUE = (1=1) >FALSE = \TRUE > Now you have them; how are they useful? (Examples?) >That's partly

Re: REXX true/false (was Constant Identifiers)

2020-09-05 Thread Rupert Reynolds
Writing Rexx for myself (therefore no local standards to follow) I had to set an internal boolean in a few places. So I started it with TRUE = (1=1) FALSE = \TRUE That's partly because I couldn't find doc on Rexx standards (no WWW yet) and I didn't like to assume that 1 and 0 were always valid

Re: REXX true/false (was Constant Identifiers)

2020-09-05 Thread Paul Gilmartin
On Sat, 5 Sep 2020 16:09:32 -0400, Bob Bridges wrote: > > str=word('true false',(0-fx)+2) > >...where fx is Boolean. > My use of COPIES() was to save 2 lines of code while knowing that the function call/return overhead is large and IF would perform better. > if fx then str='true'; else

Re: REXX true/false (was Constant Identifiers)

2020-09-05 Thread Jeremy Nicoll
On Sat, 5 Sep 2020, at 21:09, Bob Bridges wrote: > I've never done that, but I have done something like it: > > str=word('true false',(0-fx)+2) Why (0-fx)+2when 2-fxis simpler? > (If I have to explain it, it just proves I should never write it that > way in the first place.

REXX true/false (was Constant Identifiers)

2020-09-05 Thread Bob Bridges
I've never done that, but I have done something like it: str=word('true false',(0-fx)+2) ...where fx is Boolean. I hope I've done it only in programs I wrote for my own use. But I sometimes write a tool for myself, then move it to a public library on request, so that monster may be out