Ah, pertinent questions! I hope my answers will be up to that standard :).
See below.
/* Faith is not leaning on a shovel and praying for a hole. -Steve Andrews
(pastor), 2010-03 */
-----Original Message-----
From: TSO REXX Discussion List <
TSO-...@VM.MARIST.EDU> On Behalf Of Robin
Sent: Wednesday, May 26, 2021 08:48
Rob1> Let's analyse what you say here and hopefully that analysis will
outline where the problem is.
Clearly the objective of your routine is to display the data that program
AT6#RPT generated to ddname SYSPRINT.
As per other posts, your REXX code does not "call" AT6#RPT. It invokes the
program via ADDRESS LINKMVS. Why is LINKMVS required?
Bri2> I'm almost totally ignorant of the significance of the various
options: 'AT6#RPT', "call AT6#RPT", LINK, ATTACH, LINKMVS, ATTACHMVS and
whatever else there is. By "almost totally ignorant" I mean that I know
there are differences, and I see by experimentation that in a particular
circumstance some work and some don't -- or more often that one does and the
rest don't -- but I have no idea what each one means and why it works. I
suspect that if I had learned assembler on the mainframe, the descriptions
in the manual would convey something to me. As it is, I flounder around
until I get the results I want. That's how I arrived in this case at the
following invocation:
parm='UNREF=060'
address LINKMVS 'AT6#RPT PARM'
Rob1> You say that AT6#RPT does not return control to your REXX program. Are
you sure that it is AT6#RPT that has control?
Bri2> I ~assumed~ it was AT6#RPT, at first. After some thought, I realized
it's an assumption. What I know, from REXX TRACE statements, is that REXX
execution has not yet proceeded to the next statement after AT6#RPT. So it
still seems a likely assumption to me, but not certain.
Rob1> What epiphany inspires you to enter /* as opposed to any other string
of characters?
Bri2> I tried all the more obvious things first. The cursor sat there
without comment, and when I entered a string and hit <Enter> the cursor
moved down a line and continued waiting. This behavior is what I see when a
REXX program is trying to read from the stack and the stack is empty (so it
looks for input from the terminal). So I tried a number of entries: <Enter>
by itself, then END and EXIT and so forth. When I thought the problem had
to do with my EXECIO subroutine, that was as far as I got. When I realized
that my REXX wasn't even starting to read SYSPRINT, that it might still be
executing AT6#RPT, I considered that AT6#RPT is a batch program and tried
'//'. It wasn't until next day that it occurred to me to try '/*', and I
vaguely remember that being triggered by something someone said in this
forum. That's the first (and so far the only) string that allows the REXX
to continue.
Rob1> What are the instructions for using AT6#RPT?
Bri2> The instructions are badly written -- badly even for a non-IBM
company, bad enough that I've written to the owner of the documentation at
the publisher, who apparently looked and agreed with me for he said they're
considering a complete rewrite. (I find these folks very responsive in the
matter of their customer help.) But in any case the instructions are only
for batch; they describe DD statements and control parms, but apparently no
one there has thought about foreground execution.
Rob1> You say once your REXX program gets control, the results you want are
available. This suggests to me that abuse of the stack is source of the
problem. I suggest complete removal of the routines that stack the results
of AT6#RPT will eliminate the deviant behavior.
Bri2> I'm not following you. Once my REXX program gets control, everything
works correctly; therefore it might be abuse of the stack? I don't see how
one leads to the other, but I guess you're saying AT6#RPT itself might be
abusing the stack (since you're not saying my REXX is doing so)? If so, it
wouldn't be under my control.
--- On Fri, 21 May 2021, at 19:48, Bob Bridges wrote:
> I have an external REXX routine I've been using for decades that reads
> a DD or DS and puts its contents in the queue, so I use it to grab
> SYSPRINT...