David, I believe that in ASMIDF (I do assume that’s what you are referring to 
here), you CAN set a break point at the EOF label and when you single step at 
GETLOOP it SHOULD just get you to the EOF breakpoint once EOF happens.  Are you 
saying that does NOT happen with a break set at EOF while single-stepping at 
GETLOOP?  Assuming the DCB has EODFAD=EOF of course.

Peter

From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of David Eisenberg
Sent: Wednesday, May 8, 2024 6:35 PM
To: [email protected]
Subject: Does the GET macro indicate EOF?


I hope someone can help me; my question pertains to the QSAM GET macro. Please 
consider this code snippet:



         OPEN  SYSIN

GETLOOP  GET   SYSIN,BUFFER

MYEODAD  DS    0H

         <branch to label EOF at end-of-file ???>

                                B     GETLOOP

EOF      CLOSE SYSIN

*

SYSIN    DCB   DDNAME=SYSIN,MACRF=GM,DSORG=PS,RECFM=FB,EODAD=MYEODAD,LRECL=80



I've deliberately placed the EODAD address immediately after the GET. My 
question: is there anything I can test immediately after the GET to determine 
whether a) I successfully read a record, or b) I've reached the EOF?



The IBM manual says that after a GET, R1 points to the record that was read; 
however, I don't see any indication in the manual of where R1 points when the 
EOF is encountered, nor do I see any return code setting in R15 at EOF. I have 
empirically observed that at EOF, R1 points to an area in storage containing 
the string 'EOV ', but I don't know if I can rely on that.



Does GET tell me anything when the EOF is reached? Or is there something in the 
DCB that I can test to tell me that I'm at the EOF?



(I know that it looks silly to have the EODAD in the middle of the GET loop. 
This is about my trying to overcome an IDF limitation regarding 
single-stepping.)



Any help would be appreciated; thank you!



David

--



This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

Reply via email to