Re: Question on HLASM - B to a DROP statement!?!

2024-10-07 Thread Paul Gilmartin

On 10/7/24 12:14, Rick Troth wrote:

Postel's rule ... "be conservative in what you send, be liberal in what you 
accept"?

I firmly agree with this because it leads to solid interoperability. (Many refer to it as 
"the robustness principle".)

Is that the one you disagree with?
 .

I disagree with Postel's second clause.  It undermines interoperability:


Criticism
In 2001, Marshall Rose characterized several deployment problems
when applying Postel's principle in the design of a new application
protocol.[4] For example, a defective implementation that sends
non-conforming messages might be used only with implementations
that tolerate those deviations from the specification until,
possibly several years later, it is connected with a less tolerant
application that rejects its messages. In such a situation,
identifying the problem is often difficult, and deploying a
solution can be costly. Rose therefore recommended "explicit
consistency checks in a protocol ... even if they impose
implementation overhead".
...

In 2023, Martin Thomson and David Schinazi argued that Postel's
robustness principle actually leads to a lack of robustness,
including security:[6]

A flaw can become entrenched as a de facto standard. Any
implementation of the protocol is required to replicate the
aberrant behavior, or it is not interoperable. This is both
a consequence of tolerating the unexpected and a product of a
natural reluctance to avoid fatal error conditions. Ensuring
interoperability in this environment is often referred to as
aiming to be "bug-for-bug compatible".


--
gil


Re: Question on HLASM - B to a DROP statement!?!

2024-10-07 Thread Paul Gilmartin

On 10/7/24 05:39, Jonathan Scott wrote:

...
 The standard rule is that if there's a reasonable chance that it
may work anyway, it's a warning.  But warnings should definitely
not be ignored.
  .

What "standard"?

I struggle to balance Doug Gwyn's maxim,. “Unix was not designed
to stop you from doing stupid things, because that would also stop
you from doing clever things.”

with Postel's rule.  I largely disagree with the latter.  It
leads to needless chaos in code reviews.

A reviewer once marked down my SMP/E control statements
where I separated tokens with blanks, imitating examples
in the Ref.  She noted correctly that the syntax there
required commas.  I went to RCF (perhaps APAR).  The
outcome was not to change the parser to follow the manual
nor to modify every syntax diagram, but to add a blanket
introduction that commas are optional, adding to the
knowledge burden of coders and reviewers.

And I once marked down an Assembler statement such as:
 PRINT ,,,NOGEN
because the Ref. does not allow empty options on PRINT.
Experts told me I should know better.

Consider the cost of documenting flexibility and of
implementing mechanical syntax/style checkers.

I have used an assembler which, like Rexx, allowed
multiple labels on an instruction, or on no instruction
(blank opcode field.)
"L1: L2: L3: say 'Hello'"

granted, the hardware had little alignment requirement.


--
gil


Re: Q: Finalist

2024-07-26 Thread Paul Gilmartin

On 7/26/24 12:49, Steve Thompson wrote:

Hi all:

I am looking for someone that is using Finalist (zipcode USPS addressing tool).

I'd like to ask some dumb questions about it. I know it doesn't work with Java 
under z/OS... Yeah, a modernization thing.


Do you mean that Java under z/OS is outdated?  Should it
be upgraded?

(Is this question assembler-specific would it better
be asked on IBM-Main?)

--
gil


Re: Don't do this......

2024-07-21 Thread Paul Gilmartin

On 7/21/24 11:17, Phil Smith III wrote:

Gil wrote, in part:

There's a legend of someone who fooled a pedantic
style checker with
  BNZ   *+8
  LAR1,1  (whatever)
*+8  EQU   * (Suppress warning!)


Curiously, someone in the far distant past taught me to use that technique as "good 
style". Others have since convinced me that they hate it enough that I've stopped
.

Just don't put the "*+8" in the label field of the next actual instruction.

--
gil


Re: Don't do this......

2024-07-19 Thread Paul Gilmartin

On 7/19/24 13:08, Phil Smith III wrote:

...
While working helpdesk, someone I know was brought a FORTRAN program with a problem. 
While looking at it, something kept bothering him; finally he figured it out: the first 
word of EVERY comment started with "C", so the comments just looked like text. 
Weird!
.

I don't recall that I ever thought of that.  Ir I had
I probably would have done it.

I will confess to, in JCL:
//COMMENT  DD  *
This
   is just
  a block
