This distribution List it is a great place to put questions and see answer
and know people, we need that, however we will need be prepared to survive
in a changing century and ready for AI stuff that are arriving...
Let see what AI reply to our question about LABEL DROP
I did enter this question:
On z/OS assembler code can I put a LABEL in the DROP line ?
And this is the answer from google COPILOT
"""""
In z/OS assembler, you cannot place a label directly on a DROP statement.
The DROP statement is used to remove register names from the current
register save area, and it does not support labels. Labels are typically
used to mark locations in the code for branching or data definition, but not
for assembler directives like DROP.
If you need to manage register usage and ensure clarity in your code, you
might consider using comments or structuring your code to make the purpose
of the DROP statement clear without needing a label.
Is there a specific scenario or problem you're trying to solve with the DROP
statement? Maybe I can help with an alternative approach!
""""""
Now is our turn to say if this is acceptable or we need to teaching AI
better then someone is doing today...Because soon we can just need to say:
z/OS assembler code give me a sample program that print "hello World" ?
Here the result from google COPILOT
"""""
Sure! Here's a simple z/OS assembler program that prints "Hello, World":
Assembly
HELLO CSECT
USING *,15
WTO 'Hello, World'
BR 14
END HELLO
AI-generated code. Review and use carefully. More info on FAQ.
This program uses the WTO (Write To Operator) macro to print the message
"Hello, World" to the system console. The BR 14 instruction is used to
return control to the operating system.
If you have any questions about this code or need further assistance, feel
free to ask!
"""""""""""""""""
We need to start learning again a lot of stuff..
Giovanni
z/OS System programmer
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Eric Rossman
Sent: Wednesday, October 2, 2024 9:03 AM
To: [email protected]
Subject: Re: Question on HLASM - B to a DROP statement!?!
The original question did not ask why it allowed something stupid. It was:
> Anyone see a problem with this? When did this kind of thing get
> accepted?
> ...
> And every one of those "Branch" instructions would have been flagged
> for an undefined label or some such.
I see a problem with not fixing it. It appears that it has been accepted for
a long time (possibly forever).
Also, the description of the message says exactly what it will do:
| The name is equated to the current value of the location counter (*).
| However, if no control section has been started, the name is equated
| to zero.
I will venture to say that it's reasonable for the assembler to allow it
since it will probably do something acceptable. However, the point stands
that it issues a warning because this might not be what the programmer
intended.
Putting an ordinary symbol (a label) on a DROP would (to me) indicate that
the programmer intended it as a target for a branch, at which point the
named base_register (or label or address) should be dropped.
If this was the intention, it would be better to do as suggested. The
assembler cannot read minds so it warns when it might not do what was
intended.
Eric Rossman
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Tony Thigpen
Sent: Wednesday, October 2, 2024 8:47 AM
To: [email protected]
Subject: [EXTERNAL] Re: Question on HLASM - B to a DROP statement!?!
Please,
Will everyone go back and read the OP's original post.
The question was not 'how to fix', but was instead, 'why did the assembler
allow something this stupid in the first place'.
My post was just to point out that the VSE HLASM does the exact same thing.
And, I have gotten multiple 'you can fix it by doing this' emails since my
post.
Tony Thigpen
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN