Re: Subrange of a list

2022-05-27 Thread Charles Mills
Is  always five elements?

You want to yield a subscripted variable  such that (1) = B, (2) = C,
... 

Is that right? You don't like

(1) SETC (2)
Etc.?

You don't like it because the count is not always five?

There's a thing called Created SET symbols that might be relevant but I
confess I am not familiar.

Charles


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Paul Gilmartin
Sent: Friday, May 27, 2022 7:15 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Subrange of a list

I'm trying to achieve the effect of POSIX shell "shift" or Rexx
"subword(2)".

Suppose my  is A,B,C,D,E.  Is there a straightforward way
to discard the A, and get B,C,D,E such as (2..5)?

(I do not consider a loop straightforward.)


Subrange of a list

2022-05-27 Thread Paul Gilmartin
I'm trying to achieve the effect of POSIX shell "shift" or Rexx
"subword(2)".

Suppose my  is A,B,C,D,E.  Is there a straightforward way
to discard the A, and get B,C,D,E such as (2..5)?

(I do not consider a loop straightforward.)

-- 
Thanks.
gil


Re: Generating a TR field

2022-05-27 Thread Steve Smith
Ed might have prioritized brevity because he's not paid to do your coding
for you.  His example is idiomatic for an experienced developer, and if
you're not experienced, then you have a learning opportunity.

I have no patience with the fear that a "maintenance newbie" can't be
expected to learn anything.  If they can't, I suggest you'd be better off
with not doing maintenance until you find someone who can.

sas

On Fri, May 27, 2022 at 11:32 AM Paul Gilmartin <
0014e0e4a59b-dmarc-requ...@listserv.uga.edu> wrote:

> On May 26, 2022, at 16:26:38, Charles Mills wrote:
> >
> > And what is that? Some comments?
> >
> My thought, but what?:
> A paraphrase of the OP's requirement?
> And/or explanation of the unintuitive semantics of:
> o "*" within a repetitive  constant definition?
> o A character self-defining term used as a numeric value?
> o "ORG" with *two* empty arguments?
>
> But no fault to Ed.  His target was a level above your
> putative "maintenance newbie" and valued brevity.
>
>


Re: Generating a TR field

2022-05-27 Thread Paul Gilmartin
On May 27, 2022, at 10:08:37, Charles Mills wrote:
> 
> ORG , is not two empty arguments. It is one empty argument, with a comma so 
> that the first word of any comment does not get taken as an argument.
>  
This was discussed here long ago and the experts agreed that for macros at 
least:
 MYMAC ,
perceives two empty arguments. One before the comma and one after.
No arguments:
 MYMAC
One argument:
 MYMAC FOO
Two arguments:
 MYMAC FOO,
Two arguments:
 MYMAC ,

>  ORG Get back where we were
>  
There's no way to make "ORG" report its operand count.

> Would give you an error on "Get" (unless GET happened to be a valid label, 
> which would yield a really obscure result!). 
>  
... or the comment were indented beyond the limit of the operand field.
(I used to rely on that.)

-- 
gil


Re: Generating a TR field

2022-05-27 Thread Charles Mills
ORG , is not two empty arguments. It is one empty argument, with a comma so 
that the first word of any comment does not get taken as an argument.

  ORG Get back where we were

Would give you an error on "Get" (unless GET happened to be a valid label, 
which would yield a really obscure result!). 

Charles


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Paul Gilmartin
Sent: Friday, May 27, 2022 8:32 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Generating a TR field

On May 26, 2022, at 16:26:38, Charles Mills wrote:
> 
> And what is that? Some comments?
> 
My thought, but what?:
A paraphrase of the OP's requirement?
And/or explanation of the unintuitive semantics of:
o "*" within a repetitive  constant definition?
o A character self-defining term used as a numeric value?
o "ORG" with *two* empty arguments?

But no fault to Ed.  His target was a level above your
putative "maintenance newbie" and valued brevity.

>> @Ed's approach is elegant, although a maintenance newbie might have
> trouble understanding what 256AL1(*-TABLE) did.
>> 
> Troublesome only because Ed left out the most important thing.
> 
>> -Original Message-
>> From: Ed Jaffe
>> Sent: Thursday, May 26, 2022 2:36 PM
>> 
>> What you want should be trivial:
>> |TABLE DC  256AL1(*-TABLE)
>> |  ORG TABLE+C'*'
>> |  DC  CL1' '
>> |  ORG ,
> 
> -- 
> gil

-- 
gil
Моё судно на воздушной подушке полно угрей.


Re: Generating a TR field

2022-05-27 Thread Paul Gilmartin
On May 26, 2022, at 16:26:38, Charles Mills wrote:
> 
> And what is that? Some comments?
> 
My thought, but what?:
A paraphrase of the OP's requirement?
And/or explanation of the unintuitive semantics of:
o "*" within a repetitive  constant definition?
o A character self-defining term used as a numeric value?
o "ORG" with *two* empty arguments?

But no fault to Ed.  His target was a level above your
putative "maintenance newbie" and valued brevity.

>> @Ed's approach is elegant, although a maintenance newbie might have
> trouble understanding what 256AL1(*-TABLE) did.
>> 
> Troublesome only because Ed left out the most important thing.
> 
>> -Original Message-
>> From: Ed Jaffe
>> Sent: Thursday, May 26, 2022 2:36 PM
>> 
>> What you want should be trivial:
>> |TABLE DC  256AL1(*-TABLE)
>> |  ORG TABLE+C'*'
>> |  DC  CL1' '
>> |  ORG ,
> 
> -- 
> gil

-- 
gil
Моё судно на воздушной подушке полно угрей.


Re: Generating a TR field

2022-05-27 Thread Schmitt, Michael
Ooh, that is slick.

-Original Message-
From: IBM Mainframe Assembler List  On Behalf 
Of Ed Jaffe
Sent: Thursday, May 26, 2022 4:36 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Generating a TR field

On 5/26/2022 2:23 PM, Schmitt, Michael wrote:
> I want to replace all '*' with a space in a field. That's a TR instruction, 
> right? But when I search through our 40 years of assembler code, I see no 
> uses of TR for such a purpose.
>
> I thinking this is because of difficulty in building the TR table. We'd need 
> to have 256 bytes where every byte's value in in ascending sequence: 00 01 02 
> 03 04 05 06 07 08 09 0A etc, right? Except for the byte at offset x'5C', 
> which would have the value x'40'.
>
> Is there a slick way or a macro to build the TR table? Or do people just code 
> a TRT loop instead, since it is easier to build a TRT table?
What you want should be trivial:

|TABLE DC  256AL1(*-TABLE)
|  ORG TABLE+C'*'
|  DC  CL1' '
|  ORG ,

--
Phoenix Software International
Edward E. Jaffe
Chief Technology Officer
831 Parkview Drive North
El Segundo, CA 90245
https://clicktime.symantec.com/34nkAJv9vEbU9Adab4NCjkQ7VN?u=https%3A%2F%2Fwww.phoenixsoftware.com%2F



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.