Re: REXX true/false (was Constant Identifiers)

2020-09-06 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, September 7, 2020 1:30 AM
To: IBM-MAIN@LISTSERV.UA.EDU
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 & TRUE" instead of "IF foo"?
>
> Second, "ELSE IF ¬TRUE THEN foo" is dead code.
>
> Third, there are no booleans in REXX; the only data type is character string.
>
>
> --
> Shmuel (Seymour J.) 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 = (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 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 2020 17:39:48 +, Seymour J Metz wrote:
>>> A simple true=1;false=0 should suffice for clarity.
>>>
>> Perhaps not to someone most familiar with shell scripts
>> where the definitions are nearly the opposite (command
>> status ($?) = 0 means success or true).
>>
>>
>> On Sun, 6 Sep 2020 17:43:04 +0100, Rupert Reynolds wrote:
>>> The advantage of Boolean is clarity in something like:-
>>> /* Rexx */
>>> TRUE = (1=1)
>>> ...
>>> SELECT
>>>  WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do
>>>...
>> Continuing your example, how would you have set the variables
>> "GotASCII" and "GotVBMrecord" using the quasi-constants TRUE
>> and FALSE?  Does that enhance either clarity or economy of
>> expression?
>>
>> I'm thinking that something like:
>> if filetype=='ASCII' then GotASCII = TRUE; else GotASCII = FALSE
>> would more succinctly be written:
>> GotASCII = ( filetype=='ASCII' )
>>
>> But I've seen even worse, such as:
>> if  GotASCII = true then ...
>> rather than simply:
>> if  GotASCII then ...
>>
>>
>> On Sun, 6 Sep 2020 19:28:11 +, Seymour J Metz wrote:
>>> Yes, you can count on the truth values of 0 and 1 in REXX never changing.
>>>
>> Only if I spent $60 for the ANSI Standard .pdf
>>
>> -- 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
>
> --
> 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

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


Re: PL/I division (was: Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Yeah, I misread the table.


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



From: IBM Mainframe Discussion List  on behalf of 
Robin Vowels 
Sent: Monday, September 7, 2020 1:34 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: PL/I division (was: Constant Identifiers)

On 2020-09-07 14:56, Seymour J Metz wrote:
> No: see
> https://www.ibm.com/support/knowledgecenter/SSY2V3_5.3.0
> /lr/resarithoprt.html#resarithoprt__fig16,
> Tables 3 and 4. For 4/3, the scale factor is 1, not 0.

4 is FIXED DECIMAL (1,0).
3 IS fixed decimal (1,0).
4/3 is fixed decimal (15,14).*
See Table 16.
It's been that way since 1965.


* given that the maximum precision is 15.

> 
> From: IBM Mainframe Discussion List  on
> behalf of Robin Vowels 
> Sent: Sunday, September 6, 2020 8:09 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Constant Identifiers
>
> - Original Message -
> From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu>
> Sent: Sunday, September 06, 2020 11:07 PM
>
>
> On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:

> And C:
> 662 $ cat typetest.c
> #include 
> int main() {
> printf( "%10.6f\n",   4/3 * 3.14159 );
> printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
> 663 $ gmake typetest & ./typetest
> cc typetest.c   -o typetest
>   3.141590
>   4.188787
>
> It ought to depend on the types of the operands of the polymorphic
> operator, '/'.  What are the default types of '4' and '3'?
>
> The type and precision of constants are as written.
> Thus, both 4 and 3 are FIXED DECIMAL (1).
>
>>  Does PL/I entirely lack an integer divide?
>
> PL/I can do integer division.  When the operands are of
> maximum precision, anm integer result is produced.
> Thus, for
> DECLARE (I, J) FIXED BINARY (31);
> then
> I  / J;
> produces an integer result of precision (31,0).
> Similarly of I and J were defined with maximum precision.
>
> Also, as Seymour Metz points out, the DIVIDE built-in function may
> be used to produce an integer result.
>
> Or, you can go ahead with the division, and the result will be
> truncated
> to an integer by assigning to an integer variable.  However, that
> wastes time with unnecessary computation.

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


Re: PL/I declarations (was: Constant Identifiers)

2020-09-06 Thread Seymour J Metz
But if it quacks like a hippopotamus than it is not a duck. FIXED BIN(fo0,0) 
and FIXED DEC(foo,0) do not quack like an integer.

Would you call 3.0E0 an integer?


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



From: IBM Mainframe Discussion List  on behalf of 
Robin Vowels 
Sent: Monday, September 7, 2020 1:41 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: PL/I declarations (was: Constant Identifiers)

On 2020-09-07 15:15, Seymour J Metz wrote:
> No, FIXED BIN(15,0) is not an integer, and the precision rules can be
> very annoying to those with a Fortran mindset.

If it looks like a duck and quacks like a duck, it probably is a duck.

An integer is a whole number.
FIXED BINARY (15) and FIXED BINARY(15,0)
are both attributes describing a whole number,
that is, an integer.

> 
> From: IBM Mainframe Discussion List  on
> behalf of Joe Monk 
> Sent: Sunday, September 6, 2020 7:35 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Constant Identifiers
>
> "PL/I doesn't have integers."
>
> Sorry Shmuel, youre incorrect.
>
> FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4
> byte
> integer.
>
> "The ratiio 4/3 is FIXED BIN,"
>
> No, its FIXED DECIMAL (1,0)...
>
> Joe
>
> On Sun, Sep 6, 2020 at 2:33 PM Seymour J Metz  wrote:
>
>> PL/I doesn't have integers. The ratiio 4/3 is FIXED BIN, with some
>> number
>> of bits after the binary point.
>>
>>
>> --
>> Shmuel (Seymour J.) Metz
>> http://mason.gmu.edu/~smetz3
>>
>>
>> 
>> From: IBM Mainframe Discussion List  on
>> behalf
>> of Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu>
>> Sent: Saturday, September 5, 2020 11:33 PM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Constant Identifiers
>>
>> On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
>> >
>> >As for writing formulas, I prefer to follow a well-known formula, thus:
>> >
>> >volume = 4/3 * 3.14159 * radius**3
>> >
>> Beware!  Than might left-associate as:
>> volume = ( 4/3 ) * 3.14159 * radius**3
>> ... and the quotient of integers, 4/3, is 1.
>>
>> >However, if I'm interested in efficiency, I'd prefer
>> >
>> >volume = 4 * 3.14159E0 / 3 * radius**3
>> >
>> ... (and correct.)
>>
>> -- 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


Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
Whoops, I misread the chart.


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



From: IBM Mainframe Discussion List  on behalf of 
Seymour J Metz 
Sent: Monday, September 7, 2020 1:02 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

4/3 yields 1.3, 04/3 yields 1332, ...

However, DIVIDE(4,3,16,15) yields 1.3...2 to 15 digits


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



From: IBM Mainframe Discussion List  on behalf of 
Robin Vowels 
Sent: Sunday, September 6, 2020 7:58 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu>
To: 
Sent: Sunday, September 06, 2020 1:33 PM


On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
>
>As for writing formulas, I prefer to follow a well-known formula, thus:
>
>volume = 4/3 * 3.14159 * radius**3
>
Beware!  Than might left-associate as:
volume = ( 4/3 ) * 3.14159 * radius**3

"might"?
Evaluation MUST proceed left to right.
So, whether it is written as 4/3 or (4/3), the division will be done first.

> ... and the quotient of integers, 4/3, is 1.

As I indicaed before, 4/3 yields 1.333.to 15 digits.

>However, if I'm interested in efficiency, I'd prefer
>
>volume = 4 * 3.14159E0 / 3 * radius**3
>
... (and correct.)

Yes, it's correct, but I wrote it that way in order to avoid unnecessary
conversions and arithmetic in fixed-point.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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

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


Re: PL/I declarations (was: Constant Identifiers)

2020-09-06 Thread Robin Vowels

On 2020-09-07 15:15, Seymour J Metz wrote:

No, FIXED BIN(15,0) is not an integer, and the precision rules can be
very annoying to those with a Fortran mindset.


If it looks like a duck and quacks like a duck, it probably is a duck.

An integer is a whole number.
FIXED BINARY (15) and FIXED BINARY(15,0)
are both attributes describing a whole number,
that is, an integer.



From: IBM Mainframe Discussion List  on
behalf of Joe Monk 
Sent: Sunday, September 6, 2020 7:35 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

"PL/I doesn't have integers."

Sorry Shmuel, youre incorrect.

FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4 
byte

integer.

"The ratiio 4/3 is FIXED BIN,"

No, its FIXED DECIMAL (1,0)...

Joe

On Sun, Sep 6, 2020 at 2:33 PM Seymour J Metz  wrote:

PL/I doesn't have integers. The ratiio 4/3 is FIXED BIN, with some 
number

of bits after the binary point.


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



From: IBM Mainframe Discussion List  on 
behalf

of Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Saturday, September 5, 2020 11:33 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
>
>As for writing formulas, I prefer to follow a well-known formula, thus:
>
>volume = 4/3 * 3.14159 * radius**3
>
Beware!  Than might left-associate as:
volume = ( 4/3 ) * 3.14159 * radius**3
... and the quotient of integers, 4/3, is 1.

>However, if I'm interested in efficiency, I'd prefer
>
>volume = 4 * 3.14159E0 / 3 * radius**3
>
... (and correct.)

-- gil


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


Re: PL/I division (was: Constant Identifiers)

2020-09-06 Thread Robin Vowels

On 2020-09-07 14:56, Seymour J Metz wrote:

No: see
https://www.ibm.com/support/knowledgecenter/SSY2V3_5.3.0
/lr/resarithoprt.html#resarithoprt__fig16,
Tables 3 and 4. For 4/3, the scale factor is 1, not 0.


4 is FIXED DECIMAL (1,0).
3 IS fixed decimal (1,0).
4/3 is fixed decimal (15,14).*
See Table 16.
It's been that way since 1965.


* given that the maximum precision is 15.



From: IBM Mainframe Discussion List  on
behalf of Robin Vowels 
Sent: Sunday, September 6, 2020 8:09 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

- Original Message -
From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, September 06, 2020 11:07 PM


On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:



And C:
662 $ cat typetest.c
#include 
int main() {
printf( "%10.6f\n",   4/3 * 3.14159 );
printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
663 $ gmake typetest & ./typetest
cc typetest.c   -o typetest
  3.141590
  4.188787

It ought to depend on the types of the operands of the polymorphic
operator, '/'.  What are the default types of '4' and '3'?

The type and precision of constants are as written.
Thus, both 4 and 3 are FIXED DECIMAL (1).


 Does PL/I entirely lack an integer divide?


PL/I can do integer division.  When the operands are of
maximum precision, anm integer result is produced.
Thus, for
DECLARE (I, J) FIXED BINARY (31);
then
I  / J;
produces an integer result of precision (31,0).
Similarly of I and J were defined with maximum precision.

Also, as Seymour Metz points out, the DIVIDE built-in function may
be used to produce an integer result.

Or, you can go ahead with the division, and the result will be 
truncated

to an integer by assigning to an integer variable.  However, that
wastes time with unnecessary computation.


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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread CM Poncelet
"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 & TRUE" instead of "IF foo"?
>
> Second, "ELSE IF ¬TRUE THEN foo" is dead code.
>
> Third, there are no booleans in REXX; the only data type is character string. 
>
>
> --
> Shmuel (Seymour J.) 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 = (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 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 2020 17:39:48 +, Seymour J Metz wrote:
>>> A simple true=1;false=0 should suffice for clarity.
>>>
>> Perhaps not to someone most familiar with shell scripts
>> where the definitions are nearly the opposite (command
>> status ($?) = 0 means success or true).
>>
>>
>> On Sun, 6 Sep 2020 17:43:04 +0100, Rupert Reynolds wrote:
>>> The advantage of Boolean is clarity in something like:-
>>> /* Rexx */
>>> TRUE = (1=1)
>>> ...
>>> SELECT
>>>  WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do
>>>...
>> Continuing your example, how would you have set the variables
>> "GotASCII" and "GotVBMrecord" using the quasi-constants TRUE
>> and FALSE?  Does that enhance either clarity or economy of
>> expression?
>>
>> I'm thinking that something like:
>> if filetype=='ASCII' then GotASCII = TRUE; else GotASCII = FALSE
>> would more succinctly be written:
>> GotASCII = ( filetype=='ASCII' )
>>
>> But I've seen even worse, such as:
>> if  GotASCII = true then ...
>> rather than simply:
>> if  GotASCII then ...
>>
>>
>> On Sun, 6 Sep 2020 19:28:11 +, Seymour J Metz wrote:
>>> Yes, you can count on the truth values of 0 and 1 in REXX never changing.
>>>
>> Only if I spent $60 for the ANSI Standard .pdf
>>
>> -- 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
>
> --
> 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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels

On 2020-09-07 13:05, Joe Monk wrote:

"No it isn't.  4/3 yields 1.33... to 15 digits,
and is of precision (15,14)"

Depends on RULES(IBM) or RULES(ANS). If its RULES(IBM) it will never be
integer division.


It doesn't depend on whether IBM rules or ANS rules are in force.

What I said it correct for IBM rules also.
The result is always an integer.
See Table 16.
When the operands have maximum precision, the result is integer.

The formulas for precision and scale factor are exactly the same.


If its RULES(ANS) and the operands are unscaled, then it
will be integer division.

On Sun, Sep 6, 2020 at 7:34 PM Robin Vowels  
wrote:



On 2020-09-07 09:35, Joe Monk wrote:
> "PL/I doesn't have integers."
>
> Sorry Shmuel, youre incorrect.
>
> FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4
> byte
> integer.
>
> "The ratiio 4/3 is FIXED BIN,"
>
> No, its FIXED DECIMAL (1,0)...

No it isn't.  4/3 yields 1.33... to 15 digits,
and is of precision (15,14)


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


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
TRUEFALS(9): Error #34, Logical value not 0 or 1
IF TVAL THEN SAY 'TVAL'

PRESS ANY KEY TO CONTINUE.
 
;-)
 


On 07/09/2020 03:23, Paul Gilmartin wrote:
> 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.
>>
> No.  In Rexx the only legal Boolean values are:
>FALSETRUE
> ''b  '0001'b  EBCDIC
> '0011'b  '00110001'b  ASCII
>
> -- 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


Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
No, FIXED BIN(15,0) is not an integer, and the precision rules can be very 
annoying to those with a Fortran mindset.


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



From: IBM Mainframe Discussion List  on behalf of Joe 
Monk 
Sent: Sunday, September 6, 2020 7:35 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

"PL/I doesn't have integers."

Sorry Shmuel, youre incorrect.

FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4 byte
integer.

"The ratiio 4/3 is FIXED BIN,"

No, its FIXED DECIMAL (1,0)...

Joe

On Sun, Sep 6, 2020 at 2:33 PM Seymour J Metz  wrote:

> PL/I doesn't have integers. The ratiio 4/3 is FIXED BIN, with some number
> of bits after the binary point.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
>
> 
> From: IBM Mainframe Discussion List  on behalf
> of Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu>
> Sent: Saturday, September 5, 2020 11:33 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Constant Identifiers
>
> On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
> >
> >As for writing formulas, I prefer to follow a well-known formula, thus:
> >
> >volume = 4/3 * 3.14159 * radius**3
> >
> Beware!  Than might left-associate as:
> volume = ( 4/3 ) * 3.14159 * radius**3
> ... and the quotient of integers, 4/3, is 1.
>
> >However, if I'm interested in efficiency, I'd prefer
> >
> >volume = 4 * 3.14159E0 / 3 * radius**3
> >
> ... (and correct.)
>
> -- 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
>

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


Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
4/3 yields 1.3, 04/3 yields 1332, ...

However, DIVIDE(4,3,16,15) yields 1.3...2 to 15 digits


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



From: IBM Mainframe Discussion List  on behalf of 
Robin Vowels 
Sent: Sunday, September 6, 2020 7:58 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu>
To: 
Sent: Sunday, September 06, 2020 1:33 PM


On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
>
>As for writing formulas, I prefer to follow a well-known formula, thus:
>
>volume = 4/3 * 3.14159 * radius**3
>
Beware!  Than might left-associate as:
volume = ( 4/3 ) * 3.14159 * radius**3

"might"?
Evaluation MUST proceed left to right.
So, whether it is written as 4/3 or (4/3), the division will be done first.

> ... and the quotient of integers, 4/3, is 1.

As I indicaed before, 4/3 yields 1.333.to 15 digits.

>However, if I'm interested in efficiency, I'd prefer
>
>volume = 4 * 3.14159E0 / 3 * radius**3
>
... (and correct.)

Yes, it's correct, but I wrote it that way in order to avoid unnecessary
conversions and arithmetic in fixed-point.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
No: see 
https://www.ibm.com/support/knowledgecenter/SSY2V3_5.3.0/lr/resarithoprt.html#resarithoprt__fig16,
 Tables 3 and 4. For 4/3, the scale factor is 1, not 0.


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



From: IBM Mainframe Discussion List  on behalf of 
Robin Vowels 
Sent: Sunday, September 6, 2020 8:09 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

- Original Message -
From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, September 06, 2020 11:07 PM


On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:
>>>
And C:
662 $ cat typetest.c
#include 
int main() {
printf( "%10.6f\n",   4/3 * 3.14159 );
printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
663 $ gmake typetest & ./typetest
cc typetest.c   -o typetest
  3.141590
  4.188787

It ought to depend on the types of the operands of the polymorphic
operator, '/'.  What are the default types of '4' and '3'?

The type and precision of constants are as written.
Thus, both 4 and 3 are FIXED DECIMAL (1).

>  Does PL/I entirely lack an integer divide?

PL/I can do integer division.  When the operands are of
maximum precision, anm integer result is produced.
Thus, for
DECLARE (I, J) FIXED BINARY (31);
then
I  / J;
produces an integer result of precision (31,0).
Similarly of I and J were defined with maximum precision.

Also, as Seymour Metz points out, the DIVIDE built-in function may
be used to produce an integer result.

Or, you can go ahead with the division, and the result will be truncated
to an integer by assigning to an integer variable.  However, that
wastes time with unnecessary computation.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: Ransoming a mainframe disk farm

2020-09-06 Thread Brian Westerman
Or you just write protect all of your backups on virtual tape.

Brian

On Sat, 5 Sep 2020 15:38:04 +, Russell Witt  wrote:

>John,
>But what happens if the virtual tape environment itself was over-written? That 
>is where the concept of "virtual WORM" devices can help. A virtual WORM volume 
>cannot be over-written. And if your tape management system itself is 
>protected, the tapes will not be scratched until they should be (cycle control 
>or GDG limit or xxx days). While the concept of a virtual WORM seems bizarre 
>(its virtual, not physical) - the ability to protect against over-writing is a 
>huge safe-guard if you are seriously worried about some type of insider 
>threat. After all, the first thing a good insider hack would target is the 
>audit trail of their own activities and most commonly that audit trail will be 
>backed up on tape. 
>Russell Wittopinions are all my own (and I have a lot of them)
>
>
>-Original Message-
>From: John McKown 
>To: IBM-MAIN@LISTSERV.UA.EDU
>Sent: Sat, Sep 5, 2020 6:47 am
>Subject: Re: Ransoming a mainframe disk farm
>
>If I were to consider this (which I don't because my shop _is_ going away
>1Q2021), what I would do is have a "golden image" (aka sysprog sandbox or
>the GI) in a different LPAR. This image would have access to all attached
>devices, including sharing a virtual tape environment. But the "core"
>volumes would be _isolated_ from all other LPARs via the IODF / HCD. This
>would include the GI specific catalogs (at least the master) and RACF (or
>TSS or ACF2) database. The GI would do at least weekly backups of all the
>volumes to the virtual tape. So the GI could be used to recover the other
>systems' volumes.
>
>If there is no virtual tape environment, then there needs to be a separate,
>GI only, set of DASD which would be used for the backups of the real
>volumes. Of course, this doubles the size of your DASD farm. For the truly
>paranoid, and rich, this DASD would be on an entirely separate array which
>is not accessible from any LPAR other than the GI LPAR.
>
>Or, as I have actually done, use DFDSS (or FDR or ???) to make volume level
>backups & download them to a USB drive. USB drives can be mind boggling
>huge today. I saw a flash drive with 1TiB. But an USB attached SSD can be
>even bigger. LIke this 16TiB USB 3.0 attached, encrypted, array: (there is
>also a 30 TiB array -- of course you'll need a lot if you're talking about
>a PetaByte environment).
>
>https://smile.amazon.com/Buslink-CipherShield-CSE16TSSDB4SU3-Hardware-Encrypted/dp/B01JVVHYZM/ref=sr_1_2?dchild=1=usb+ssd_rd_r=5a1bbdc9-acaa-48d2-9518-4bcd087cd0d8_rd_w=OrRWX_rd_wg=6dxyr_rd_p=e47220c0-687b-448f-b180-4a20654b7464_rd_r=8BZ5ET5XHGMBMD3A23E7=1599306202=p_n_feature_three_browse-bin%3A6797522011=pc=1-2
>
>
>On Fri, Sep 4, 2020 at 1:51 PM Jesse 1 Robinson 
>wrote:
>
>> It’s Friday, so don’t rag on me for venturing into IT fiction. No one has
>> hit us with this challenge (yet), but it could happen.
>>
>> Ransomware is much in the news these days. As unlikely as it might be,
>> some nefarious genius manages to lock you out of your entire disk farm and
>> demands rubies and bitcoin to remove the lock. Meanwhile your shop is out
>> of the water. You have everything meticulously mirrored to another site,
>> but as with any good mirror, the lock has been reflected in your recovery
>> site.
>>
>> The classic mainframe response--short of forking over the ransom--would be
>> to IPL a standalone DSS restore tape, then locate and mount standard
>> offload backup tapes. Restore enough key volumes to IPL a minimal system,
>> then proceed to restore (all) other volumes. It will take a while, but it
>> will work. Eventually.
>>
>> Now consider a smartly modern shop that has taken the advice of a
>> generation of hired gurus and eliminated 'real tape' altogether. No more
>> physical tapes. No more physical tape drives.
>>
>> What would be your sage advice?
>>
>> .
>> .
>> J.O.Skip Robinson
>> Southern California Edison Company
>> Electric Dragon Team Paddler
>> SHARE MVS Program Co-Manager
>> 323-715-0595 Mobile
>> 626-543-6132 Office ⇐=== NEW
>> robin...@sce.com
>>
>>
>> --
>> 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
>
>--
>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: 

Re: Ransoming a mainframe disk farm

2020-09-06 Thread Brian Westerman
NO, but you can very easily IPL those utilities from virtual tape.  In fact, 
one of the first things I do when I enter a site to maintain it is create a 
single pack IPL volume of their running system and DFdss it to virtual tape and 
I make (several) copies of the various IPLable utilities on separate tapes.  I 
have other stuff that I do for the catalogs which is probably also overkill.  I 
also have ZZSA ready to go on a DASD volume and a recoverable virtual tape.  I 
have never needed to revert to using the SAIPL volume or ZZSA but I test it 
quarterly anyway. 

Brian

On Fri, 4 Sep 2020 19:53:11 +, Gibney, Dave  wrote:

>You can IPL Standalone DSS or FDR from CD
>
>> ---O-Original Message-
>> From: IBM Mainframe Discussion List  On
>> Behalf Of Jesse 1 Robinson
>> Sent: Friday, September 04, 2020 11:51 AM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Ransoming a mainframe disk farm
>> 
>> It’s Friday, so don’t rag on me for venturing into IT fiction. No one has 
>> hit us
>> with this challenge (yet), but it could happen.
>> 
>> Ransomware is much in the news these days. As unlikely as it might be, some
>> nefarious genius manages to lock you out of your entire disk farm and
>> demands rubies and bitcoin to remove the lock. Meanwhile your shop is out
>> of the water. You have everything meticulously mirrored to another site, but
>> as with any good mirror, the lock has been reflected in your recovery site.
>> 
>> The classic mainframe response--short of forking over the ransom--would be
>> to IPL a standalone DSS restore tape, then locate and mount standard offload
>> backup tapes. Restore enough key volumes to IPL a minimal system, then
>> proceed to restore (all) other volumes. It will take a while, but it will 
>> work.
>> Eventually.
>> 
>> Now consider a smartly modern shop that has taken the advice of a
>> generation of hired gurus and eliminated 'real tape' altogether. No more
>> physical tapes. No more physical tape drives.
>> 
>> What would be your sage advice?
>> 
>> .
>> .
>> J.O.Skip Robinson
>> Southern California Edison Company
>> Electric Dragon Team Paddler
>> SHARE MVS Program Co-Manager
>> 323-715-0595 Mobile
>> 626-543-6132 Office ⇐=== NEW
>> robin...@sce.com
>> 
>> 
>> --
>> 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

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


Re: ILR012W ALL LOCAL PAGING SPACE IS FULL OR BAD, ASM WAIT03C RSN=01

2020-09-06 Thread Barbara Nitz
>  ASSBNVSC and ASSBVSC tell you the number of slots each address space is 
>using.  You can look at those in the dump.

To make that easier, use the IPCS 'hidden' panels, specifically 2.6i (that's 
the level2 toolkit). Use SLOTCNT, it will do the math for you and you'll see 
the who gobbled up your aux. (I haven't tried it on SCM storage, so I just hope 
it works for that as well as it did for DASD AUX.)
You can (and should) use the same command for comparison with the crashed 
system. I believe this command works when set to active storage. You may be 
surprised which address spaces use *a lot* regularly.

Regards, Barbara

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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
First, that code is highly obfuscated. Why would you ever want to write "IF foo 
& TRUE" instead of "IF foo"?

Second, "ELSE IF ¬TRUE THEN foo" is dead code.

Third, there are no booleans in REXX; the only data type is character string. 


--
Shmuel (Seymour J.) 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 = (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 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 2020 17:39:48 +, Seymour J Metz wrote:
>> A simple true=1;false=0 should suffice for clarity.
>>
> Perhaps not to someone most familiar with shell scripts
> where the definitions are nearly the opposite (command
> status ($?) = 0 means success or true).
>
>
> On Sun, 6 Sep 2020 17:43:04 +0100, Rupert Reynolds wrote:
>> The advantage of Boolean is clarity in something like:-
>> /* Rexx */
>> TRUE = (1=1)
>> ...
>> SELECT
>>  WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do
>>...
> Continuing your example, how would you have set the variables
> "GotASCII" and "GotVBMrecord" using the quasi-constants TRUE
> and FALSE?  Does that enhance either clarity or economy of
> expression?
>
> I'm thinking that something like:
> if filetype=='ASCII' then GotASCII = TRUE; else GotASCII = FALSE
> would more succinctly be written:
> GotASCII = ( filetype=='ASCII' )
>
> But I've seen even worse, such as:
> if  GotASCII = true then ...
> rather than simply:
> if  GotASCII then ...
>
>
> On Sun, 6 Sep 2020 19:28:11 +, Seymour J Metz wrote:
>> Yes, you can count on the truth values of 0 and 1 in REXX never changing.
>>
> Only if I spent $60 for the ANSI Standard .pdf
>
> -- 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

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


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 McLean */

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Jeremy Nicoll
Sent: Saturday, September 5, 2020 17:18

Why   (0-fx)+2when  2-fxis simpler?

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

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


Re: Constant Identifiers

2020-09-06 Thread Joe Monk
"No it isn't.  4/3 yields 1.33... to 15 digits,
and is of precision (15,14)"

Depends on RULES(IBM) or RULES(ANS). If its RULES(IBM) it will never be
integer division. If its RULES(ANS) and the operands are unscaled, then it
will be integer division.

Joe

On Sun, Sep 6, 2020 at 7:34 PM Robin Vowels  wrote:

> On 2020-09-07 09:35, Joe Monk wrote:
> > "PL/I doesn't have integers."
> >
> > Sorry Shmuel, youre incorrect.
> >
> > FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4
> > byte
> > integer.
> >
> > "The ratiio 4/3 is FIXED BIN,"
> >
> > No, its FIXED DECIMAL (1,0)...
>
> No it isn't.  4/3 yields 1.33... to 15 digits,
> and is of precision (15,14)
>
> --
> 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


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.
> 
No.  In Rexx the only legal Boolean values are:
   FALSETRUE
''b  '0001'b  EBCDIC
'0011'b  '00110001'b  ASCII

-- gil

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


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 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 2020 17:39:48 +, Seymour J Metz wrote:
>> A simple true=1;false=0 should suffice for clarity.
>>
> Perhaps not to someone most familiar with shell scripts
> where the definitions are nearly the opposite (command
> status ($?) = 0 means success or true).
>
>
> On Sun, 6 Sep 2020 17:43:04 +0100, Rupert Reynolds wrote:
>> The advantage of Boolean is clarity in something like:-
>> /* Rexx */
>> TRUE = (1=1)
>> ...
>> SELECT
>>  WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do
>>...
> Continuing your example, how would you have set the variables
> "GotASCII" and "GotVBMrecord" using the quasi-constants TRUE
> and FALSE?  Does that enhance either clarity or economy of
> expression?
>
> I'm thinking that something like:
> if filetype=='ASCII' then GotASCII = TRUE; else GotASCII = FALSE
> would more succinctly be written:
> GotASCII = ( filetype=='ASCII' )
>
> But I've seen even worse, such as:
> if  GotASCII = true then ...
> rather than simply:
> if  GotASCII then ...
>
>
> On Sun, 6 Sep 2020 19:28:11 +, Seymour J Metz wrote:
>> Yes, you can count on the truth values of 0 and 1 in REXX never changing.
>>
> Only if I spent $60 for the ANSI Standard .pdf
>
> -- 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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels

On 2020-09-07 09:35, Joe Monk wrote:

"PL/I doesn't have integers."

Sorry Shmuel, youre incorrect.

FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4 
byte

integer.

"The ratiio 4/3 is FIXED BIN,"

No, its FIXED DECIMAL (1,0)...


No it isn't.  4/3 yields 1.33... to 15 digits,
and is of precision (15,14)

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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels

From: "Bob Bridges" 
Sent: Monday, September 07, 2020 8:29 AM



To tell you the truth, I haven't written for a compiler in long enough that
I don't have any idea which ones do what.  I wouldn't trust REXX, CLIST or
VBA to do it; I try to assume the worst, and make such things explicit.

Actually I might not trust a compiler to do it, either, even if I knew that
you're right.  I'm just not very trusting about such things.

(And it's not ~very~ obfuscatory.  In real life I'd include a comment,
something like this:

 SphereVolConst=4/3*3.14159E0 /* for calculating the volume of a sphere
inside the loop */


Why do that, when the compiler will probably do it for you,
or, if it doesn't, it will evaluate the constant part at compilation time --
which is effectively the same thing.


That looks like a lot of documentation, to some programmers.  But the older
I get, the more comments I write into even fairly simple programs.)


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels

From: "Robert Prins" 
Sent: Monday, September 07, 2020 3:42 AM



On 2020-09-06 13:07, Paul Gilmartin wrote:

On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:



Beware!  Than might left-associate as:
 volume = ( 4/3 ) * 3.14159 * radius**3
... and the quotient of integers, 4/3, is 1.


No it's not. 4/3 yields 1.33.. to 15 digits in PL/I.
You're thinking of FORTRAN.


And C:
662 $ cat typetest.c
#include 
int main() {
 printf( "%10.6f\n",   4/3 * 3.14159 );
 printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
663 $ gmake typetest & ./typetest
cc typetest.c   -o typetest
   3.141590
   4.188787

It ought to depend on the types of the operands of the polymorphic
operator, '/'.  What are the default types of '4' and '3'?  Does PL/I
entirely lack an integer divide?


No,


Yes it does.
In an earlier letter, I pointed out that when both integer operands
for division are of the same type and are of maximum precision
PL/I produces an integer result.


if the receiving variable is an integer without fractional part, PL/I truncates.


Yes, it can do that too.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
- Original Message - 
From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu>

Sent: Sunday, September 06, 2020 11:07 PM


On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:



And C:
662 $ cat typetest.c
#include 
int main() {
   printf( "%10.6f\n",   4/3 * 3.14159 );
   printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
663 $ gmake typetest & ./typetest
cc typetest.c   -o typetest
 3.141590
 4.188787

It ought to depend on the types of the operands of the polymorphic
operator, '/'.  What are the default types of '4' and '3'?

The type and precision of constants are as written.
Thus, both 4 and 3 are FIXED DECIMAL (1).


 Does PL/I entirely lack an integer divide?


PL/I can do integer division.  When the operands are of
maximum precision, anm integer result is produced.
Thus, for
DECLARE (I, J) FIXED BINARY (31);
then
I  / J;
produces an integer result of precision (31,0).
Similarly of I and J were defined with maximum precision.

Also, as Seymour Metz points out, the DIVIDE built-in function may
be used to produce an integer result.

Or, you can go ahead with the division, and the result will be truncated
to an integer by assigning to an integer variable.  However, that
wastes time with unnecessary computation.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels

From: "Paul Gilmartin" <000433f07816-dmarc-requ...@listserv.ua.edu>
To: 
Sent: Sunday, September 06, 2020 1:33 PM


On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:


As for writing formulas, I prefer to follow a well-known formula, thus:

volume = 4/3 * 3.14159 * radius**3


Beware!  Than might left-associate as:
   volume = ( 4/3 ) * 3.14159 * radius**3

"might"?
Evaluation MUST proceed left to right.
So, whether it is written as 4/3 or (4/3), the division will be done first.


... and the quotient of integers, 4/3, is 1.


As I indicaed before, 4/3 yields 1.333.to 15 digits.


However, if I'm interested in efficiency, I'd prefer

volume = 4 * 3.14159E0 / 3 * radius**3


... (and correct.)

Yes, it's correct, but I wrote it that way in order to avoid unnecessary
conversions and arithmetic in fixed-point.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: Constant Identifiers

2020-09-06 Thread Joe Monk
"PL/I doesn't have integers."

Sorry Shmuel, youre incorrect.

FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4 byte
integer.

"The ratiio 4/3 is FIXED BIN,"

No, its FIXED DECIMAL (1,0)...

Joe

On Sun, Sep 6, 2020 at 2:33 PM Seymour J Metz  wrote:

> PL/I doesn't have integers. The ratiio 4/3 is FIXED BIN, with some number
> of bits after the binary point.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
>
> 
> From: IBM Mainframe Discussion List  on behalf
> of Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu>
> Sent: Saturday, September 5, 2020 11:33 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Constant Identifiers
>
> On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
> >
> >As for writing formulas, I prefer to follow a well-known formula, thus:
> >
> >volume = 4/3 * 3.14159 * radius**3
> >
> Beware!  Than might left-associate as:
> volume = ( 4/3 ) * 3.14159 * radius**3
> ... and the quotient of integers, 4/3, is 1.
>
> >However, if I'm interested in efficiency, I'd prefer
> >
> >volume = 4 * 3.14159E0 / 3 * radius**3
> >
> ... (and correct.)
>
> -- 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
>

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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
- Original Message - 
From: "Seymour J Metz" 

To: 
Sent: Monday, September 07, 2020 5:33 AM



PL/I doesn't have integers.


PL/I has always had integers.


The ratiio 4/3 is FIXED BIN,


No it not.  It is FIXED DECIMAL -- as I said a few days ago.
And it hasn't changed since.


with some number of bits after the binary point.


DECIMAL digits after the decimal point, because the reault
is FIXED DECIMAL, not binary.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels
"Seymour J Metz"  wrote in message 
news:bl0pr05mb5156591ed17d7bddfaee695299...@bl0pr05mb5156.namprd05.prod.outlook.com...

The default type for 3 and 4 is FIXED BINARY.

No it's not.

Constants have the type and precision of the constant.

Thus, 3 and 4 are both FIXED DECIMAL (1)

> PL/I does not have an integer type,

Yes it does,.
DECLARE X FIXED BINARY;
defines an integer variable X.


but the DIVIDE() BIF can be used to do an integer divide, and assigning a 
quotient to a
FIXED BIN(foo,0) variable may do what you want, depending on precision issues. 



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
First, things that you do to trick a compiler into generating more efficient 
code can result in less efficient code. Second, comments may be essential but 
so are good names and maintainable code. If you want to have the people who 
update your code to bless you, use names instead of magic numbers. 
Approximations to constants lie Pi and e should have suitable names in case 
someone needs more precision. more precision.


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



From: IBM Mainframe Discussion List  on behalf of Bob 
Bridges 
Sent: Sunday, September 6, 2020 6:29 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

To tell you the truth, I haven't written for a compiler in long enough that
I don't have any idea which ones do what.  I wouldn't trust REXX, CLIST or
VBA to do it; I try to assume the worst, and make such things explicit.

Actually I might not trust a compiler to do it, either, even if I knew that
you're right.  I'm just not very trusting about such things.

(And it's not ~very~ obfuscatory.  In real life I'd include a comment,
something like this:

  SphereVolConst=4/3*3.14159E0 /* for calculating the volume of a sphere
inside the loop */

That looks like a lot of documentation, to some programmers.  But the older
I get, the more comments I write into even fairly simple programs.)

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* I'm told that Wagner's music is not as bad as it sounds.  -Mark Twain */

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Robin Vowels
Sent: Saturday, September 5, 2020 23:09

That's obfuscation.
If it's in a loop,  I'd expect the compiler to move the constant part
outside of the loop,
or to evaluate the constant part at compilation time.

In any case, the more efficient form eliminates the division 4/3,
avoiding the avaluation in fixed-point form (and the conversion
to floating-point).

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Seymour J Metz
Sent: Saturday, September 5, 2020 21:47

Don't most compilers these days do constant folding?

- Original Message -
From: "Bob Bridges" 
Sent: Sunday, September 06, 2020 6:18 AM

> When you care about efficiency, I'd think this would be better:
>
>  const=4/3*3.14159E0 /* in the initialization */
>  volume=const*radius**3 /* inside the loop */
>
> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of Robin Vowels
> Sent: Friday, September 4, 2020 18:14
>
> As for writing formulas, I prefer to follow a well-known formula, thus:
>
>   volume = 4/3 * 3.14159 * radius**3
>
> However, if I'm interested in efficiency, I'd prefer
>
>   volume = 4 * 3.14159E0 / 3 * radius**3

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


Re: Simple JES2 spool offload question

2020-09-06 Thread Roger Bolan
See Tuning work selection criteria

about 2/3 of the way down the page it talks about using JOBNAME to the left
or right of the slash in more detail.
--Roger

On Fri, Sep 4, 2020 at 11:25 AM Pommier, Rex 
wrote:

> Hi List,
>
> I have a question that has puzzled me on and off for years regarding the
> work selection criteria for the JES2 spool offload facility.  That is the
> use of the slash.  I get the part about criteria left of the slash being
> required, i.e. if you have JOBNAME=ABCDE and WS=(JOB/) only output from
> jobs named ABCDE will get selected.  What does it mean that a selection
> criteria to the right of the slash means it is preferred?  I mean, I would
> assume JES is either going to select the SYSOUT or it isn't.
>
> This is from the JES2 init and tuning reference - item 3 is the puzzler to
> me:
>
> A slash can be used within the work selection list to further specify work
> selection. The use of a slash has the following general meaning: 1) those
> criterion listing several specifications is prioritized in a left to right
> priority order when placed to the left of the slash; 2) the placement of a
> criterion to the left of the slash indicates a required exact match of work
> selection and job criteria; and 3) placement of a criterion to the right of
> the slash indicates a preferred (but not required match) of work selection
> and job criteria.
>
> Sounded like a good question for a Friday.
>
> TIA,
> Rex
>
>
> The information contained in this message is confidential, protected from
> disclosure and may be legally privileged.  If the reader of this message is
> not the intended recipient or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby notified
> that any disclosure, distribution, copying, or any action taken or action
> omitted in reliance on it, is strictly prohibited and may be unlawful.  If
> you have received this communication in error, please notify us immediately
> by replying to this message and destroy the material in its entirety,
> whether in electronic or hard copy format.  Thank you.
>
>
> --
> 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


Re: Constant Identifiers

2020-09-06 Thread Bob Bridges
To tell you the truth, I haven't written for a compiler in long enough that
I don't have any idea which ones do what.  I wouldn't trust REXX, CLIST or
VBA to do it; I try to assume the worst, and make such things explicit.

Actually I might not trust a compiler to do it, either, even if I knew that
you're right.  I'm just not very trusting about such things.

(And it's not ~very~ obfuscatory.  In real life I'd include a comment,
something like this:

  SphereVolConst=4/3*3.14159E0 /* for calculating the volume of a sphere
inside the loop */

That looks like a lot of documentation, to some programmers.  But the older
I get, the more comments I write into even fairly simple programs.)

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* I'm told that Wagner's music is not as bad as it sounds.  -Mark Twain */

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Robin Vowels
Sent: Saturday, September 5, 2020 23:09

That's obfuscation.
If it's in a loop,  I'd expect the compiler to move the constant part
outside of the loop,
or to evaluate the constant part at compilation time.

In any case, the more efficient form eliminates the division 4/3,
avoiding the avaluation in fixed-point form (and the conversion
to floating-point).

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Seymour J Metz
Sent: Saturday, September 5, 2020 21:47

Don't most compilers these days do constant folding?

- Original Message - 
From: "Bob Bridges" 
Sent: Sunday, September 06, 2020 6:18 AM

> When you care about efficiency, I'd think this would be better:
> 
>  const=4/3*3.14159E0 /* in the initialization */
>  volume=const*radius**3 /* inside the loop */
> 
> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of Robin Vowels
> Sent: Friday, September 4, 2020 18:14
> 
> As for writing formulas, I prefer to follow a well-known formula, thus:
> 
>   volume = 4/3 * 3.14159 * radius**3
> 
> However, if I'm interested in efficiency, I'd prefer
> 
>   volume = 4 * 3.14159E0 / 3 * radius**3

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


Re: Constant Identifiers

2020-09-06 Thread Bob Bridges
Ah, that makes more sense than my first guess.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* Logic is an organized way of going wrong with confidence.  -Kettering's
Law, quoted in _The Number of the Beast_ by Robert A Heinlein. */

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Jeremy Nicoll
Sent: Saturday, September 5, 2020 17:22

He meant defining  TWO = 2   earlier.

--- On Sat, 5 Sep 2020, at 21:21, Bob Bridges wrote:
> Going back to the beginning, Gil:  SQRT(X**TWO+Y**TWO) looks like 
> ~exactly~ the sort of thing that oughta be made a constant rather than 
> being coded more than once.  That is, if X, Y and TWO all constants 
> themselves; and if they are not then this isn't an example of what 
> you're talking about.  Did you accidentally reverse your meaning?  Or 
> what am I missing?

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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
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 ARPA? As for the WWW, I'd rather we
> had stuck to Gopher.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://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 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  :-)
>
> On Sun, 6 Sep 2020 at 20:56, Seymour J Metz  wrote:
>
> > All REXX implementations use 0 and 1 for false and true. But I agree that
> > loss of Internet access is crippling. May this be the last time.
> >
> >
> > --
> > Shmuel (Seymour J.) Metz
>
>

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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
You didn't read The World According to ARPA? As for the WWW, I'd rather we had 
stuck to Gopher.


--
Shmuel (Seymour J.) Metz
http://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 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  :-)

On Sun, 6 Sep 2020 at 20:56, Seymour J Metz  wrote:

> All REXX implementations use 0 and 1 for false and true. But I agree that
> loss of Internet access is crippling. May this be the last time.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
>
>

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


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

On Sun, 6 Sep 2020 at 20:56, Seymour J Metz  wrote:

> All REXX implementations use 0 and 1 for false and true. But I agree that
> loss of Internet access is crippling. May this be the last time.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
>
>

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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
All REXX implementations use 0 and 1 for false and true. But I agree that loss 
of Internet access is crippling. May this be the last time.


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



From: IBM Mainframe Discussion List  on behalf 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 whether 1 always represents Boolean true, or whether it's
implementation dependent. TRUE = (1=1) acts as a reminder.

/Now/ I have access to the docs, but I only write for Regina Rexx and for
my own use, so it doesn't matter so much. I'm porting something, and Rexx's
string handling and stems make it a clear choice for this job :-)

Rupert

On Sun, 6 Sep 2020 at 18:39, Seymour J Metz  wrote:

> A simple true=1;false=0 should suffice for clarity.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
>
> 
> From: IBM Mainframe Discussion List  on behalf
> of Rupert Reynolds 
> Sent: Sunday, September 6, 2020 12:43 PM
> To: IBM-MAIN@LISTSERV.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)
> ...
> SELECT
>   WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do
>
> (from a similar exec I found in archives, not the same one)
>
> The disadvantage is that it looks and works like a constant, but it's a
> variable.
>
> Rupert
>
> On Sun, 6 Sep 2020 at 17:03, scott Ford  wrote:
>
> > I have done things like true =‘Y’ and then
> >
> > If true
> >   ..
> > end
> >
> >
>
> --
> 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
>

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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Rupert Reynolds
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 whether 1 always represents Boolean true, or whether it's
implementation dependent. TRUE = (1=1) acts as a reminder.

/Now/ I have access to the docs, but I only write for Regina Rexx and for
my own use, so it doesn't matter so much. I'm porting something, and Rexx's
string handling and stems make it a clear choice for this job :-)

Rupert

On Sun, 6 Sep 2020 at 18:39, Seymour J Metz  wrote:

> A simple true=1;false=0 should suffice for clarity.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
>
> 
> From: IBM Mainframe Discussion List  on behalf
> of Rupert Reynolds 
> Sent: Sunday, September 6, 2020 12:43 PM
> To: IBM-MAIN@LISTSERV.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)
> ...
> SELECT
>   WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do
>
> (from a similar exec I found in archives, not the same one)
>
> The disadvantage is that it looks and works like a constant, but it's a
> variable.
>
> Rupert
>
> On Sun, 6 Sep 2020 at 17:03, scott Ford  wrote:
>
> > I have done things like true =‘Y’ and then
> >
> > If true
> >   ..
> > end
> >
> >
>
> --
> 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
>

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


ZIGI Version 3.02 Released

2020-09-06 Thread Lionel B Dyck
The z/OS ISPF Git Interface version 3 release 02 has just been released. 

 

See https://zigi.rocks for more info and to clone get it here at
https://github.com/wizardofzos/zigi

 

If you haven't installed Git on z/OS then go to
https://github.com/wizardofzos/zigi/wiki/0.-Installing-GIT for a checklist
on what you need to do to install Git.

 

If you don't do Git (yet) then it will be available shortly on the updates
page at https://cbttape.org in File 997 (but give it a few days to get
through the process and get onto the site).

 

It contains the following updates and fixes

 

 ZIGI Release Notes


   Version 3.02


 


 New Features and Functions


 --


 


Support a Read Only Repository. These must be Created and Cloning is not
recommended. Only operations that copy from z/OS to OMVS are supported with
no updates to the z/OS datasets allowed from within ZIGI. Thus Branch,
Replace, Merge, Stash, Flow, Edit, History Recover, Rename, and Remove are
prevented.


 


Anytime a z/OS dataset will be replaced there will be prompt to inform the
user of this and allow the user to (a) change the HLQ, (b) the # of
qualifiers to ignore, or both before proceeding. Or to cancel the operation.
This is to prevent the replacement of any dataset without overt permission.
This will only occur during a Clone or Replace operation.


 


Update the Delete/Remove Repository from ZIGI more user friendly and thus
easier to use and understand.


 


Support multiple prefixes (HLQs) on the dataset add panel.


 


  Bug Fixes and Other Updates:


  


 


1. On the Add Dataset Panel do NOT allow the ignore qualifiers to be changed
from 0.  

2. After Stash Pop leave the Stash List display.


3. On a Clone of a non-ZIGI repository do not create .gitattributes or
.zigi/dsn


4. Allow changing Prefix (HLQ) in AddDSN table if ignore is 0


