Variable symbol without leading &

4 views
Skip to first unread message

Joseph Reichman

unread,
Jun 28, 2023, 10:09:42 AM6/28/23
to ASSEMBL...@listserv.uga.edu
Hi
Just looked at the doc for LCLC says for variable symbol says can be with or with out leading &

I did try to assemble a symbol without leading & and it did a assemble however I would think without the leading & it’s an ordinary symbol

However when I tried to do a SETC against it I got a assembly error

So my question becomes if you can declare a variable symbol without a leading &
But cannt SETC what can it be used for

Dave Clark

unread,
Jun 28, 2023, 10:17:33 AM6/28/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
06/28/2023 10:09:27 AM:
> Just looked at the doc for LCLC says for variable symbol says can be
> with or with out leading &
>
> However when I tried to do a SETC against it I got a assembly error


I believe that it means LCLC does not require the leading
ampersand but in all other uses the leading ampersand is required -- and
it is the same variable.


Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331





*********************************************************************************************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately notify the sender and delete and destroy the message and all
copies. All unauthorized direct or indirect use or disclosure of this
message is strictly prohibited. No right to confidentiality or privilege
is waived or lost by any error in transmission.
*********************************************************************************************

Joseph Reichman

unread,
Jun 28, 2023, 10:19:49 AM6/28/23
to ASSEMBL...@listserv.uga.edu
Thank you

> On Jun 28, 2023, at 10:17 AM, Dave Clark <dlc...@winsupplyinc.com> wrote:
>
> "IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on

Seymour J Metz

unread,
Jun 28, 2023, 10:46:53 AM6/28/23
to ASSEMBL...@listserv.uga.edu
Yes, it's legal, no, it's not an ordinary symbol in a [LCL|GBL]x, and yes, it's confusing. IMHO it would have been better to accept it but issue a warning.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Joseph Reichman <reich...@GMAIL.COM>
Sent: Wednesday, June 28, 2023 10:09 AM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Variable symbol without leading &

Joseph Reichman

unread,
Jun 28, 2023, 10:50:06 AM6/28/23
to ASSEMBL...@listserv.uga.edu
Seymour thanks my feeling exactly I have a ALC cop presentation on macros
Doing some research

> On Jun 28, 2023, at 10:46 AM, Seymour J Metz <sme...@gmu.edu> wrote:
>
> Yes, it's legal, no, it's not an ordinary symbol in a [LCL|GBL]x, and yes, it's confusing. IMHO it would have been better to accept it but issue a warning.

Paul Gilmartin

unread,
Jun 28, 2023, 10:59:09 AM6/28/23
to ASSEMBL...@listserv.uga.edu
On 6/28/23 08:17:20, Dave Clark wrote:
> "IBM Mainframe Assembler List" wrote on
> 06/28/2023 10:09:27 AM:
>> Just looked at the doc for LCLC says for variable symbol says can be
>> with or with out leading &
>>
>> However when I tried to do a SETC against it I got a assembly error
>
> I believe that it means LCLC does not require the leading
> ampersand but in all other uses the leading ampersand is required -- and
> it is the same variable.

That's gratuitous flexibility that adds no expressive power,
but leads to confusion, as in the original ply.

Rather, for consistency, symbols appearing as operands of
LCLC should be evaluated:

&NAME SETC '&&X'
LCLC &NAME

... should declare &X to be a local symbol.

(What about LCLA and LCLB?)

--
gil

Abe Kornelis

unread,
Jun 28, 2023, 11:19:45 AM6/28/23
to ASSEMBL...@listserv.uga.edu
Gil, all,

You suggest that a declaration for a variable with a leading ampersand
should have the variable name evaluated before it is actually declared.

Not only would that break most existing code (I do not recall ever having
seen a variable declaration without a leading ampersand), it would
also duplicate existing logic and syntax for created set symbols,
adding even more confusion than we already have.
Created set symbols use a different syntax to disambiguate them from
the proposed syntactical construct.

I do not _know_ why the ampersands on the variable declarations
can be omitted, but it probably relates to compatibility with
one or more of HLASM's predecessor assemblers.

Since it is pretty confusing to leave out the leading ampersand,
I would advise not to use this syntactical feature.
Stick with the ampersands. Life is complex enough as it is.

And if you need to declare created set symbols,
use the existing &(&foo) notation. Works like a charm :-)

Kind regards & happy programming!
Abe Kornelis
==========


Op 28/06/2023 om 16:59 schreef Paul Gilmartin:

Jon Perryman

