I have found out that the documentation is poor. This sequence of Instructions is correct. L 15,16 CVT - common vector table L 15,544(15) CSRTABLE L 15,24(15) CSR slot L 15,offset(15) Address of the service BALR 14,15 Branch and link
The issue with the Reason Code has to do with the setting of the MSG_TYPE. The documentation does not expalin it well enough that the MSG_ID returned from BXP1QGT needs to be stored in the MSG_TYPE field prior to the MSG_TEXT before issuing BPX1QSND. I can noe WRITE and RED from the queue. Thanks To All Who responded. Paul D'Angelo ---------- Original Message ---------- From: Tony Harminc <[email protected]> To: [email protected] Subject: Re: USS Callable Assembler Services Date: Mon, 18 Nov 2013 15:17:59 -0500 On 18 November 2013 14:36, [email protected] <[email protected]> wrote: > Tom Marchant and others pointed out > I don't have an answer to your questions, but I think you mean > LA 15,16 > > > And I agree, However From > z/OS UNIX System Services Programming: Assembler Callable Services Reference > SA23-2281-00 > > > The following is an example of code that specifies the offset. The example > assumes that register 1 is set up with the address of the parameter list. > Replace offset with the appropriate value from the following offset table. > L 15,16 CVT - common vector table > L 15,544(15) CSRTABLE > L 15,24(15) CSR slot > L 15,offset(15) Address of the service > BALR 14,15 Branch and link > > > I suspect the documentation is wrong It's not wrong, and changing L to LA would break what you have. You could indeed use the IHAPSA and CVT macros and avoid use of hard-coded constants, but the problem with this is that the CSRTABLE and what it points to are OCO, so there are no IBM-supplied mappings or names. I wrote a little macro that contains roughly what you show above. It takes the service name as an argument and generates the call with the offset and arguments. There are other services reached through the CSRTABLE with offsets other than 24; some of them are documented to various extents, and others not at all. Tony H. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