5. If ignore is 0 correctly detect added datasets


6. Remove calls to call work_with_repo_file and call update_repo_metadata
after updating a PDS member within ZIGI as not needed and speeds things up a
tad. 

 

 

Lionel B. Dyck <
Website:   https://www.lbdsoftware.com

"Worry more about your character than your reputation.  Character is what
you are, reputation merely what others think you are." - John Wooden

 


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


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 2020 17:39:48 +, Seymour J Metz wrote:
>
>A simple true=1;false=0 should suffice for clarity.
>
Perhaps not to someone most familiar with shell scripts
where the definitions are nearly the opposite (command
status ($?) = 0 means success or true).


On Sun, 6 Sep 2020 17:43:04 +0100, Rupert Reynolds wrote:
>
>The advantage of Boolean is clarity in something like:-
>/* Rexx */
>TRUE = (1=1)
>...
>SELECT
>  WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do
>...
Continuing your example, how would you have set the variables
"GotASCII" and "GotVBMrecord" using the quasi-constants TRUE
and FALSE?  Does that enhance either clarity or economy of
expression?

I'm thinking that something like:
if filetype=='ASCII' then GotASCII = TRUE; else GotASCII = FALSE
would more succinctly be written:
GotASCII = ( filetype=='ASCII' )

But I've seen even worse, such as:
if  GotASCII = true then ...
rather than simply:
if  GotASCII then ...