comment!
/*
There's a legend of someone who fooled a pedantic
style checker with
 BNZ   *+8
 LAR1,1  (whatever)
*+8  EQU   * (Suppress warning!)

And I've mixed C and assembler with such as:

/*
IDCF'0'
*/ int I; /*
...
--
gil


Re: Don't do this......

2024-07-19 Thread Paul Gilmartin

On 7/19/24 08:56, Tony Thigpen wrote:

...
elsewhere
RO   EQU   SEEKO+7,1

I finally figured out what was happening when I copied the code from the PC editor I was 
using to view the shareware code to a test program in xedit so I could see what it was 
actually doing. The character after the "R" was the letter 'OH', not a 'zero', 
but the pc editor does not display a significantly different item for zero and the letter 
'O'.
 .

About a half-century ago, an article in one of the IT pulps
advocated that F0RTRAN (the only computer language known at
the time) make '0' and 'O' interchangeable.  I don't recall
that the consequences were sufficiently considered.

--
gil


Re: Using EQU with length

2024-07-17 Thread Paul Gilmartin

On 7/17/24 16:12, Tony Harminc wrote:

On Wed, 17 Jul 2024 at 16:56, João Reginato wrote:


As you can see, WKLEN already has a calculated value of x'023c' when the
second EQU is written.
Why don't use it?
   ... 

The listing with the length shown that you are relying on to make that
claim was produced long after the second EQU was evaluated. The assembler
is not a single pass one, and doesn't assemble quite the way a human would.
(Though it's certainly much closer to that than are the old Asm F and XF
and their relatives.)
 

And so, more susceptible to human weaknesses.

I can't imagine what addtional information could be
provided in message text, M&C, or Programmer's Guide
that would help a programmer recover from this
problem.

We had a surprising quasi-Y2K problem.  Changing the
year in our standard eyecatcher from '99' to '2000'
added 2 bytes to the alignment of its end, resulting
in an alignment error in one of our source files
which required, but did not ensure alignment. Should
we add 2 bytes (or 6 bytes) or CNOP to guarantee the
status quo ante?

--
gil


Re: Using EQU with length

2024-07-17 Thread Paul Gilmartin

On 7/17/24 11:28, Jonathan Scott wrote:

...
Note for example that if the start of some area is fullword
aligned but it contains a doubleword aligned field then the
length cannot be resolved until the assembler can tell whether
the start is on an odd or even fullword boundary.
.

Does that imply that the value of
SYMBOL   EQU   *
following such a field whose "length cannot be resolved"
is similarly unresolvable by lookahead?

--
gil


Re: using 2 consecutives areas

2024-07-08 Thread Paul Gilmartin

On 7/8/24 08:31, David Clark wrote:

It is best to define them with DC, rather than on-the-fly like that.
 .

And LOCTR could make them proximate in toe source
while remote in the object.

--
gil


Re: Current list of extended mnemonics?

2024-06-10 Thread Paul Gilmartin

On 6/10/24 16:17, Seymour J Metz wrote:

A lot  but not all :-(

I normally download new PoOps editions as soon as I have a working URL.
 .

Is there anything useful here?:



--
gil


Re: Negative SETA values (was Fw: BXLE usage assistance)

2024-06-10 Thread Paul Gilmartin

On 6/10/24 02:01, Jonathan Scott wrote:

gil writes:

\>> 6 SE   EQU   SIGNED(&A) "for SETA, SETB, and 
SETC"


I don't know what you mean by the last line, but the built-in
 .

Intended to exhibit the expected error.

--
gil


Re: Count attribute (K’)

2024-06-09 Thread Paul Gilmartin

On 6/9/24 17:05, Charles Mills wrote:

I am not a huge macro language expert but I suspect that the macro operand in question is 
not a "quoted character string" in HLASM-speak but rather an operand that 
happens to be a string of characters that happens to begin and end with a quote.
 .

I don't understand.  Can you supply examples of each??


Are there BIFs to convert a string that happens to begin and end with a quote into a 
"quoted character string"?
 .

Even worse, SETC arguments are simplified by removing
surrounding quotes and collapsing internal paired quotes
and ampersands; not so for actual parameters to macros.

Rexx and POSIX shell got it right; JCL and Assembler
got it wrong.

Conway's Law.

--
gil


Re: Negative SETA values (was Fw: BXLE usage assistance)

2024-06-09 Thread Paul Gilmartin

On 6/9/24 13:27, Farley, Peter wrote:

Gil,

In my browser (Firefox on Win10) there is this bit in the upper right corner of 
the web page you linked to:

Was this topic helpful?  [positive feedback link]  [negative feedback link]
 .

I've seen that.  And watch IBM-MAIN for further comments.


But you are correct – nothing in the PDF itself, only in the web version.
 .

But that's not my concern; rather that the examples in the PDF do not
appear in the web version -- no Feedback possible.

Chapter 9. How to write conditional assembly instructions 333
Character-valued built-in functions
SIGNED

--
gil


Re: Negative SETA values (was Fw: BXLE usage assistance)

2024-06-09 Thread Paul Gilmartin

On 6/9/24 12:00, Jonathan Scott wrote:

The problem is specifically that whenever a SETA variable is
substituted into a character string (either within an assembler
statement or within a conditional assembly character expression)
it does not include a minus sign for a negative value.  I would
agree this was bad design, but it happened in the early 1960s
(or possibly even earlier, if this was inherited from pre-360
assemblers) and we have to be very careful about compatibility.
   .

I have little sympathy for perpetuating a "bad design" in the
name of "compatibility".  That is embarking on the path to chaos.


The compatibility problem is mainly caused by macros trying to
work round the original problem.  For example, if a SETA symbol
&A is negative they may generate '-&A' instead of '&A', but if
we fix the problem the first form will then incorrectly generate
two minus signs.
  .

And far less sympathy for users who adopt a bizarre accommodation
to an error rather than opening a ticket and getting a fix.  They
should have added an AIF so their code would continue to work
after a PTF was installed.

But thanks for the explanation.


Gil writes:

I had been unaware of the SIGNED BiF.
  
It's been in the language since HLASM 1.3 in about 1998.
  
I recommend you check the lists of arithmetic and character

built-in functions to get up to date - there are some very
useful ones in there.
  

I find the examples in the Language Ref. inadequate:
  
The use of SIGNED is determined by the same syntax rules as

other functions.  You should use the reference information for
arithmetic or character expressions to understand the general
rules.  The examples only illustrate what SIGNED does, and
the generalisation to other cases is a matter of syntax.
  
SIGNED takes an arithmetic operand and returns a character

result, so the typical use is as follows:
  
&A   SETA  -10

...
&C   SETC  SIGNED(&A)   &C is now '-10'
 .

That example In the Language Ref. should be extended to show
the effect of SIGNED in contexts beyond SETC, such as:
  2 &A   SETA  -10
  3 UE   EQU   &A Unsigned 10
   000A+UE   EQU   10 Unsigned 10
  4 &C   SETC  SIGNED(&A) Signed -10
  5 EEQU   &C Signed -10
   FFF6+EEQU   -10Signed -10
  6 SE   EQU   SIGNED(&A) "for SETA, SETB, and SETC"

 

I'd submit a Feedback, but I can't find the web page.
  
In IBM Docs, each page has "Was this topic helpful?" in the top

right corner.  If you don't like something, click on the thumbs
down icon and you will be prompted for input, which will be sent
to the product documentation team for that page.
   .

At 

I did not find that example appearing in the Ref. pdf.  Did I
miss a hyperlink?

I submitted a Feedback on the missing example.  Alas, Feedback
provides no acknowledgement as the older RCF did.

--
Thanks again for your attention,
gil


Re: Negative SETA values (was Fw: BXLE usage assistance)

2024-06-07 Thread Paul Gilmartin

On 6/7/24 11:53, Jonathan Scott wrote:

...
 The SIGNED built-in function was
introduced as a partial workaround.
 .

I had been unaware of the SIGNED BiF.  I find the examples
in the Language Ref. inadequate:

SIGNED(10)has value '10'
SIGNED(-10)   has value '-10'^M&A   SETA  10
&C   SETC  '&A'
&A   SETA  -10
&C   SETC  '&A'
&A has value 10
&C has value '10'
&A has value -10
&C has value '10' (unsigne)

It would be valuable to have a few more lines
with the argument a SETA symbol such as:
&A   SETA  -10
&C   SETC  'SIGNED(&A)'  Apostrophes?
&C has value '-10' (signed) (Or is it yet unsigned?)

I'd submit a Feedback, but I can't find the web page.

--
Thanks,
gil


Re: Negative SETA values (was Fw: BXLE usage assistance)

2024-06-07 Thread Paul Gilmartin

On 6/7/24 11:53, Jonathan Scott wrote:

Compatibility is critically important.
 .

Thanks for your reply.  I'm hardly surprised that it
mentions "compatibility".

And I'm astonished that the behavior had been institutionalized
in macros etc. before it surfaced as a problem.  And dismayed
that the resolution was to delete the "-" rather than to report a
syntax error.  Either is a behavior change.


We looked into the old problem of negative SETA values being
substituted without a sign long ago, but rapidly identified some
internal cases where including the minus sign would break
existing macro code.  The SIGNED built-in function was
introduced as a partial workaround.
 .

That seems a more orderly approach than FLAGS or COMPAT--
less impact on existing code.  Some programmers might
use SETA and SETC interchangeably.  Can SIGNED be used
on a SETC symbol?
...

However, if common product-related macros may be relying on the
lack of a sign, changing the results could cause problems.  For
this reason, I think it would be better to implement the FLAG
option first, so that we can get an idea of how common this
problem might be before we decide whether to provide the option
to fix it.



--
Thanks again,
gil


Re: Fw: BXLE usage assistance

2024-06-07 Thread Paul Gilmartin

On 6/7/24 10:23, Seymour J Metz wrote:

Metz's Law: You may be good at arithmetic but the assembler is better
.

Except for negative SETA values.

How did that happen and why wasn't  it fixed promptly
or ever?  Lexical entanglement?

--
gil


Re: The best way to check any virtual address

2024-06-04 Thread Paul Gilmartin

On 6/4/24 10:58, Peter Relson wrote:

My summary: the best way to check any virtual address is not to check it.
 .

There may be a need to roll back the effects of a partially
completed transaction.

But there are products designed to handle such things.


--
gil


Re: RES: The best way to check any virtual address

2024-06-03 Thread Paul Gilmartin

On 6/3/24 16:17, Tony Thigpen wrote:

I am also interested in the responses to the original question.

I provide a major subsystem with a very complex API on z/VSE. (EZASMI/EZASOKET) 
One of our biggest issues is editing the addresses passed in the parm list. 
While we have some code that seems to do the required edits, it's not what I 
would call the best option. I am watching this thread because something might 
be suggested that I can also do on z/VSE.

I don't know what is behind the OPs question, but it is a good question when 
you are a subsystem or called API and you have no control over the caller's 
code and what they pass.
 .

The hardware  provides the control.  If, like some complex instructions
which perform a test execution, you are concerned with preventing side
effects of a failure you can verify input parms are readable with
CLC parm,parm
and that output parms are writable with
OC   parm,parm

There is some performance penalty and dump reading challenge.

--
gil


Re: RES: The best way to check any virtual address

2024-06-03 Thread Paul Gilmartin

On 6/3/24 15:34, João Reginato wrote:

I meant a simplest way to check if the address is still available and don´t
touch it if don't.
Like LRA or TPROT or other similar instructions do
 .

Such instructions are prudently designed to detect and report
attempted unauthorized access.  Are you attempting to defeat
that design, ore are you just curious?


-Mensagem original-
De: Binyamin Dissen
Enviada em: segunda-feira, 3 de junho de 2024 17:00

Why?

What would you code do differently?

Just recover from the 0C4.

You could use VSMLOC, but that won't help you with key mismatches. And, of
course, that can change after you get your response.


--
gil


Re: The best way to check any virtual address

2024-06-03 Thread Paul Gilmartin

Did you intend to request private replies?  The topic seems
to be of general interest.

On 6/3/24 12:56, João Reginato wrote:


What do you guys use to check if a virtual address is still valid to avoid a
S0C4?
 

Why not set an ESTAE and field  the S0C4?

Valid for read or valid for tor store?

Why?  Beware of TOCTTOU.

--
gil


Re: Assembler Listing PRINT OFF Issue

2024-05-28 Thread Paul Gilmartin

On 5/28/24 10:02, David Clark wrote:

...
Obviously, having copy names match is desirable.  But, when there are
multiple macros or dsects in a single copy source then it is not possible.

If y'all don't have a solution for this then it should be an enhancement
request.
 .

An Idea for HLASM which should identify the catenand.

Otherwise, replicate your SYSLIB allocation in TSO,
and use ISPF DDLIST M to find the origin.

--
gil


Re: SV: ASMA043E Previously defined symbol

2024-05-05 Thread Paul Gilmartin

On 5/4/24 22:36:27, Ed Jaffe wrote:

   ...
But we had a register equates macro that came to conflict with
IATYREGS when we added JES3 support.  Many JES3 headers used
IATYREGS conditioned on setting ofa GBLB. 


All of the IATY macros have similar conditioning, thus allowing duplicate 
(usually embedded) mapping macro invocations without assembler errors.
 .

By that time I was not an Assembler coder but a sympathetic spectator.

The product was a couple years old before we added JES3 support.

Our coding conventions required that each Assembler module COPY
a standard module prologue containing register equates, branch
around eyecatcher, etc.

We could remove the register equates and substitute IATYREGS but
we feared that might introduce conflicts with established non-JES3

Earlier, I had been  assigned to create a functional macro which
required some definitions: EQU, DSECT, ...  I coded that to
MEXIT immediately on repeated calls.  Then I went a step further:
I added a call to my definitions macro to my functional macro,
avoiding explicit prerequisites.

It worked but my co-workers were apoplectic to see definitions
appear in the midst of executable code.

That may have contributed to the brevity of my term a an
Assembler programmer.

--
gil


Re: IEABRC anomaly

2024-05-02 Thread Paul Gilmartin

On 5/2/24 11:16:13, Seymour J Metz wrote:

Except that IEABRC is only necessary for old code. I've inherited code that 
uses NOP as a switch, overlaying the mask with F.
.

Self-modifying or EX code!?

--
gil


Re: ASMA043E Previously defined symbol - Rexx

2024-05-02 Thread Paul Gilmartin

On 5/2/24 06:21:02, Tony Thigpen wrote:

What does the REXX compiler do with duplicate labels?
 .

Compatibility with ANSI Rexx should require tolerating them.


Phil Smith III wrote on 5/1/24 1:00 PM:



That's bad.


That's WAD. Remember, the goal of Rexx was ease of use. Just sayinn'.

<  .
Earlier, someone remarked that some interpreters initially
compile to pseudocode.  That can detect such errors.
Regina, for example, readily flags:
trace  R
return

do Loop = 1 to 5
end WTF

Error 10 running "ret", line 5: Unexpected or unmatched END

CMS and TSO Rexx ignore that.

Peculiarly, TSO Rexx axcepts leading tabs for indention if the
exec is loaded from SYSPROC but reports them as illegal characters
if the exec is loaded from SYSeXEC.  Different preprocessor.

--
gil


Re: SV: ASMA043E Previously defined symbol

2024-05-01 Thread Paul Gilmartin

On 5/1/24 09:53:45, Willy Jensen wrote:

REXX is fine with the same label occurring multiple times, it just picks the 
first.
 .

That's bad.



-Oprindelig meddelelse-
Fra: Charles Mills
Sendt: 1. maj 2024 17:47

I don't think that anyone has mentioned this point but I think that all 
languages with which I am familiar (and that support data declarations of some 
sort) behave the same way. COBOL, C, etc. -- all prohibit duplicate (truly 
duplicate, after qualification) labels, referenced or not.
.

There's static scoping to within blocks.  I have used a language
which restricted the scope of macros to blocks.


Rexx does not declare variables, so X = 3; X = 4 is not a conflict, just a 
reassignment. What about Rexx procedure labels? Does Rexx object to


The desire to accept redefinition with identical value appears
to arise from undisciplined design and use of header files.

But we had a register equates macro that came to conflict with
IATYREGS when we added JES3 support.  Many JES3 headers used
IATYREGS conditioned on setting ofa GBLB.  My suggestion
either to condition our header likewise, or simply to
rely on IATYREGS was rejected.

--
gil


Re: ASMA043E Previously defined symbol

2024-05-01 Thread Paul Gilmartin

On 4/30/24 15:55:55, João Reginato wrote:

 .
The message “ASMA043E Previously defined Symbol” is always issued when an
already defined field is redefined, even if it is not referenced,

making the compiler end with error (return code 8).
 .

Does "the compiler" (which?) improperly generate duplicate labels
in source code it passes to the Assembler?  If so, it should be
reported as a bug in that compiler, not an RFE for the Assembler.

Or is it PEBKAC?


I see this situation as it was just a warning issue (with return code 4).

Is there a reason for this behavior?


Lurking Astonishment for a  programmer accustomed to tolerating RC=4
in ancient code who unwittingly adds a reference to one symbol,
unaware of a duplicate.

I once used a simple two-pass assembler (CDC) which apparently shared
much code between the two passes.  Pass 2 called the add symbol
routine the same as Pass 1.  No error was reported if the value to
be assigned was identical, so it would have tolerated:
X  EQU  42
X  EQU  42

The FORTRAN compiler cascaded source code to that assembler, and
missing labels were reported only by assembler messages.

--
gil


Re: IEABRC anomaly

2024-05-01 Thread Paul Gilmartin

On 5/1/24 07:56:17, Seymour J Metz wrote:

It turns out that IEABRC does not convert NOP to JNOP. Is that a bug or a 
feature?
 .

Does NOP depend on a base register?

--
gil


Re: Complex immediate fields

2024-04-15 Thread Paul Gilmartin

On 4/15/24 20:31:33, Seymour J Metz wrote:

Expect a performance hit if you modify instructions. I like to use LOCTR to 
keep data physically remote but visually near the instructions that use them.
 .

LOCTR is a boon for reading source.  Perhaps less so for reading dumps.
Are any symbolic debuggers LOCTR-savvy, perhaps assisted by ADATA?

--
gil


Re: Complex immediate fields

2024-04-15 Thread Paul Gilmartin

On 4/15/24 10:09:06, Charles Mills wrote:

...
And I would never, ever embed data in the instruction stream.
 .

I.e. no parameters following the CALL-type instruction?
Don't some library macros (still) do this, bypassing with
a relative (ugh!) branch instruction?

Are instruction pages distinguished from data pages nowadays?

Do page faults behave differently between the two?

Are instruction pages REFReshable?

--
gil


Re: Complex immediate fields

2024-03-29 Thread Paul Gilmartin

On 3/29/24 10:56:49, Seymour J Metz wrote:

Ba... I consider

  LFI   R15,X'4000'

to be ugly, and would like to be able to either use an immediate field combing 
CL1 and XL3 pieces or to refer to an EQU defining that combination. Is there 
any way to do that in HLASM?
 

Is LOCTR any help?

(You would have loved the PDP-6 immediate facility.  An immediate
value could be any sequence of instructions and constants.)

--
gil


Re: Why am I getting ASMA145E (was Re: Macro parameters: parsing a relocatable address)

2024-02-27 Thread Paul Gilmartin

On 2/27/24 05:21:41, Seymour J Metz wrote:

Because 24(R3) is not an expression. The second operand of the USING must be 
either a register number or a relocatable expression.
 .

Rather than
 USING MY0004,24(R3)
would
 USING MY0004-24,R3
have the desired effect?

--
gil


Re: Hiding COPY text

2024-02-23 Thread Paul Gilmartin

On 2/23/24 13:12:16, Seymour J Metz wrote:

Configuation Management using Endevor.
 .

Does Endevor let you define your own build processes as,
for example, "make" does (but SMP/E doesn't.)

Are you concerned with suppressing the listing of the
IEABRC macro definition, or of its expansion?


--
gil


Re: Hiding COPY text

2024-02-23 Thread Paul Gilmartin

On 2/23/24 10:06:02, Martin Trübner wrote:

There are exits in HLASM that can be used to suppress printing according to you 
own rules.
.

This becomes burdensome for anyone intending to publish
assembler source code.

--
gil


Re: Hiding COPY text

2024-02-23 Thread Paul Gilmartin

On 2/23/24 07:34:33, Seymour J Metz wrote:

I don't want to use PRINT OFF for the COPY of ASMMSP or IEABRC, but I don't 
want to clutter up the listing. Is there an analog of PRINT NOGEN for code in a 
COPY?


Make a private copy of ASMMSP or IEABRC.  Add PUSH--NOGEN--POP.

I once wrote or modified a cross-assembler to show the hex
for the first generated instruction even with NOGEN in effect.
Users didn't like  it -- they wanted to see blanks there.  I had
to make it work "just like IEV90."

--
gil


Re: How to create a pdf file from Mainframe

2024-01-09 Thread Paul Gilmartin

On 1/9/24 21:36:50, Roger Bolan wrote:

Infoprint Server is a component of z/OS.  It has a companion product IBM
Print Transforms from AFP. 


Is it separately priced?


The afpxpdf transform can transform either line
data or AFP into PDF.  Infoprint Server can take that PDF and send it to
printers or email the PDF as an attachment.  All of the documentation on
Printing with PSF, Infoprint Server, and using the Transforms can be found
under this link:  Infoprint Server and Transforms, PSF for z/OS - APS - IBM
Documentation

--Roger

On Mon, Jan 8, 2024 at 10:51 AM sudershan ravi wrote:


Could someone help me on creating a pdf file from the mainframe job. What
are the options we have?

--
gil


Re: How to create a pdf file from Mainframe

2024-01-08 Thread Paul Gilmartin

On 1/8/24 10:51:14, sudershan ravi wrote:


Could someone help me on creating a pdf file from the mainframe job. What
are the options we have?


Start here; look for TXT2PDF.


--
gil


Re: Setting &sysect as CSECT or on using

2023-12-20 Thread Paul Gilmartin

On 12/20/23 12:58:41, Seymour J Metz wrote:

Why not

  MACRO
...
&SYSECT  &SYSSTYP
&SYSLOC  LOCTR
  MEND
.

Doesn't &SYSLOC  LOCTR imply &SYSECT  &SYSSTYP?  I don't believe
it creates a duplicate-named location counter in a different section.
 

Is there an RFE for PUSH CSECT, PUSH DSECT or PUSH LOCTR?
.

I think Tony's suggestion covers the meager use case.




From: Tony Harminc
Sent: Wednesday, December 20, 2023 2:46 PM> 
  MACRO

...
&N   SETC '&SYSECT'
&T   SETC '&SYSSTYP'
BLAH DSECT
...
&N   &T
  MEND

is common enough in our code. I can't say I've tried it, but presumably it
would work with an unnamed xSECT.


--
gil


Re: Setting &sysect as CSECT or on using

2023-12-20 Thread Paul Gilmartin

On 12/20/23 09:21:39, Joseph Reichman wrote:

I understand if I want to make it work I’ll have to break up the macro into 
parts finish the fest after I have a CSECT statement
 .

It works as intended as it is.  I believe the design objective of
&SYSECT is to allow the coder of a data area DSECT to restore the
caller's environment before exit.

What do you want otherwise?

If you need the label value of a CSECT instruction surely you can
use that value later in the macro without resorting to &SYSECT.
Using a LCLC symbol for that might simplify your code.

--
gil


Re: Setting &sysect as CSECT or on using

2023-12-19 Thread Paul Gilmartin

On 12/19/23 20:12:56, Joseph Reichman wrote:

The definition of the macro was before a CSECT was established the macro module 
from file192 established a CSECT
When I established a CSECT before the macro definition the &sysect picked it up
.

Does the following do what you expect?  Otherwise, what?

 MACRO
&L   M
&L   DCC'&SYSECT'
 MEND
*
 PRINT GEN
SEC  CSECT
HERE M
 END

--
gil


Re: Setting &sysect as CSECT or on using

2023-12-19 Thread Paul Gilmartin

On 12/19/23 20:12:56, Joseph Reichman wrote:

The definition of the macro was before a CSECT was established the macro module 
from file192 established a CSECT
When I established a CSECT before the macro definition the &sysect picked it up
 .

I don't see your code.

"file192"?

I believe it's quite conventional before a CSECT instruction.
&SYSECT should be evaluated at the point of call, not definition.


On Dec 19, 2023, at 10:07 PM, Paul Gilmartin wrote:
   ...
This is confusing.   Please post a complete small program showing
the problem you see.  PRINT ON,GEN

If the macros are not standard, supply instream macros.


--
gil


Re: Setting &sysect as CSECT or on using

2023-12-19 Thread Paul Gilmartin

On 12/19/23 17:53:53, Joe Reichman wrote:

The macro was invoked in the context of unnamed csect However the Macro established 
CSECT would having a macro Whitin a macros solve this I guess the first macro would 
establish the CSECT allowing me to use &sysect in the second macro
.

This is confusing.   Please post a complete small program showing
the problem you see.  PRINT ON,GEN

If the macros are not standard, supply instream macros.

--
gil


Re: Linkage Editor Include Order

2023-12-04 Thread Paul Gilmartin

On 12/4/23 13:05:05, Dave Clark wrote:>  I found an answer that works 
for z/VSE.  After cataloging the main

object for my load module, I use the following linkage editor statements
to specify the order I want for my included objects and the linkage editor
honors this specified order.
  
.

Does the z/VSE linkage editor support re-linking an
existing module replacing a few sections?  To do
that on z/OS an ORDER statement may be needed.

And it's regrettable that ORDER allows specifying
a few sections to be included first, but there's
no complementary command to specify a few sections
to be included *last*.

--
gil


Re: Reseting RMODE

2023-12-04 Thread Paul Gilmartin

(Don't be greedy; don't set personal "Reply-to:")

On 12/4/23 07:28:51, João Reginato wrote:

As I've said before, I wasn't clear enough here.
My intent is to change the RMODE during the compilation phase only.
I have all CSECTS with RMODE ANY so, one of them, need to be RMODE 24, and I
cannot change it because the HLASM doesn't allow that. despite it hasn't
finished the compilation of all my csects, issuing the message reported
before.
.

Ir would be marginally useful if HLASM, when the programmer codes
conflicting RMODE instructions, chose the one most restrictive.

But you can simulate this by setting a GBLA wherever any RMODE
is needed and choosing the least one with AIF logic near the
end of your assembly.

--
gil


Re: BAKR/PR and Linkage Convention

2023-11-30 Thread Paul Gilmartin

On 11/30/23 09:38:19, Bill Hitefield wrote:


I have used the following (in a macro) to do that:

$ALIGN   EQU  &VALUE-((*-&CSECT)-(((*-&CSECT)/&VALUE)*&VALUE))
  DC   ($ALIGN)X'00'SET ALIGNMENT
.

How well does such a thing work under a LOCTR?  If such a thing
is used in a LOCTR, or even two different LOCTRs, I could envision
dueling lookaheads.

--
gil


Re: BAKR/PR and Linkage Convenction

2023-11-21 Thread Paul Gilmartin

On 11/21/23 14:32:27, Tom Marchant wrote:


Modern processors use a 256-byte cache line, with separate caches for 
instructions
and data. A cache line maps to 256 bytes of storage on a 256-byte boundary.
There are performance penalties when the same line of storage needs to be in
both the instruction cache and the data cache.
It has nothing to do with the base register used.



Is it recommended, then, to cache-line align LTORG so instructions
and data don't share a cache line.  Is there an instruction that
will continue to do this for future hardware?

--
gil


Re: BAKR/PR and Linkage Convenction

2023-11-21 Thread Paul Gilmartin

On 11/21/23 13:04:25, Jon Perryman wrote:


1. 99% of programs require a workarea. It's simple to add an additional 72/144 
bytes for a save area which places the workarea and savearea together. I 
personally prefer getmain a large area so that no getmain is required for 
subsequent calls.



Someone once counseled me that extending the savearea for a workarea
was unwise.  I suspect he was concerned about wild stores.  I couldn't
see how a wild store based on R13 was worse than any other wild store,
so I ignored him.

--
gil


Re: ASMA057E Undefined operation code SR 15,15

2023-11-15 Thread Paul Gilmartin

On 11/15/23 06:39:33, Peter Relson wrote:

This was a very lengthy thread in which the OP multiple times ignored those who 
correctly provided what was needed. I don't know why the OP would not simply 
take the advice and proceed.
.

I suspect the OP supplied a distilled test case which did not
reflect all his requirements.

--
gil


Re: Needed: INSERT

2023-11-14 Thread Paul Gilmartin

On 11/14/23 15:34:01, Willy Jensen wrote:

Not as far as I could find, I could have used that myself a couple of times.
.

It seems like a good Idea.  I wonder why no one has ever requested it.


 Oprindelig besked 
Fra: Paul Gilmartin 
Dato: 14.11.2023 23.31 (GMT+01:00)> 
On 11/14/23 15:22:19, Willy Jensen wrote:

The way I read the error message is that the entire statement 'SR15,15' is 
read as the op-code.
.

Is there something that works like AINSERT, but processes its operand
immediately rather than buffering it until return to open code?

That would seem to address the OP's need.


--
gil


Needed: INSERT (was: ASMA057E ...)

2023-11-14 Thread Paul Gilmartin

On 11/14/23 15:22:19, Willy Jensen wrote:

The way I read the error message is that the entire statement 'SR15,15' is 
read as the op-code.
.

Is there something that works like AINSERT, but processes its operand
immediately rather than buffering it until return to open code?

That would seem to address the OP's need.

--
gil


Re: SV: ASMA057E Undefined operation code SR 15,15

2023-11-14 Thread Paul Gilmartin

On 11/14/23 14:44:48, Willy Jensen wrote:

I have sometimes used global variables with a recursive call to simulate a 
macro subroutine to validate and set variables.
.

I doubt that's the simplification the OP is seeking.



-Oprindelig meddelelse-
Fra: IBM Mainframe Assembler List  João Reginato
Sendt: 14. november 2023 22:37

yes, it worked too, but I still can't understand why. Maybe a bug?
.

I believe that unlike many macro processors, HLASM's is not merely
string substitution in the lexical analyzer but is aware of the
syntax of the embedding language.

Less probably a bug than WAD, but you can report it and may get
an explanation.  But you need a more complete example than you
posted here.

--
gil


Re: ASMA057E Undefined operation code SR 15,15

2023-11-14 Thread Paul Gilmartin

On 11/14/23 14:16:22, João Reginato wrote:

without the SETC it works but I need it to simplify the logic of a bigger
macro.
.

Please post an example of "a bigger macro" with an explanation of how
the SEtC simplifies it.  If it doesn't work, simpler is *not* better.

--
gil


Re: ASMA057E Undefined operation code SR 15,15

2023-11-14 Thread Paul Gilmartin

On 11/14/23 13:58:30, João Reginato wrote:

Gil

I know it works in the way you've proposed but I need to use the SETC in a
very bigger macro.
.

Please post an example showing the failure without the SETC.

Would it be better to have two separate MACROs, one of which
calls the other?


Em ter., 14 de nov. de 2023 às 17:46, Paul Gilmartin escreve:>>>> .

I believe the SETC is unnecessary.  How a bout just:
   MACRO
&RESTZERO  &N
&RESTSR&N,&N
   MEND

   START
LZERO  15
   END


--
gil


Re: ASMA057E Undefined operation code SR 15,15

2023-11-14 Thread Paul Gilmartin

On 11/14/23 13:28:09, João Reginato wrote:

hi
I can't see the error on this simple code.
Can anyone help me pls?

TIA
João Reginato
(+55 61) 9911-55500


   Active Usings: None

   Loc  Object CodeAddr1 Addr2  Stmt   Source Statement
  HLASM R6.0  2023/11/14 16.58
   1  MACRO
   2  ZERO  &N
   3 &RESTSETC  'SR&N,&N'
   4  &REST
   5  MEND
   6  ZERO  15
   7+ SR15,15
  01-4
** ASMA057E Undefined operation code - 4/SR15,15
** ASMA435I Record 4 in JOAO.QWASM.JOB09574.D101.? on volume:
.

I believe the SETC is unnecessary.  How a bout just:
 MACRO
&RESTZERO  &N
&RESTSR&N,&N
 MEND

 START
LZERO  15
 END

--
gil


Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

2023-11-13 Thread Paul Gilmartin

On 11/13/23 15:59:45, Bob Raicer wrote:

There have been a few posts in this thread that more or less stated
that only complete physical blocks could be read into storage from a
device.

This is not strictly true.> 

We don't know the OP's objective: performance, security, or other.


--
gil


Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

2023-11-13 Thread Paul Gilmartin

On 11/13/23 11:54:07, Schmitt, Michael wrote:

That I don't know. I've only dealt with GSAM checkpoints (which may not support 
RECFM=VBS). And one other: checkpoints in z/OS FTP.

My *guess* is that since a checkpoint has to flush the buffers to disk before 
you fill up the block, even VBS would have a short block.



I stand corrected.  I intended to inquire about RECFM=FBS.


-Original Message-
From: IBM Mainframe Assembler List  On Behalf 
Of Paul Gilmartin
Sent: Monday, November 13, 2023 12:50 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

On 11/13/23 08:23:44, Schmitt, Michael wrote:

As long no one ever uses DISP=MOD


...or checkpoints. Checkpoints can cause short blocks to be written.

(My knowledge is with IMS/DB GSAM checkpoints.)


How does checkpoint interact with RECFM=VBS?

--
gil


Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

2023-11-13 Thread Paul Gilmartin

On 11/13/23 08:23:44, Schmitt, Michael wrote:

As long no one ever uses DISP=MOD


...or checkpoints. Checkpoints can cause short blocks to be written.

(My knowledge is with IMS/DB GSAM checkpoints.)


How does checkpoint interact with RECFM=VBS?

--
gil


Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

2023-11-12 Thread Paul Gilmartin

On 11/12/23 16:18:04, Jon Perryman wrote:


Specifically asked was z/OS RECFM=FB. As long no one ever uses DISP=MOD, then 
the calculation is simple because number of records per block and blocks per 
track is consistent.



RECFM=FBS prevents that.

 You simply divide record number by records per block giving the block number 
used in the point and remainder is the number of records you must read after 
the point. Not quite correct but you get the idea.




That's mostly how the Divide instruction works.


If you need DISP=MOD functionality, then you must create the functionality. All 
programs needing DISP=MOD must open the file for update, position to the last 
block and read until EOF.



... Fill the block with additional records and rewrite in place.
Why, in this 21st Century hasn't that function been added to the
access methods!?  UNIX does it, as you say below.



Suggestions have been made for a USS file. The advantage is that positioning is 
at the byte level instead of block. The calculation is greatly simplified to 
records times record size and DISP=MOD is greatly simplified because Unix does 
an append to the end of the file. The drawback is that the read record size 
must be handled by the programmer.



I think that can be done by the Multiply instruction, provided
by most modern computer hardware.  But fixed-length records are
alien to UNIX -- I think they're a relic of UR-device practice.

--
gil


Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

2023-11-12 Thread Paul Gilmartin

On 11/11/23 19:36:36, Seymour J Metz wrote:

It is possible to do skip sequential reading of physical records. Itt is not 
possible to skip logical records.

There are two cases where it is possible; RECFM=FBS and you know the physical 
record number; you know the TTR of  the physical record.



what does the EXECIO linenum option do?


EXECIO arose on CMS and antedates REXX.  CMS files are indexed by
line number.  I'd expect EXECIO on CMS to do True Skip-Sequential
Processing.  Less likely on z/OS, even for RECFM=FBS.

--
gil


Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

2023-11-11 Thread Paul Gilmartin
On Sun, 12 Nov 2023 02:24:50 +, Seymour J Metz wrote:

>It doesn't have to be FBS if you know the location of the block.
>
Doesn't ISPF BROWSE do  something of that sort, creating an
index for rapid positioning to a requested record?  But it must
(except for FBS?) read once to build the index.


On Sun, 12 Nov 2023 02:21:26 +, Seymour J Metz wrote:

>Are you a betting man? 
>
what's your proposition?

-- 
gil


Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

2023-11-11 Thread Paul Gilmartin

On 11/11/23 06:59:07, David S. wrote:

To help resolve a question posted to a LinkedIn group I manage:
www.linkedin.com/feed/update/urn:li:groupPost:910927-7128598004344786944
... I'd like to find out if there's any way to achieve *true*
Skip-Sequential processing with a Fixed Block Sequential File with a fairly
short record length (i.e. DCB=(DSORG=PS,RECFM=FB,LRECL=80)?
For example: Begin sequential processing at record number 100, *without*
having to read the first 99 records.



This feels like a job for DSFS.


UNIX readily solves the problem with seek() and DSFS is supposed
to mimic a UNIX file with the content of a Classic data set.

Where's the User's Guide for DSFS?

Is the skip count fixed, or is it dynamic, varying up or down
with successive executions of your program?

--
gil


Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

2023-11-11 Thread Paul Gilmartin

On Sat, 11 Nov 2023 08:59:07 -0500, David S. wrote:

   ...

. Sequential processing

*must* begin at specified starting point and there can be *no* reading of
any records prior to that point.


That sounds absurd.  So if a block contains 10 records, you want to
be able to read the last 5 with "*no* reading of" the first 5!?
DASD don't work that way.


My gut feeling is it *cannot* be done - at least not with RECFM=FB.  It
*might* be possible with RECFM=F, but efficiency would then be so
compromised it would  probably outweigh any advantage from *true*
skip-sequential processing.


How about UNIX files with RECFM=FB,FILEDATA=BINARY and using
seek()?  (But that still reads entire blocks into a buffer.)

--
gil


Re: Based vs. Relative

2023-11-09 Thread Paul Gilmartin

On 11/9/23 10:54:39, Steve Thompson wrote:

To get to relative operations, there is an IBM supplied macro that one can 
include right at the top of your source and it can be turned on/off as needed.

As I recall, it does OPSYN to get rid of based branch (jump) and uses the 
relative version.





--
gil


Re: Variable-Length Parameter List Attributes

2023-10-18 Thread Paul Gilmartin

On 10/18/23 13:03:27, Dave Clark wrote:


 All I know is that is what my Notes client generates for replies
with an internet-style history.  Apparently, Notes sees your post as
coming from the list rather than from you.  Sorry.;-)


'Way back, RFC 822 specified tie From: and Sender: headers.  Alas,
too many LISTSERVs and MUAs proudly break the rules.

--
gil


Re: Variable-Length Parameter List Attributes

2023-10-18 Thread Paul Gilmartin

On 10/18/23 11:49:12, Dave Clark wrote:

...
 The z/VSE CALL macro does not have those last two keywords.  But,
I can just code ORG *-2 after the CALL to accomplish the same thing.
Thanks.


ORG or B into code generated by a macro whose source you don't
control is genuinely dangerous.

--
gil


Re: Variable-Length Parameter List Attributes

2023-10-18 Thread Paul Gilmartin

On 10/18/23 09:53:35, Dave Clark wrote:

SHVPARMB DS 5F However, the program I am calling will actually accept 4, 5, or 
6 parameters in this list. So, I believe that T' will return F and L' will 
return 4, but is there any attribute that will return the 5 in the above 
definition? I ask, because I would rather not hardcode the following to set the 
end flag for the list. OI SHVPARMB+(5*4-4),X'80'


I'd code:
SHVPARMB DS5F  Is this hard coded?
endPARMB EQU   *
Then:
OIENDPARMB-4,X'80'

--
gil


Re: unsubscribe

2023-09-26 Thread Paul Gilmartin

On 9/26/23 15:09:11, Juan Escamilla wrote:

unsubscribe


""

--
gil


Re: Placeholder Instruction

2023-09-26 Thread Paul Gilmartin

On 9/26/23 08:21:32, Martin Ward wrote:

On 26/09/2023 14:54, Paul Gilmartin wrote:

It wold be futile to attempt to write a C program with
semantics of a FORTRAN program.  It's futile to write
an Assembler program which would work if it were COBOL.


Polyglot would beg to differ: https://ideology.com.au/polyglot/


But it doesn't mention Assembler (or Rexx.)

ANOP would be a good placeholder candidate except for the
requirement for a sequence symbol.
Would it be a good Idea to make the sequence symbol optional?
Would that compromise error reporting?

Would it be a good Idea to allow CNOP 0,1?
Would that compromise error reporting?

Or just define an instream null macro.

--
gil


Re: Placeholder Instruction

2023-09-26 Thread Paul Gilmartin

On 9/26/23 07:26:18, Dave Clark wrote:

"IBM Mainframe Assembler List" wrote on
09/25/2023 05:55:23 PM:

Just put another WHEN right after it.

   SELECT
WHEN   1
  something
WHEN  2
WHEN  3
  something
ENDSEL ,

No need for a placeholder instruction.


 Thanks.  Yes, that would work but I don't like how it looks.
Because, to a COBOL programmer, it looks like an OR condition as it is in
COBOL.  I wanted the placeholder instruction so that even a COBOL
programmer won't mistake the intent.
 
Would Assembler accept "WHEN 3 AND NOT 2"?


Various programming languages have different semantics
for constructs that appear similar.  For example:
CONTINUE in FORTRAN is quite different from
continue in C.

It wold be futile to attempt to write a C program with
semantics of a FORTRAN program.  It's futile to write
an Assembler program which would work if it were COBOL.

Do you have a distaste for comments?  Comments are your
friend.  Add a comment explaining what you're doing.

--
gil


Re: Placeholder Instruction

2023-09-25 Thread Paul Gilmartin

On 9/25/23 14:32:57, Dave Clark wrote:

 In COBOL, an EVALUATE-WHEN-END-EVALUATE construct can use the
CONTINUE verb as a placeholder where you would normally need an imperative
statement.  Well, in ASSEMBLER I have a SELECT-WHEN-ENDSL construct in
which I now need the same kind of placeholder instruction.  In storage I
have used CNOP for alignment purposes but I don't think that is what I
want in this case.  I know there are a number of instructions (compare,
branch, etc) that CAN be used as such a placeholder but the manual says
these are not the best way to do that kind of thing.  But it doesn't say
what IS the best way to do this and I don't see a NOP or NOOP -- as I
would expect.  What am I missing?!?



What do you need other than one of:
 BCR   0,0
 DS0H
???

--
gil


Re: Self-documenting Bit Settings

2023-08-11 Thread Paul Gilmartin

On 8/11/23 16:42:06, Charles Mills wrote:

Sorry. Did not mean to be cryptic or obscure. By the question mark I meant
"why not?"

Why not AL4?

Yes, I never found it intuitive that A should be word-aligned and AL4 not,
but that is what it is.


*But* AL0 *is* word-aligned.  Go figger.

--
gil


Re: Modifying the CC in the PSW

2023-08-11 Thread Paul Gilmartin

On 8/11/23 06:08:44, David Eisenberg wrote:

...
I know that I can always code the comparands in the correct order by loading 
them into the high-halves of R0 and R1, then use CLHHR. Or, of course, I can 
generate a CLC with a literal. But I figured I’d ask: if I use CLHHSI, then (if 
the macro determines that it’s necessary) can I modify the resulting condition 
code to appear as though the original comparands were swapped? (I.e.: CC=00 
stays the same, CC=01 becomes 10, CC=10 becomes 01.)



Are the Set/Insert Program Mask instructions useful for this?

--
gil


Re: How to enter tiny Binary Floating-Point value

2023-08-02 Thread Paul Gilmartin

On 8/2/23 09:52:47, Jonathan Scott wrote:

Shmuel (Seymour J.) Metz writes:

That still leave the question of HLASM syntax for DC. I would
hope that it's been extended to handle tiny floating point.


This has not been done so far, as the architects said it should
not be needed, as it was not for general programming purposes.



Are there hardware instructions supporting the format?
Could it be generated with a library macro?


... it was primarily for use as a data
format for NNTP input ...



Ah, Usenet.  I remember it fondly.  Does LISTSERV rely on NNTP?



...  the main things to be resolved would be
what to call the DC type and what type attribute it should have
(given that all upper case letters and some other characters
have already been used).



HLASM appears to have made a bad design choice in making the
case attribute case-insensitive.

--
gil


Re: looking for limbo languages - how low can you go?

2023-07-18 Thread Paul Gilmartin

On 7/18/23 13:30:35, Rick Troth wrote:


I'd like to think that I'm somewhat broad minded: I hate Java, but not the 
language, rather the requirement for the JVM and the ecosystem which has grown 
up around it.


Java can be done very wrong.  I've sought a portable (i.e. to more
than one desktop OS) unXmit.  I thought Java might be a solution,
but what I find is a .tar.gz archive containing dozens of files.

In contrast, identical jedit .jar files (with small wrapper scripts)
run on Linux and MacOS.  and 
GUI runs alike on Linux, displaying via X11 and MacOS, displaying via
system graphics.  The file open dialog works on both.  I guess thee
things are implemented in the maligned JVM.  the separate CLI works
on desktop and z/OS.

 

*Java was a language looking for a purpose, then found popularity when the web 
was young


Java?  Or Javascript?

--
gil


Re: looking for limbo languages - how low can you go?

2023-07-18 Thread Paul Gilmartin

On 7/18/23 15:10:47, Phil Smith III wrote:

Rick wrote about C and its power. As he noted, I *was* referring to the macro 
language/preprocessor when I said "pathetic". Because it is. It's old enough 
that it really should be more mature.


Pascal has no macros.

If the language is (FSVO) sufficiently complete it shouldn't need
them.  Perhaps expanding subroutines inline for optimization.

--
gil


assembler-list@listserv.uga.edu

2023-06-29 Thread Paul Gilmartin

On 6/29/23 13:31:11, Seymour J Metz wrote:

   ... I don't understand why division by zero is valuable and not an error.


IIRC, it provides a (too) clever way of generating a boolean at
assembly (not conditional) time:
(X-Y)/(X-Y) is one iff X<>Y.

--
gil


assembler-list@listserv.uga.edu

2023-06-29 Thread Paul Gilmartin

On 6/29/23 11:17:06, Seymour J Metz wrote:

It looks like it supports expressions but not USING.


Does it support division by 0?  The mavens hereabouts have told me
that is a valuable feature of HLASM when I'd rather see it treated
as an error.

I can think of exactly one good reason for not using HLASM on Linux.

But GNU is probably a fork of a hardware-neutral assembler.  I once
needed to modify some ISV source code like that.  I don't recall
whether it was USING-aware.  It was rife with BALR RBASE,0 rather
than using a code base register.  And it dedicated two registers
to -4096 and -8192 so they could simulate negative displacements
in an era before the hardware provided them.



From: Jonathan Scott 
Sent: Thursday, June 29, 2023 12:22 PM

The GNU assembler as used for Linux on IBM Z uses a similar
"raw" format for instructions to that shown in Principles of
Operation, although with some differences.  There is more
information about it here, comparing with HLASM:

   
http://secure-web.cisco.com/164iyEgpWbUJavTf-6_rgAlU3dioQWeCabqtRHRrbFegtOIpqH2v6aVaF8DOr5hLL5noHenII54JtZK7p-odbC6_3ob6NGTqpkBMr9_pZoKWWtED8dFYRnR2m8Px6zL2-Q3tb6dmcux134qDwfAnB5Ryo8_cJPNF6MUcVFgKfBbgnpuIp_kEcOG7zEm8Bird7h4pL8ri5ksBAnrdS5StmbOyRlOhL5LwiUnaxcS-Ivxucre8UcTqDXMkbmYAl3vek2nlBGGWBs3dLBCsxFjK_tteQlgMeWj56qtgzQh0_FSMpw05qbrlh4HCEQorVEIoYsc0QpeI0trZ0Csle5exClJyiw0fBgoD077J1z16g6FNmtNxlqqPrAlSi6uDyWhF6dt8Pwrljsfhw555Hm0iYwQlMeYn9b8a0oBmdDOO4O0k/http%3A%2F%2Flinuxvm.org%2FPresent%2FSHARE99%2FS8131db.pdf

--
gil


assembler-list@listserv.uga.edu

2023-06-28 Thread Paul Gilmartin

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


assembler-list@listserv.uga.edu

2023-06-28 Thread Paul Gilmartin

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:

&NAMESETC  '&&X'
 LCLC  &NAME

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

(What about LCLA and LCLB?)

--
gil


Re: Conditional assembly variable scope

2023-06-27 Thread Paul Gilmartin

On 6/27/23 12:17:21, Seymour J Metz wrote:

No. If you have a business case, maybe an RFE for name spaces.



Oooh!  Oooh!  Oooh!  Also for label symbols as well as conditional
symbols, freeing the programmer of the burden of using distinct
component prefixes in data area definitions.

It could mesh well with labelled USING.

FAP did this with the HE[A]D pseudo-op.



From: Paul Gilmartin

Is there a way to declare a symbol in a macro so that it is
visible in the declaring macro and in macros it calls but
not in open code nor in macros calling the declaring macro?

That would mimic the customary behavior of static scope in
block structured languages and POSIX shell "export", but
not quite REXX "PROCEDURE EXPOSE"..


--
gil


Re: Conditional assembly variable scope

2023-06-27 Thread Paul Gilmartin

On 6/27/23 11:04:43, Jonathan Scott wrote:

Would any know the difference in scope
Of a local used in open code and a global used
In a macro the both seem to have a scope of the entire assembly


A local variable is unique to the context where it is defined,
so a local variable defined in open code applies to all open
code, and a local variable in a macro is defined only in that
macro.  If the same name is used for a local variable in a
different context, it refers to a separate variable.

A global variable is the same variable in all contexts where it
is defined.



Is there a way to declare a symbol in a macro so that it is
visible in the declaring macro and in macros it calls but
not in open code nor in macros calling the declaring macro?

That would mimic the customary behavior of static scope in
block structured languages and POSIX shell "export", but
not quite REXX "PROCEDURE EXPOSE"..

--
gil


Re: Shower thought

2023-06-13 Thread Paul Gilmartin

On 6/13/23 09:42:56, Seymour J Metz wrote:

In both cases they are treated numerically as a whole, For logical instructions the 
operands are treated as unsigned numbers. The distinvtion goes back to the vacuum tube 
("valve" for you Brits) machine, well before S/360.


Citation needed. 


But it's jargon, exempt from requirement for explanation.

I would have chosen "Unsigned" but others might argue that
would refer to the magnitude, ignoring the sign bit.  Etc.

And there may have been trademark entanglements with opcode
mnemonics.

--
gil


Re: Shower thought

2023-06-07 Thread Paul Gilmartin

On 6/7/23 15:13:28, Charles Mills wrote:


@Gil said it better than I.


Thanks for the comple^Himent.

I decided to search the Assembler Services Ref.,
for abuses of "hexadecimal".  I got only as far as ABEND when I
found the astonishing:
,REASON=reason code
Specifies the reason code that the user wants to pass
to subsequent recovery exits. The value range for the
reason code is a 32-bit hexadecimal number or a 31-bit
decimal number.

This appears to say that X'87654321', a 32-bit hexadecimal
number is supported, but the equivalent F'-2023406815' is
not supported because it's a 32-bit, not a 31-bit decimal
number.

I'll submit an RCF.  That begs for clarification.

--
gil


Re: Shower thought

2023-06-07 Thread Paul Gilmartin

On 6/7/23 15:13:29, Seymour J Metz wrote:

Given that the word length is a multiple of 4 bits, it is natural to group the 
data into groups of 4 bits, just as on 36 bit machines it was natural to group 
bits into groups of 3 and use octal notation. Add in the hexadecimal floating 
point and hex seems even more natural. The values 10 base 10 and 0A base 16 are 
the same, as is 1010 base 2, and which you use is purely a matter of convention 
and convenience.


After DEC had for a decade marketed 18-, 36-, and 12-bit machines
with instruction fields that divided naturally(?) into multiples
of 3 and (mostly) 6-bit characters, octal became the cultural
imperative for representing computer data.

Then came the 16-bit PDP-11 with 8-bit characters.  IIRC, the
initial cumbersome accommodation was to represent each octet
as 3 octal digits with values from 000 to 377.

--
gil


Re: Shower thought

2023-06-07 Thread Paul Gilmartin

On 6/7/23 15:15:40, Jon Perryman wrote:


... To us, signed integer is ones complement> with bit 0 being the sign 


Who "us"?

--
gil


Re: Shower thought

2023-06-07 Thread Paul Gilmartin

On 6/7/23 13:59:39, Charles Mills wrote:

Generally speaking, for most instructions and architectures, comparisons end at 
inequality, to unequal operands may compare faster than equal ones.


An exception may be in DB operations where equi-joins can be
faster than non-equi-joins.

OK.  Joins are not really comparisons.

--
gil


Re: Shower thought

2023-06-07 Thread Paul Gilmartin

On 6/7/23 14:08:16, Charles Mills wrote:

Dave, no offense was intended. Yes, I totally understood your meaning.

The mis-use of the term hexadecimal to mean vaguely "some value, possibly
not a printable character" is a personal bugaboo of mine. The IBM doc does
it: talking about specifying a word as containing "a hexadecimal value" when
what they mean is a binary value. Specifying a hexadecimal value would mean
specifying (character) 000A when what you meant was a binary value equal to
decimal 10.


+1

In IBM doc, how many RCFs would it take do remove the superfluous
and misleadingly apparently restrictive occurrences of hexadecimal
from "any hexadecimal"?

I suspect the intent was "any value that can be represented in
Assembler as a hexadecimal constant", but "any" suffices.

--
gil


Re: Notepad++ language formatting

2023-06-05 Thread Paul Gilmartin

On 6/5/23 11:10:03, Charles Mills wrote:


... XML ... 


Ah!  The language name I was looking for.  Thanks.   Now,
GIYF, the jargon seems to be "plugin" in place of "macro".

And, for self-reference, there appears to be a plugin, presumably
coded in XML, to format XML code.

--
Thanks again,
gil


Re: Notepad++ language formatting

2023-06-05 Thread Paul Gilmartin

On 6/5/23 09:30:05, Charles Mills wrote:

There are potentially three meanings for "macro" in this thread.

1. Part of what the formatting does is highlight z/OS macro names in the code. 
So if you code GETMAIN it knows that is a keyword, not some random token. There 
is a list of z/OS macro names in the file that makes that magic work.

2. Part of what the formatting does is highlight comments. If you code * Clear 
R2 then it knows to format that in green italics. HLASM has macro comments that 
begin with .* and unfortunately Notepad++ does not have any ability to 
recognize comments based on their first TWO characters. You just can't do that 
in a formatting file.


I wouldn't regard those two as different -- just the same operation,
possibly using different colors.

 

3. @Gil apparently assumed there were some sort of macros in the formatting 
process itself. A macro to recognize a comment or something like that. Nope, it 
does not work that way. There are no macros in the formatting file itself.


I suppose that might be done by modifying the core code of Notepad++
itself, but I doubt that's what you did.

If I were doing such a repetitive operation in XEDIT or ISPF, I would
use external code in REXX, EXEC2,  CLIST, ..., commonly called a
"macro".  Has Notepad++ have such a facility for encapsulating
routine repetitive operations, apparently not called a "macro"
but something else.  In what language might it be coded, even as
for XEDIT or ISPF I'd use REXX or CLIST?
 
--

gil


Re: Notepad++ language formatting

2023-06-04 Thread Paul Gilmartin

On 6/3/23 21:13:53, Charles Mills wrote:

Geez, people. This was not a religious statement about platforms. This was a 
personal tool that I decided to share.


I was not advocating for THE or Kedit, merely observing that
they might be more familiar to HLASM programmers.

Given Windows, my favorite editor is Notepad++.  Notepad displays
UNIX files as terraces.  Wordpad displays UNIX files correctly,
but Saves them with Windows lineends.  Notepad++ handles both
Windows and UNIX files correctly.


Why did I develop the file? I wanted highlighting for HLASM in the editor that 
I was already using.
...
BTW @Gil, the macros in question are HLASM macros with .* comments, not some 
sort of NP++ XML macros.


I'm puzzled.  I had assumed the macros mentioned were to accomplish
highlighting for HLASM, and would have expected them to be written
in a desktop language such as VBA or .BAT or ... (Regina?), not
HLSAM, which I wouldn't expect the desktop to understand.

--
gil


Re: Notepad++ language formatting

2023-06-03 Thread Paul Gilmartin

(Forgive unintended previous reply.)
(Why do most plies here request personal, not list, eplies?)

On 6/3/23 19:55:15, Ze'ev Atlas wrote:
T Most everybody is on Windows. 


The operannt word is "Most".

... there are at least two Linux clonesZA

Cite, please.  Do these accept Charles's and Abe's macros?

I find:
7 Best Notepad++ Alternatives For Linux


The first is Wine -- guaranteed compatibility.  Some of the others
are UI-compatible; unlikely to be macro-compatible.

--
gil


Re: Notepad++ language formatting

2023-06-03 Thread Paul Gilmartin

On 6/3/23 14:18:23, Charles Mills wrote:

Thank you Abe.

Frankly, Notepad++'s format recognition in general is about 80-90%. I was just 
working on a Rexx program and noticed it was off. Usually selecting the 
language type again -- just clicking Language Rexx or HLASM again -- reminds 
Notepad++ of what it is supposed to be doing.

Charles


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Abe Kornelis
Sent: Saturday, June 3, 2023 11:30 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Notepad++ language formatting

All,

based on the work by Charles Mills I created an updated/extended version
including all current instructions according PoP, more macros,
more register names, and more file types.

It is not perfect, but it does a reasonable job.

So I submitted it to the Notepad++ community.
They've taken it up in their library/repository at
https://github.com/notepad-plus-plus/userDefinedLanguages

If you want to give it a try, you can import
the definitions from that repository.

If there is sufficient 'demand' I'll consider working
with the Notepad++ community to improve their
formatting options so we get properly highlighted
assembler source.

Personally I find most annoying that I could not
define macro labels as a separate category.
Notepad++ is unable to distinguish between the
.labels and the .* comments.
Also. recognition of comments is inconsistent.


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


Re: Notepad++ language formatting

2023-06-03 Thread Paul Gilmartin

On 6/3/23 12:29:30, Abe Kornelis wrote:


based on the work by Charles Mills I created an updated/extended version
including all current instructions according PoP, more macros,
more register names, and more file types.

It is not perfect, but it does a reasonable job.

So I submitted it to the Notepad++ community.
They've taken it up in their library/repository at
https://github.com/notepad-plus-plus/userDefinedLanguages

If you want to give it a try, you can import
the definitions from that repository.


Why Notepad++?  I'd expect Kedit or The to be more familiar
to the HLASM community?

Better macro support?  In what language are macros coded?

Portability?  Is Notepad++ available on desktop platforms
other than one, or are the macros editor-agnostic?  Of course,
there's WINE, VirtualBox, or VMWare.  Which of those would
require a license fee?

--
gil


Re: ChatGPT "knows" HLASM

2023-06-01 Thread Paul Gilmartin

On 6/1/23 17:27:21, John McKown wrote:


Oh, I guess I should mention that what got me interested was s YouTube
where the person used ChatGPT to create Python code. The entire point was

...
What are you quoting?  I can't find it in the Archives.



I've found the responses to be very interesting. Hum, I wonder if ChatGPT
know LE.


Eek!

How much guidance did you give it?  (Did you ask for the sum of an array?)

What do you get when you pose a very similar request, but "s/HLASM/C/"?

--
gil


Re: ChatGPT "knows" HLASM

2023-06-01 Thread Paul Gilmartin

On 6/1/23 11:39:34, John McKown wrote:

I asked ChatGPT for an example HLASM program. Here's what I got:

  BALRR9,0 Set the base register
  USING   *,R9 Establish a base register
  LR  R3,R9Load the base register into R3
  LA  R4,ARRAY Load the address of the array into R4
  LA  R5,SIZE  Load the size of the array into R5
  L   R6,0(R4) Load the first element of the array into
R6
  L   R7,=F'0' Initialize the sum to zero
LOOP AR  R7,R6Add the current element to the sum
  A   R4,=F'4' Move to the next element of the array
  LA  R8,1(0,R4)   Load the address of the next element into
R8
  L   R6,0(R8) Load the next element into R6
  CR  R4,R5Compare the current element to the end of
the array
  BNE LOOP Branch back to LOOP if not at the end of
the array
  BR  R14  Return to the caller
ARRAYDC  F'1' Array of numbers
  DC  F'2'
  DC  F'3'
  DC  F'4'
  DC  F'5'
SIZE DC  F'5' Size of the array

Of course, there are a lot of problems with this, such as no CSECT and no
END. But I was amazed it had anything at all.It's fun to play with.



What happens if you ask not to translate the HLASM to C, but to write
a C program to compute the sum of the elements in an array?
Here's what I might do, based on the above:
#include 

long ARRAY[] = { 1, 2, 3, 4, 5 }; /* Array of numbers  */

