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