On Sun, 6 Sep 2020 19:28:11 +, Seymour J Metz wrote:
>
>Yes, you can count on the truth values of 0 and 1 in REXX never changing.
>
Only if I spent $60 for the ANSI Standard .pdf

-- gil

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


Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
PL/I doesn't have integers. The ratiio 4/3 is FIXED BIN, with some number of 
bits after the binary point.


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



From: IBM Mainframe Discussion List  on behalf of 
Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Saturday, September 5, 2020 11:33 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
>
>As for writing formulas, I prefer to follow a well-known formula, thus:
>
>volume = 4/3 * 3.14159 * radius**3
>
Beware!  Than might left-associate as:
volume = ( 4/3 ) * 3.14159 * radius**3
... and the quotient of integers, 4/3, is 1.

>However, if I'm interested in efficiency, I'd prefer
>
>volume = 4 * 3.14159E0 / 3 * radius**3
>
... (and correct.)

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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Yes, you can count on the truth values of 0 and 1 in REXX never changing.


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



From: IBM Mainframe Discussion List  on behalf of 
Rupert Reynolds 
Sent: Sunday, September 6, 2020 8:12 AM
To: IBM-MAIN@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 and clearer.

But someone will reuse my code another day (perhaps me), and without the
WWW or access to the proper Rexx docs, can I rely on '1' and '0' always
being equivalent to the Boolean true and false, in every version of every
interpreter and perhaps compilers as well?

This was not like (say) PL/1, in which a bit(1) with the value '1'b had a
precise meaning for Boolean logic, stated in a book already sat on my desk
:-)

Using TRUE and FALSE like constants from the top made it clear to anyone
viewing it, and fairly easy to find and change in the code, if necessary.

It worked, BTW. As I remember things, it found the bug before my coffee mug
was empty, but a few days later they cancelled the software licence over a
different, bigger bug. Ho-hum :-)

Rupert

On Sat., Sep. 5, 2020, 23:56 Paul Gilmartin, <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

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

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


Re: Constant Identifiers

2020-09-06 Thread Seymour J Metz
The default type for 3 and 4 is FIXED BINARY. PL/I does not have an integer 
type, but the DIVIDE() BIF can be used to do an integer divide, and assigning a 
quotient to a FIXED BIN(foo,0) variable may do what you want, depending on 
precision issues. 

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



From: IBM Mainframe Discussion List  on behalf of 
Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, September 6, 2020 9:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Constant Identifiers

On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:
>>>
>> Beware!  Than might left-associate as:
>> volume = ( 4/3 ) * 3.14159 * radius**3
>> ... and the quotient of integers, 4/3, is 1.
>
>No it's not. 4/3 yields 1.33.. to 15 digits in PL/I.
>You're thinking of FORTRAN.
>
And C:
662 $ cat typetest.c
#include 
int main() {
printf( "%10.6f\n",   4/3 * 3.14159 );
printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
663 $ gmake typetest & ./typetest
cc typetest.c   -o typetest
  3.141590
  4.188787

It ought to depend on the types of the operands of the polymorphic
operator, '/'.  What are the default types of '4' and '3'?  Does PL/I
entirely lack an integer divide?

The Language Ref. properly cautions that a constant declaration may
be necessary to control the constant types.

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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
Why? I don't even see why it would work, and it certainly does add clarity.


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



From: IBM Mainframe Discussion List  on behalf of 
scott Ford 
Sent: Sunday, September 6, 2020 12:03 PM
To: IBM-MAIN@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
>
> 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 without the
>
> WWW or access to the proper Rexx docs, can I rely on '1' and '0' always
>
> being equivalent to the Boolean true and false, in every version of every
>
> interpreter and perhaps compilers as well?
>
>
>
> This was not like (say) PL/1, in which a bit(1) with the value '1'b had a
>
> precise meaning for Boolean logic, stated in a book already sat on my desk
>
> :-)
>
>
>
> Using TRUE and FALSE like constants from the top made it clear to anyone
>
> viewing it, and fairly easy to find and change in the code, if necessary.
>
>
>
> It worked, BTW. As I remember things, it found the bug before my coffee mug
>
> was empty, but a few days later they cancelled the software licence over a
>
> different, bigger bug. Ho-hum :-)
>
>
>
> Rupert
>
>
>
> On Sat., Sep. 5, 2020, 23:56 Paul Gilmartin, <
>
> 000433f07816-dmarc-requ...@listserv.ua.edu> wrote:
>
>
>
> > 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 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 :-)
>
> >
>
> >
>
>
>
> --
>
> For IBM-MAIN subscribe / signoff / archive access instructions,
>
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
Scott Ford
IDMWORKS
z/OS Development

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