unread,
Jun 28, 2023, 1:08:16 PM6/28/23
to ASSEMBL...@listserv.uga.edu
Assembler language and Assembler Macro language are 2 separate languages & manuals. Both have variables and symbols but they are very different in concept. In Assembler, symbols have a diverse use, one of which is variable names. On the other hand in the macro language, symbols and variables are not related at all. The only macro symbol that comes to mind is sequence symbols (e.g. AGO .SYMBOL). Because of the period, a macro variable name cannot become a symbol. If I remember correctly, in certain situations, a sequence symbol can include a variable (e.g. ago .LABEL&VAR).

As for omitting the & in variable declarations, don't do it to be consistent. IBM can't change this behavior in the Macro language because it would break existing code.

Seymour J Metz

unread,
Jun 28, 2023, 1:22:22 PM6/28/23
to ASSEMBL...@listserv.uga.edu
No; they have the same manuals. Yes, ordinary symbols, sequence symbols, set symbols and system variable symbols are different things.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Jon Perryman <jper...@PACBELL.NET>
Sent: Wednesday, June 28, 2023 1:07 PM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: Variable symbol without leading &

Abe Kornelis

unread,
Jun 28, 2023, 1:38:22 PM6/28/23
to ASSEMBL...@listserv.uga.edu
Jon,

I've heard others make that remark before: HLASM is actually two languages.
I find the distinction rather arbitrary - both aspects of HLASM are
intimately interconnected.

As Mr. Metz correctly remarked, there is only a single Language
Reference Manual for HLASM.
I think that's for a very good reason. Try to split that manual into two
separate ones,
you'll find yourself facing boundary cases and many references between
the two manuals.

Kind regards,
Abe
===


Op 28/06/2023 om 19:07 schreef Jon Perryman:

Charles Mills

unread,
Jun 28, 2023, 2:03:25 PM6/28/23
to ASSEMBL...@listserv.uga.edu
The "other manual" for the Assembler is Principles of Operation.

If you want to know how COBOL MOVE works, you look at the COBOL Language Reference.

But if you want to know how MVC works, you don't look at an assembler manual, you look at Principles.

Charles

Seymour J Metz

unread,
Jun 28, 2023, 2:11:39 PM6/28/23
to ASSEMBL...@listserv.uga.edu
No, PoOps is an architecture manual. It explains instruction formats and semantics; it does not explain how to symbolically encode them, much less explaining all of the pseud-ops.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Charles Mills <char...@MCN.ORG>
Sent: Wednesday, June 28, 2023 2:03 PM

Charles Mills

unread,
Jun 28, 2023, 2:18:49 PM6/28/23
to ASSEMBL...@listserv.uga.edu
If you met someone who said he wrote Z assembler for a living, you would not
think that he exclusively dealt in USING and SPACE and LCLC. You would
assume he would know how MVC worked. Where do you suppose he would have
gotten that knowledge?

YES, Principles is an architecture manual. I did not say it wasn't. I stand
by what I DID say.

Seymour J Metz

unread,
Jun 28, 2023, 2:23:08 PM6/28/23
to ASSEMBL...@listserv.uga.edu
Then it's a good thing that "exclusively" came from you, not from me. For your information, I *have* encountered people who write HLASM for a living and have no idea how the instructions are actually encoded.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Charles Mills <char...@MCN.ORG>

Sent: Wednesday, June 28, 2023 2:18 PM

Paul Gilmartin

unread,
Jun 28, 2023, 3:00:24 PM6/28/23
to ASSEMBL...@listserv.uga.edu
On 6/28/23 12:23:03, Seymour J Metz wrote:
> Then it's a good thing that "exclusively" came from you, not from me. For your information, I *have* encountered people who write HLASM for a living and have no idea how the instructions are actually encoded.

... and they ask how they can eliminate that distracting stuff
on the left of the SYSPRINT.

--
gil

Seymour J Metz

unread,
Jun 28, 2023, 3:12:03 PM6/28/23
to ASSEMBL...@listserv.uga.edu
I don't want to believe it, but, alas, I do.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Paul Gilmartin <00000014e0e4a59...@LISTSERV.UGA.EDU>
Sent: Wednesday, June 28, 2023 3:00 PM


To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: Variable symbol without leading &

On 6/28/23 12:23:03, Seymour J Metz wrote:

Jon Perryman

unread,
Jun 28, 2023, 5:12:22 PM6/28/23
to ASSEMBL...@listserv.uga.edu
If the POPS does not explain how to symbolically code each instruction, then point us to the manual that does. For instance, what manual tells me how to code the PLO instruction with multiple syntax variations. As for pseudo-ops, they do not generate machine code but instead are assembler control statements (e.g. eject). As for mnemonics, only a few are specifically documented in the HLASM reference (e.g. BNZ and JNZ). The vast majority of mnemonics are macro's documented in product specific manuals and to a small extent OPSYN. The classic example is the toolkit replacing branch instructions with jump instructions.

