Again, thnks John! I will try using this (or investigate other DCB error actions). If all else fails I will resort to writing this program in REXX as I KNOW I can do it all in that language :D
Regards – Grant. 201496 (Internal phone) +44 (0)2076501496 (External phone) -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of John McKown Sent: Friday, November 11, 2016 4:54 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Question on using DYNALLOC On Fri, Nov 11, 2016 at 10:45 AM, Ward Able, Grant <gwarda...@dtcc.com> wrote: > So I have another problem. > > I have changed my code to use the method suggested by John - THANK YOU > - it works great. > But if the member does not exist, I get 013-18 > 10.40.39 JOB25080 IEC141I > 013-18,IGG0191B,XXFSHIGH,MQ,CNTLI,6066,TSUPBG, > 907 > 907 CICST.MQDEF.Q.MQMQ.CNTL.STAGE(CSVXXFS1) > 907 ERROR DESCRIPTION: IEC141I > 907 An OPEN macro instruction was issued for a partitioned > data set. The > 907 DSNAME parameter specified a member that could not be > found. > 907 END ERROR DESCRIPTION: IEC141I > > This may seem like a novice question, but I usually don’t work in > batch, so excuse me please. > Is there a way I can "trap" the error at OPEN time? If so, I can > bypass doing the INPUT coding and go directly to the OUTPUT processing. > I've not done this myself, but I would think that you'd use a DCB abend exit: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.2.0/com.ibm.zos.v2r2.idad400/abend.htm This would probably be the simplest way, especially in assembler. In REXX, I'd use a LISTDS command on the DSN with a MEMBER option with an OUTTRAP('OUTPUT.','*') going. Then check the RC to make sure the DSN exists; followed by checking the OUTPUT. stem to see if the member I want is in the member listing. > > > Regards – Grant. > > 201496 (Internal phone) > +44 (0)2076501496 (External phone) > -- Heisenberg may have been here. Unicode: http://xkcd.com/1726/ Maranatha! <>< John McKown DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.