Re: REXX true/false (was Constant Identifiers)

2020-09-06 Thread Seymour J Metz
A simple true=1;false=0 should suffice for clarity.


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



From: IBM Mainframe Discussion List  on behalf of 
Rupert Reynolds 
Sent: Sunday, September 6, 2020 12:43 PM
To: IBM-MAIN@LISTSERV.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)
...
SELECT
  WHEN logmode = "D4A32782" & (GotASCII & GotVBMrecord) THEN do

(from a similar exec I found in archives, not the same one)

The disadvantage is that it looks and works like a constant, but it's a
variable.

Rupert

On Sun, 6 Sep 2020 at 17:03, scott Ford  wrote:

> I have done things like true =‘Y’ and then
>
> If true
>   ..
> end
>
>

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


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 same one)

The disadvantage is that it looks and works like a constant, but it's a
variable.

Rupert

On Sun, 6 Sep 2020 at 17:03, scott Ford  wrote:

> I have done things like true =‘Y’ and then
>
> If true
>   ..
> end
>
>

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


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 Rexx variables as Booleans, as they made the conditional
>
> code shorter and clearer.
>
>
>
> But someone will reuse my code another day (perhaps me), and without the
>
> WWW or access to the proper Rexx docs, can I rely on '1' and '0' always
>
> being equivalent to the Boolean true and false, in every version of every
>
> interpreter and perhaps compilers as well?
>
>
>
> This was not like (say) PL/1, in which a bit(1) with the value '1'b had a
>
> precise meaning for Boolean logic, stated in a book already sat on my desk
>
> :-)
>
>
>
> Using TRUE and FALSE like constants from the top made it clear to anyone
>
> viewing it, and fairly easy to find and change in the code, if necessary.
>
>
>
> It worked, BTW. As I remember things, it found the bug before my coffee mug
>
> was empty, but a few days later they cancelled the software licence over a
>
> different, bigger bug. Ho-hum :-)
>
>
>
> Rupert
>
>
>
> On Sat., Sep. 5, 2020, 23:56 Paul Gilmartin, <
>
> 000433f07816-dmarc-requ...@listserv.ua.edu> wrote:
>
>
>
> > 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 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 :-)
>
> >
>
> >
>
>
>
> --
>
> For IBM-MAIN subscribe / signoff / archive access instructions,
>
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
Scott Ford
IDMWORKS
z/OS Development

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


