The simplest way is using “eodad=eof”
De: Gary Weinhold <[email protected]> Enviada em: quarta-feira, 8 de maio de 2024 20:21 Para: [email protected] Assunto: Re: Does the GET macro indicate EOF? As Jose implies, there is no need for a flag to be set at EOF; your DCB specified that the you should enter MYEODAD when the GET is issued and no records are left (EOF). Can you add a branch instruction to go around the MYEODAD label and the B EOF instruction to process down to GETLOOP. Then after single-stepping through the GET macro, At EOF the next instruction will be the MYEODAD B EOF instruction. Not knowing anything about IDF, this is my suggestion using your current code. I would not rely on finding 'EOV'. GETLOOP GET ... B AROUND MYEODAD B EOF AROUND process record in BUFFER ''' B GETLOOP EOF CLOSE SYSIN Gary Weinhold Senior Application Architect DATAKINETICS | Data Performance & Optimization Phone: <tel:+1.613.523.5500%20x216> +1.613.523.5500 x216 Email: <mailto:[email protected]> [email protected] <http://www.dkl.com/> <http://www.dkl.com/> Visit us online at www.DKL.com E-mail Notification: The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system. _____ From: IBM Mainframe Assembler List <[email protected] <mailto:[email protected]> > on behalf of João Reginato <[email protected] <mailto:[email protected]> > Sent: May 8, 2024 18:51 To: [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]> > Subject: RES: Does the GET macro indicate EOF? EXTERNAL EMAIL ALERT This email originated from outside of DataKinetics. Do not click links or open any attachments unless you both recognize the sender, and know the content is safe. You can turn a flag on when eodad is taken and test it later. Or in your example just use EODAD=EOF -----Mensagem original----- De: IBM Mainframe Assembler List <[email protected] <mailto:[email protected]> > Em nome de David Eisenberg Enviada em: quarta-feira, 8 de maio de 2024 19:35 Para: [email protected] <mailto:[email protected]> Assunto: 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