Seymour J Metz

unread,
Jun 28, 2023, 5:21:24 PM6/28/23
to ASSEMBL...@listserv.uga.edu
Water is wet. There is no need to refute claims that nobody made.

PLO? PoOps describes the layout of the data, not the DCs needed to generate them.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Jon Perryman <jper...@PACBELL.NET>
Sent: Wednesday, June 28, 2023 5:11 PM

Jon Perryman

unread,
Jun 28, 2023, 5:45:26 PM6/28/23
to ASSEMBL...@listserv.uga.edu

Seymour J Metz

unread,
Jun 28, 2023, 6:02:59 PM6/28/23
to ASSEMBL...@listserv.uga.edu
The HLASM Reference describes assembler syntax; PoOps just says what the fields are. Consider

LH R3,SYSPRINT+DCBLRECL-IHADCB(R4)

USING SYSPRINT
LH R3,DCBLRECL

Both of these use things that aren't in PoOps. And, no, I'm not talking about the DCBD expansion.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Jon Perryman <jper...@PACBELL.NET>

Sent: Wednesday, June 28, 2023 5:44 PM

Jon Perryman

unread,
Jun 28, 2023, 7:12:53 PM6/28/23
to ASSEMBL...@listserv.uga.edu
Assembler instruction syntax is not described in the HLASM reference. You are describing various methods for calculating offset, base and index. Only POPS tells you about the syntax. Assume you don't know the LH instruction and don't have the POPS. Using only the HLASM manuals, what is wrong with LH R3,R1? A true HLASM programmer relies heavily on POPS.

Seymour J Metz

unread,
Jun 28, 2023, 8:31:31 PM6/28/23
to ASSEMBL...@listserv.uga.edu
Whoosh!

Lots of l\luck finding information on expressions and addressability in PoOps.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Jon Perryman <jper...@PACBELL.NET>

Sent: Wednesday, June 28, 2023 7:09 PM

Seymour J Metz

unread,
Jun 28, 2023, 9:20:10 PM6/28/23
to ASSEMBL...@listserv.uga.edu
ObDieJungfrauvonOrleansRepeating that won't make it true. The syntax of expressions is described in the HLASM reference, *NOT* in PoOps, and describing it as "various methods for calculating" does not magically stop it from being syntax.

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Jon Perryman <jper...@PACBELL.NET>

Sent: Wednesday, June 28, 2023 7:09 PM

Phil Smith III

unread,
Jun 28, 2023, 9:23:06 PM6/28/23
to ASSEMBL...@listserv.uga.edu
Beyond all the fighting here, just be glad the assembler macro language is so powerful. Every time I have to do something in C that call out for a macro, I'm appalled at how pathetic that language is!

Jon Perryman

unread,
Jun 28, 2023, 10:07:29 PM6/28/23
to ASSEMBL...@listserv.uga.edu

Seymour J Metz

unread,
Jun 28, 2023, 10:16:21 PM6/28/23
to ASSEMBL...@listserv.uga.edu
ROTF,LMAO

________________________________________
From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Jon Perryman <jper...@PACBELL.NET>
Sent: Wednesday, June 28, 2023 10:06 PM

Jon Perryman

unread,
Jun 28, 2023, 10:18:16 PM6/28/23
to ASSEMBL...@listserv.uga.edu
I agree with you Phil about C macro language being abysmal. The only thing worse is Google's GO language which does not have macros. HLASM macro language should have been replaced years ago with REXX but as it stands, it's still extremely useful. Imagine coding a complex DCB in C or worse yet GO.

Tom Marchant

unread,
Jun 28, 2023, 10:49:18 PM6/28/23
to ASSEMBL...@listserv.uga.edu
Yes, there is a single language reference for HLASM (including macros).
Yes, other manuals are needed to do effective HLASM programming.
The POO is one of these other manuals.
So are the Assembler Services reference manuals and guide.
The Authorized Assembler guide and References.
DFSMS Using Data sets
Extended Addressability Guide
just to name some that come immediately to mind.

--
Tom Marchant

Jon Perryman

unread,
Jun 28, 2023, 10:50:09 PM6/28/23
to ASSEMBL...@listserv.uga.edu
What page in the HLASM ref are you referring? I only asked you to show some evidence you are right but you continue to refuse.
You've told me that application programs can be more complicated than system programs. What at the IRS is so complicated that it needs 8 assembler programmers? What makes it difficult for these programs to be written in cobol? What is it that you do that is more complex than a basic assembler program?
ROTF,LMAO
Reply all
Reply to author
Forward
0 new messages