SMF 119 sub-type 6 (interface Stats)

2020-09-06 Thread Pierre Fichaud
If anyone has experience with these records, I have a question.
There are 2 section with this sub-type aside from the ID section.
In the sample SMF files provided to me, I haven't seen a non-zero count for 
section 2.
I have seen the count for section be 2.
Can I assume that if the count for section 2 is non-zero, that it must match 
the count for section 1?
Thanks in advance, Pierre.

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


Re: Ransoming a mainframe disk farm

2020-09-06 Thread Lionel B Dyck
If it's on the network then you know someone can find a way in, and once they 
are in then all bets are off. Given the newer technology that has been, and is 
being, developed to crack passwords it is only a matter of when and not if.

Are WORMs really protected if they are in a virtual storage subsystem? Aren't 
they really just artifacts that have been defined as WORM but in reality are 
only protected by the software in the subsystem?

Paranoia is only false if you know that no one is after you - but can you be 
sure.


Lionel B. Dyck <
Website: https://www.lbdsoftware.com

"Worry more about your character than your reputation.  Character is what you 
are, reputation merely what others think you are." - John Wooden

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


Re: Constant Identifiers

2020-09-06 Thread Robert Prins

On 2020-09-06 13:07, Paul Gilmartin wrote:

On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:



Beware!  Than might left-associate as:
 volume = ( 4/3 ) * 3.14159 * radius**3
... and the quotient of integers, 4/3, is 1.


No it's not. 4/3 yields 1.33.. to 15 digits in PL/I.
You're thinking of FORTRAN.


And C:
662 $ cat typetest.c
#include 
int main() {
 printf( "%10.6f\n",   4/3 * 3.14159 );
 printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
663 $ gmake typetest & ./typetest
cc typetest.c   -o typetest
   3.141590
   4.188787

It ought to depend on the types of the operands of the polymorphic
operator, '/'.  What are the default types of '4' and '3'?  Does PL/I
entirely lack an integer divide?


No, if the receiving variable is an integer without fractional part, PL/I 
truncates.


The Language Ref. properly cautions that a constant declaration may
be necessary to control the constant types.


Anyway, the latest versions of EPLI contain the (NO)DECOMP option:

The DECOMP option instructs the compiler to generate a listing section that 
gives a decomposition of expressions used in the compilation.


Under the DECOMP option, the compiler generates a listing section that shows all 
intermediate expressions and their attributes for all expressions used in the 
source program. Under the NODECOMP option, the compiler does not generate this 
listing section.


The default is NODECOMP.

and

Expressions and attributes listing

If you use the DECOMP compiler option, the compiler includes, in the compiler 
listing, a section that shows all intermediate expressions and their attributes 
for all expressions used in the source program.


Never used it, but it maybe useful to do so before drawing erroneous conclusions 
about output!


Robert
--
Robert AH Prins
robert.ah.prins(a)gmail.com
The hitchhiking grandfather - https://prino.neocities.org/indez.html
Some REXX code for use on z/OS - https://prino.neocities.org/zOS/zOS-Tools.html

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


Re: Constant Identifiers

2020-09-06 Thread Rupert Reynolds
As I remember PL/1 from the 1980s (and very definitely pre-LE) the rules
for implicit conversions were well-defined, but needed care. Simply adding
parentheses would allow me to control the use of integer operations.

I'll be watching for more recent (relevant) exerience :-)

Rupert

On Sun., Sep. 6, 2020, 14:07 Paul Gilmartin, <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:
> >>>
> >> Beware!  Than might left-associate as:
> >> volume = ( 4/3 ) * 3.14159 * radius**3
> >> ... and the quotient of integers, 4/3, is 1.
> >
> >No it's not. 4/3 yields 1.33.. to 15 digits in PL/I.
> >You're thinking of FORTRAN.
> >
> And C:
> 662 $ cat typetest.c
> #include 
> int main() {
> printf( "%10.6f\n",   4/3 * 3.14159 );
> printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
> 663 $ gmake typetest & ./typetest
> cc typetest.c   -o typetest
>   3.141590
>   4.188787
>
> It ought to depend on the types of the operands of the polymorphic
> operator, '/'.  What are the default types of '4' and '3'?  Does PL/I
> entirely lack an integer divide?
>
> The Language Ref. properly cautions that a constant declaration may
> be necessary to control the constant types.
>
> -- 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


Re: Constant Identifiers

2020-09-06 Thread Paul Gilmartin
On Sun, 6 Sep 2020 17:25:45 +1000, Robin Vowels wrote:
>>>
>> Beware!  Than might left-associate as:
>> volume = ( 4/3 ) * 3.14159 * radius**3
>> ... and the quotient of integers, 4/3, is 1.
>
>No it's not. 4/3 yields 1.33.. to 15 digits in PL/I.
>You're thinking of FORTRAN.
>
And C:
662 $ cat typetest.c
#include 
int main() {
printf( "%10.6f\n",   4/3 * 3.14159 );
printf( "%10.6f\n", 4.0/3 * 3.14159 ); }
663 $ gmake typetest & ./typetest
cc typetest.c   -o typetest
  3.141590
  4.188787

It ought to depend on the types of the operands of the polymorphic
operator, '/'.  What are the default types of '4' and '3'?  Does PL/I
entirely lack an integer divide?

The Language Ref. properly cautions that a constant declaration may
be necessary to control the constant types.

-- gil

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


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 without the
WWW or access to the proper Rexx docs, can I rely on '1' and '0' always
being equivalent to the Boolean true and false, in every version of every
interpreter and perhaps compilers as well?

This was not like (say) PL/1, in which a bit(1) with the value '1'b had a
precise meaning for Boolean logic, stated in a book already sat on my desk
:-)

Using TRUE and FALSE like constants from the top made it clear to anyone
viewing it, and fairly easy to find and change in the code, if necessary.

It worked, BTW. As I remember things, it found the bug before my coffee mug
was empty, but a few days later they cancelled the software licence over a
different, bigger bug. Ho-hum :-)

Rupert

On Sat., Sep. 5, 2020, 23:56 Paul Gilmartin, <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

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

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


Re: ILR012W ALL LOCAL PAGING SPACE IS FULL OR BAD, ASM WAIT03C RSN=01

2020-09-06 Thread Rob Scott
The “RSMDATA ADDRSPACE ALL” can also help and does a lot of the leg-work for 
you.

Rob Scott
Rocket Software

From: IBM Mainframe Discussion List  On Behalf Of Jim 
Mulder
Sent: 04 September 2020 20:47
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: ILR012W ALL LOCAL PAGING SPACE IS FULL OR BAD, ASM WAIT03C RSN=01

EXTERNAL EMAIL



Also look in VERBX MTRACE in the standalone dump.

ASSBNVSC and ASSBVSC tell you the number of slots each address space is
using. You can look at those in the dump.

Jim Mulder z/OS Diagnosis, Design, Development, Test IBM Corp.
Poughkeepsie NY
(845) 435-4741
D10JHM1@PLPSC (MVS) JMULDER@S390VM (VM)

"IBM Mainframe Discussion List" 
mailto:IBM-MAIN@LISTSERV.UA.EDU>> wrote on
09/04/2020 07:59:33 AM:

> From: "Mark Jacobs" 
> <0224d287a4b1-dmarc-requ...@listserv.ua.edu>
> To: IBM-MAIN@LISTSERV.UA.EDU
> Date: 09/04/2020 03:44 PM
> Subject: Re: ILR012W ALL LOCAL PAGING SPACE IS FULL OR BAD, ASM
> WAIT03C RSN=01 [EXTERNAL]
> Sent by: "IBM Mainframe Discussion List" 
> mailto:IBM-MAIN@LISTSERV.UA.EDU>>
>
> I looked last night. Didn't see any IRA messages that indicated
> who's consuming page space. We're 99.9% SCM for paging, just one
> small local page dataset for VIO. I'm conjecturing that that message
> isn't being issued with SCM. I'll double check the log though.
>
> Mark Jacobs
>
> Sent from ProtonMail, Swiss-based encrypted email.
>
> GPG Public Key - 
> https://api.protonmail.ch/pks/lookup?
> op=get=markjac...@protonmail.com
>
> ‐‐‐ Original Message ‐‐‐
> On Friday, September 4, 2020 7:53 AM, Feller, Paul
> <02fc94e14c43-dmarc-requ...@listserv.ua.edu>
>  wrote:
>
> > Mark, if you still have access to the SYSLOG for the lpar you
> could try to look for message IRA220I. The message will list the who
> was using up the AUX slots. The message can be displayed related to
> message IRA201E.
> >
> > Thanks..
> >
> > Paul Feller
> > GTS Mainframe Technical Support
> >
> > -Original Message-
> > From: IBM Mainframe Discussion List 
> > IBM-MAIN@LISTSERV.UA.EDU On
> Behalf Of Mark Jacobs
> >
> > Sent: Friday, September 4, 2020 6:28 AM
> > To: IBM-MAIN@LISTSERV.UA.EDU
> > Subject: ILR012W ALL LOCAL PAGING SPACE IS FULL OR BAD, ASM
> WAIT03C RSN=01 [EXTERNAL]
> >
> > Someone used up the entire 128GB of SCM we've assigned to paging
> on one of our systems last night. AutoIPL took a SAD and then
> reipled, so the recovery went as well as can be expected. I'm not
> well versed in IPCS and so I was wondering if someone could give me
> hints on how to ascertain who did the deed.
> >
> > Mark Jacobs




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


Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ 
Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: 
https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - 
http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy


This communication and any attachments may contain confidential information of 
Rocket Software, Inc. All unauthorized use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please notify Rocket 
Software immediately and destroy all copies of this communication. Thank you.

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


Re: Constant Identifiers

2020-09-06 Thread Robin Vowels

On 2020-09-06 13:33, Paul Gilmartin wrote:

On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:


As for writing formulas, I prefer to follow a well-known formula, 
thus:


volume = 4/3 * 3.14159 * radius**3


Beware!  Than might left-associate as:
volume = ( 4/3 ) * 3.14159 * radius**3
... and the quotient of integers, 4/3, is 1.


No it's not. 4/3 yields 1.33.. to 15 digits in PL/I.
You're thinking of FORTRAN.


However, if I'm interested in efficiency, I'd prefer

volume = 4 * 3.14159E0 / 3 * radius**3


... (and correct.)


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