Re: Assembler calling DSNTAIR
S0C4 RC4 is protection key violation. How are you allocating the save area? As others have noted, you should only use BASSM for routines that are coded to expect it, and should ensure that bit 0 of R15 is correct. If, as expected, DSNTIAR returns with a BR R14, you will get control back in AMODE(24), which is not what you want. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Ward Able, Grant Sent: Friday, April 13, 2018 11:42 AM To: IBM-MAIN@listserv.ua.edu Subject: Re: Assembler calling DSNTAIR Thanks for the response Shmuel. COMPLETION CODE SYSTEM = 0C4 REASON CODE = 0004 I am usually a CICS programmer, so batch abends are slightly foreign to me. My own program's savearea is addressed by R13. What format? Heck I don't know! The DSECT starts with DS 18F, if that helps. DSNTIAR is linked into my loadmod. It seems as if I need a serious batch dump debugging refresher! Regards - Grant. In theory, there's no difference between theory and practice. In practice, there is. There is no such thing as the Cloud. It is just somebody else's computer. If you don't have time to do it right, when will you have the time to do it over? - John Wooden DTCC Internal (Green) -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Seymour J Metz Sent: 13 April 2018 16:23 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Assembler calling DSNTAIR ATTENTION! This email originated outside of DTCC; exercise caution. What format save area does R13 point to? Is DSNTIAR linked with you or are you doing a LOAD? What is the reason code for the 0C4 (I hate the overloading!)? Have you looked at the failing code? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Ward Able, Grant Sent: Friday, April 13, 2018 10:24 AM To: IBM-MAIN@listserv.ua.edu Subject: Assembler calling DSNTAIR I have an Assembler program linked AMODE(31) RMODE(24). It makes SQL calls and under some circumstances I will call DSNTIAR to printout the DB2 error & diagnostic info. The call statement I am using for this is: CALL DSNTIAR,(SQLCA,(6),LRECL),LINKINST=BASSM,MF=(E,PARM) Yet I am getting an S0C4 abend in DSNTIAR. I thought that using LINKINST=BASSM would have resolved this for me. Any hints or clues about this? Regards - Grant. In theory, there's no difference between theory and practice. In practice, there is. There is no such thing as the Cloud. It is just somebody else's computer. If you don't have time to do it right, when will you have the time to do it over? - John Wooden DTCC Internal (Green) 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. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN 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. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
The programmer allocates the save area with a size and placement appropriate to the formats that he expects the called programs to use. If one of them uses a format that he didn't anticipate storage overlay is possible, as is an access violation due to loss of high-order bits, e.g., allocating a save area above the line and calling an AMODE(24) routine. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Tom Marchant <000a2a8c2020-dmarc-requ...@listserv.ua.edu> Sent: Friday, April 13, 2018 11:55 AM To: IBM-MAIN@listserv.ua.edu Subject: Re: Assembler calling DSNTAIR On Fri, 13 Apr 2018 15:23:04 +, Seymour J Metz wrote: >What format save area does R13 point to? ITYM how big of a save area does R13 point to when he makes the call. A save area does not have a format until a program saves its caller's registers in it according to some format. -- Tom Marchant -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
Then you should submit an RCF. That is incorrect. If fact, I cannot think of any AMODE/RMODE combination which it would be valid as it returns via BR 14. Well. if your program is 24/24 and you load it above the line, and you wish this convoluted code. L 15,ep CALL (15),,LINKINST=BASSM SAM24 , but never a need when it is linked in. On Mon, 16 Apr 2018 08:12:57 + "Ward Able, Grant" wrote: :>Just a quick note to all who have so kindly responded. I am going to be out of the office for this week and will look at these responses in more detail when I get back. :> :>I used LINKINST, as this was mentioned in the DB2 KC as my program is AMODE(31) RMODE(24). :> :>Regards Grant :> :> :> :>DTCC Internal (Green) :> :>-Original Message- :>From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of John Gateley :>Sent: 15 April 2018 21:10 :>To: IBM-MAIN@LISTSERV.UA.EDU :>Subject: Re: Assembler calling DSNTAIR :> :>ATTENTION! This email originated outside of DTCC; exercise caution. :> :> :>I use this code to get the error message from DSNTIAR :> :>CALL_PARM DS 0F :>PARM_1 DC A(SQLCA) :>PARM_2 DC A(MSGLEN) :>PARM_3 DC A(MSGSIZE) :> :>MSGSIZE DC F'72' LENGTH OF EACH LINE :>MSGAREA DS H,CL(20*72) :>ORG MSGAREA :>MSGLEN DC AL2(20*72) 20 lines of 72 bytes :>MSG_TEXTDS CL72 :>ORG :> :>LA R1,CALL_PARM :>L R15,=V(DSNTIAR) DSNTIAR EXPANDS THE ERROR :>BASRR14,R15 :> :>LA R4,MSG_TEXT POINT TO FIRST 72 BYTE LINE :>LA R5,20 20 LINES :>LOOPEQU * :>output 72 bytes to wherever (check >= blanks) :>LA R4,72(,R4) :>BCT R5,LOOP :> :>Warning - there could be typos in the above. :>You could also check R15 after the call and output a message if not 0. The routine used to have 8 lines but in V8 or V9 of DB2 we got RC=4 because the message did not fit. As a result we changed to 20 lines. :> :>Hope it helps. :> :>-- :>For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN :>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. :> :> :>-- :>For IBM-MAIN subscribe / signoff / archive access instructions, :>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Binyamin Dissen http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
Just a quick note to all who have so kindly responded. I am going to be out of the office for this week and will look at these responses in more detail when I get back. I used LINKINST, as this was mentioned in the DB2 KC as my program is AMODE(31) RMODE(24). Regards – Grant DTCC Internal (Green) -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of John Gateley Sent: 15 April 2018 21:10 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Assembler calling DSNTAIR ATTENTION! This email originated outside of DTCC; exercise caution. I use this code to get the error message from DSNTIAR CALL_PARM DS 0F PARM_1 DC A(SQLCA) PARM_2 DC A(MSGLEN) PARM_3 DC A(MSGSIZE) MSGSIZE DC F'72' LENGTH OF EACH LINE MSGAREA DS H,CL(20*72) ORG MSGAREA MSGLEN DC AL2(20*72) 20 lines of 72 bytes MSG_TEXTDS CL72 ORG LA R1,CALL_PARM L R15,=V(DSNTIAR) DSNTIAR EXPANDS THE ERROR BASRR14,R15 LA R4,MSG_TEXT POINT TO FIRST 72 BYTE LINE LA R5,20 20 LINES LOOPEQU * output 72 bytes to wherever (check >= blanks) LA R4,72(,R4) BCT R5,LOOP Warning - there could be typos in the above. You could also check R15 after the call and output a message if not 0. The routine used to have 8 lines but in V8 or V9 of DB2 we got RC=4 because the message did not fit. As a result we changed to 20 lines. Hope it helps. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN 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. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
OK пн, 16 апр. 2018 г., 3:20 John Gateley : > I use this code to get the error message from DSNTIAR > > CALL_PARM DS 0F > PARM_1 DC A(SQLCA) > PARM_2 DC A(MSGLEN) > PARM_3 DC A(MSGSIZE) > > MSGSIZE DC F'72' LENGTH OF EACH LINE > MSGAREA DS H,CL(20*72) > ORG MSGAREA > MSGLEN DC AL2(20*72) 20 lines of 72 bytes > MSG_TEXTDS CL72 > ORG > > LA R1,CALL_PARM > L R15,=V(DSNTIAR) DSNTIAR EXPANDS THE ERROR > BASRR14,R15 > > LA R4,MSG_TEXT POINT TO FIRST 72 BYTE LINE > LA R5,20 20 LINES > LOOPEQU * > output 72 bytes to wherever (check >= blanks) > LA R4,72(,R4) > BCT R5,LOOP > > Warning - there could be typos in the above. > You could also check R15 after the call and output a message if not 0. The > routine used to have 8 lines but in V8 or V9 of DB2 we got RC=4 because the > message did not fit. As a result we changed to 20 lines. > > Hope it helps. > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
I use this code to get the error message from DSNTIAR CALL_PARM DS 0F PARM_1 DC A(SQLCA) PARM_2 DC A(MSGLEN) PARM_3 DC A(MSGSIZE) MSGSIZE DC F'72' LENGTH OF EACH LINE MSGAREA DS H,CL(20*72) ORG MSGAREA MSGLEN DC AL2(20*72) 20 lines of 72 bytes MSG_TEXTDS CL72 ORG LA R1,CALL_PARM L R15,=V(DSNTIAR) DSNTIAR EXPANDS THE ERROR BASRR14,R15 LA R4,MSG_TEXT POINT TO FIRST 72 BYTE LINE LA R5,20 20 LINES LOOPEQU * output 72 bytes to wherever (check >= blanks) LA R4,72(,R4) BCT R5,LOOP Warning - there could be typos in the above. You could also check R15 after the call and output a message if not 0. The routine used to have 8 lines but in V8 or V9 of DB2 we got RC=4 because the message did not fit. As a result we changed to 20 lines. Hope it helps. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
It is also likely that you should never use the LINKINST parameter of the CALL macro unless the documentation of the target routine tells you that you should. If you call a routine that expects to be called by BASR/BALR, it might well not work properly if called by BASSM (particularly with respect to returning in the caller's AMODE). Peter Relson z/OS Core Technology Design -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
On Fri, 13 Apr 2018 14:24:19 + "Ward Able, Grant" wrote: :>I have an Assembler program linked AMODE(31) RMODE(24). It makes SQL calls and under some circumstances I will call DSNTIAR to printout the DB2 error & diagnostic info. :>The call statement I am using for this is: :>CALL DSNTIAR,(SQLCA,(6),LRECL),LINKINST=BASSM,MF=(E,PARM) :>Yet I am getting an S0C4 abend in DSNTIAR. I thought that using LINKINST=BASSM would have resolved this for me. :>Any hints or clues about this? Why do you believe BASSM was needed? DSNTIAR supports both 24 and 31 bit callers. What do you think that BASSM would have resolved for you? As others have indicated, BASSM would have forced AMODE24 which would eventually fail when 31 bit storage is accessed. -- Binyamin Dissen http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
On 13 April 2018 at 11:52, Tom Marchant <000a2a8c2020-dmarc-requ...@listserv.ua.edu> wrote: >>CALL DSNTIAR,(SQLCA,(6),LRECL),LINKINST=BASSM,MF=(E,PARM) > > The CALL will generate a V(DSNTIAR). LINKINST=BASSM will cause the > call to generate BASSM to transfer control to that address. The VCON > will (IIRC) have bit 0 set to zero, so you will be calling the program in > AMODE 24. Does DSNTIAR require that? Is your save area located below > the line? This might be an appropriate use for the HOBSET=YES Binder option. But managing it needs discipline, since it isn't remembered if you rebind. Tony H. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
On Fri, 13 Apr 2018 15:23:04 +, Seymour J Metz wrote: >What format save area does R13 point to? ITYM how big of a save area does R13 point to when he makes the call. A save area does not have a format until a program saves its caller's registers in it according to some format. -- Tom Marchant -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
On Fri, 13 Apr 2018 14:24:19 +, Ward Able, Grant wrote: >I have an Assembler program linked AMODE(31) RMODE(24). It makes SQL calls and >under some circumstances I will call DSNTIAR to printout the DB2 error & >diagnostic info. >The call statement I am using for this is: > >CALL DSNTIAR,(SQLCA,(6),LRECL),LINKINST=BASSM,MF=(E,PARM) The CALL will generate a V(DSNTIAR). LINKINST=BASSM will cause the call to generate BASSM to transfer control to that address. The VCON will (IIRC) have bit 0 set to zero, so you will be calling the program in AMODE 24. Does DSNTIAR require that? Is your save area located below the line? > >Yet I am getting an S0C4 abend in DSNTIAR. I thought that using LINKINST=BASSM >would have resolved this for me. Resolved what? Does DSNTIAR use BSM to return? -- Tom Marchant -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
Thanks for the response Shmuel. COMPLETION CODE SYSTEM = 0C4 REASON CODE = 0004 I am usually a CICS programmer, so batch abends are slightly foreign to me. My own program's savearea is addressed by R13. What format? Heck I don't know! The DSECT starts with DS 18F, if that helps. DSNTIAR is linked into my loadmod. It seems as if I need a serious batch dump debugging refresher! Regards - Grant. In theory, there's no difference between theory and practice. In practice, there is. There is no such thing as the Cloud. It is just somebody else's computer. If you don't have time to do it right, when will you have the time to do it over? - John Wooden DTCC Internal (Green) -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Seymour J Metz Sent: 13 April 2018 16:23 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Assembler calling DSNTAIR ATTENTION! This email originated outside of DTCC; exercise caution. What format save area does R13 point to? Is DSNTIAR linked with you or are you doing a LOAD? What is the reason code for the 0C4 (I hate the overloading!)? Have you looked at the failing code? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Ward Able, Grant Sent: Friday, April 13, 2018 10:24 AM To: IBM-MAIN@listserv.ua.edu Subject: Assembler calling DSNTAIR I have an Assembler program linked AMODE(31) RMODE(24). It makes SQL calls and under some circumstances I will call DSNTIAR to printout the DB2 error & diagnostic info. The call statement I am using for this is: CALL DSNTIAR,(SQLCA,(6),LRECL),LINKINST=BASSM,MF=(E,PARM) Yet I am getting an S0C4 abend in DSNTIAR. I thought that using LINKINST=BASSM would have resolved this for me. Any hints or clues about this? Regards - Grant. In theory, there's no difference between theory and practice. In practice, there is. There is no such thing as the Cloud. It is just somebody else's computer. If you don't have time to do it right, when will you have the time to do it over? - John Wooden DTCC Internal (Green) 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. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN 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. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Assembler calling DSNTAIR
What format save area does R13 point to? Is DSNTIAR linked with you or are you doing a LOAD? What is the reason code for the 0C4 (I hate the overloading!)? Have you looked at the failing code? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List on behalf of Ward Able, Grant Sent: Friday, April 13, 2018 10:24 AM To: IBM-MAIN@listserv.ua.edu Subject: Assembler calling DSNTAIR I have an Assembler program linked AMODE(31) RMODE(24). It makes SQL calls and under some circumstances I will call DSNTIAR to printout the DB2 error & diagnostic info. The call statement I am using for this is: CALL DSNTIAR,(SQLCA,(6),LRECL),LINKINST=BASSM,MF=(E,PARM) Yet I am getting an S0C4 abend in DSNTIAR. I thought that using LINKINST=BASSM would have resolved this for me. Any hints or clues about this? Regards – Grant. In theory, there's no difference between theory and practice. In practice, there is. There is no such thing as the Cloud. It is just somebody else’s computer. If you don't have time to do it right, when will you have the time to do it over? - John Wooden DTCC Internal (Green) 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. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN