Hi

Sometimes it is worth to look into the proper (in this case "msgsnd") C/C++ documentation. Seems to me , in some cases the USS Callable Services and the
C/C++ Runtime Library Reference together complete.


On 20.11.2013 15:20, [email protected] wrote:
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




--
Kind regards, / Mit freundlichen Grüßen
Miklos Szigetvari

Research&  Development
ISIS Papyrus Europe AG
Alter Wienerweg 12, A-2344 Maria Enzersdorf, Austria
T: +43(2236) 27551 333, F: +43(2236)21081
E-mail: [email protected]
Info: [email protected] Hotline: +43-2236-27551-111
Visit our brand new extended Website at www.isis-papyrus.com
---------------------------------------------------------------
This e-mail is only intended for the recipient and not legally
binding. Unauthorised use, publication, reproduction or
disclosure of the content of this e-mail is not permitted.
This email has been checked for known viruses, but ISIS Papyrus accepts
no responsibility for malicious or inappropriate content.
---------------------------------------------------------------

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to