int main( void ) {
long R7 = 0;
long *R8;

for (R8 = ARRAY;  /* Address first element  */
/* (Is there any way to avoid the magic number "5"?)*/
 R8 < ARRAY + 6;  /* Test for end of ARRAY  */
 ++ R8 )  /* Load the address of the next element into R8  
*/
R7 += *R8;

printf( "Sum is %ld\n", R7 );
return( 0 ); };  /* Return to the caller  */

--
gil


Re: ChatGPT "knows" HLASM

2023-06-01 Thread Paul Gilmartin

On 6/1/23 11:39:34, John McKown wrote:

I asked ChatGPT for an example HLASM program. Here's what I got:

  BALRR9,0 Set the base register
  USING   *,R9 Establish a base register
  LR  R3,R9Load the base register into R3
  LA  R4,ARRAY Load the address of the array into R4
  LA  R5,SIZE  Load the size of the array into R5
  L   R6,0(R4) Load the first element of the array into
R6
  L   R7,=F'0' Initialize the sum to zero
LOOP AR  R7,R6Add the current element to the sum
  A   R4,=F'4' Move to the next element of the array
  LA  R8,1(0,R4)   Load the address of the next element into
R8
  L   R6,0(R8) Load the next element into R6
  CR  R4,R5Compare the current element to the end of
the array
  BNE LOOP Branch back to LOOP if not at the end of
the array
  BR  R14  Return to the caller
ARRAYDC  F'1' Array of numbers
  DC  F'2'
  DC  F'3'
  DC  F'4'
  DC  F'5'
SIZE DC  F'5' Size of the array

Of course, there are a lot of problems with this, such as no CSECT and no
END. But I was amazed it had anything at all.It's fun to play with.



How did it know that?  Plagiarism?  What sources?

But: too many magic constants.  Should use EQU, symbolic differences,
and length attributes:


At last, the best way to clear a register!
 L   R7,=F'0' Initialize the sum to zero
...
 L   R6,0(R4) Load the first element of the array into
Why is that outside the loop?

 A   R4,=F'4' Move to the next element of the array
Use length attribute.

 A   R4,=F'4' Move to the next element of the array
 LA  R8,1(0,R4)   Load the address of the next element into R8
 L   R6,0(R8) Load the next element into R6
 CR  R4,R5Compare the current element to the end of
??? Is R4 a pointer or a counter?

SIZE DC  F'5' Size of the array
Magic constant.

I'd give extra credit for "while" logic to handle a 0-length array.

--
gil


Re: Automatic Variable Insertion

2023-04-18 Thread Paul Gilmartin

On 4/18/23 12:59:43, Charles Mills wrote:

Correction: the form named sprintf(). Darned spell check.


May I recommend "snprintf()" instead, for integrity reasons?


--
gil


SYSADATA CMS or z/OS?

2023-03-16 Thread Paul Gilmartin

Sent as rCF:

In: 


I read:  FILEDEF SYSADATA DISK fn SYSADATA m1 (RECFM VB LRECL 32756 BLOCK 32760

The URL includes "zos/2.2.0", but the page is rife with CMS jargon.
Can this be fixed?

--
Thanks,
gil


Re: Entry Point in load module

2023-03-15 Thread Paul Gilmartin

On 3/15/23 10:31:36, Phil Smith III wrote:


What's the best list for questions about BPXWUNIX?  About zSeries hardware? 


Well, for zSeries hardware, you'll want a time machine, since that hasn't
been produced in 18 years.


Fix my vocabulary.  What should I call contemporary IBM mainframe hardware?
And what was zSeries hardware 18 years ago?


But in this case, Peter, I'd argue that since it's an assembler statement
that controls the result, it's not *incorrect* here. And there is no BINDER
list.


A fortuitous accident: a non-assembler had an assembler answer.

--
gil


Re: Entry Point in load module

2023-03-15 Thread Paul Gilmartin

On 3/15/23 09:37:42, Dave Clark wrote:


"IBM Mainframe Assembler List"  wrote on
03/15/2023 10:51:47 AM:

That happens to me if I leave the END statement blank with no
entry point specified.


If there are two or more END statements, which dominates?


I should have asked more clearly, If two or more END statements, both contain
expressions, which dominates, primacy or recency?

(Yes, that's a Binder question, not Assembler.)


   They, of course,
got linked together as a single module but the entry point for the module
was the 2nd-level subroutine -- completely bypassing the 1st-level
subroutine.


Exactly as documented.

--
gil


  1   2   3   4   5   6   7   8   9   10   >