Im exploring the use of Message Queues with USS Callable Assembler Services.
>From a single program I invoked BPX1QGT, BPX1QSN, & BPX1QRC
I prepare the structures and the parameters necessary to invoke BPX1QGT to
create a message Queue
LARL R11,UMSGWORK
XC UMSGWORK,UMSGWORK
MVC UMSG_KEY,PRIVATEK Key
USING S_MODE,R2 Map USS Mode Constants
LA R2,UMSG_SMODE S_MODE (Mapped By BPXYMODE)
MVI S_TYPE,IPC_CREAT+IPC_EXCL
MVI S_MODE1,0 Not Used
MVI S_MODE2,S_IRUSR All Read & Write Permissions
MVI S_MODE3,S_IWUSR+S_IRGRP+S_IWGRP+S_IROTH+S_IWOTH
DROP R2 Inform Assembler
I then chain through the CVT to locate the address of BPX1QGT
L 15,16 CVT - communication vector table
L 15,544(15) CSRTABLE
L 15,24(15) CSR slot
L 15,696(15) Address of the service
ST R15,BPX1QGT@ Store Address Of BPX1QGT
I issue a Call to BPX1QGT
CALL (15), Create A Message Queue +
(UMSG_KEY, Input: Key +
UMSG_SMODE, Input: Creation Flags BRXMODE/IPC+
UMSGVAL, Return Value: 0, -1 +
UMSGRETURN, Return code +
UMSGREASON), Reason code +
INKINST=BASR, +
VL,MF=(E,UMSGPLIST) ----------------------------------
ICM R0,B'1111',UMSGVAL Get Return Value
JNP RETVAL_ERROR No
ST R0,UMSG_ID Store MSG_ID Associated With Key
L 15,16 CVT - communication vector table
L 15,544(15) CSRTABLE
L 15,24(15) CSR slot
L 15,704(15) Address of the service
ST R15,BPX1QSN@ Store Address Of BPX1QSN
L R15,BPX1QSN@ Get Address Of BPX1QSN
CALL (15), Get host by name +
(UMSG_ID, Input: MessageQueue ID +
UMSG_BUF@, Input: ->MSGBUF BPXYMSG+
UMSG_ALET, Input: Alet Of Message Buffer +
UMSG_SIZE, Input: Length Of MSGBUF +
UMSG_FLAGS, Input: Flags BPXY1PC+
UMSGVAL, Return Value: 0, -1 +
UMSGRETURN, Return code +
UMSGREASON), Reason code +
INKINST=BASR, +
VL,MF=(E,UMSGPLIST) ----------------------------------
ICM R0,B'1111',UMSGVAL Get Return Value
JNP RETVAL_ERROR No
After I issue BPX1QSN I receive a Return Code of 0079 and
a Reason Code of 030A
I looked up the meaning of these codes:
0079 The parameter is incorrect
030A Message type must be greater than zero
The 030A is telling me that Message Type must be greater than zero. However
Message Type is not a parameter supplied
with the call to BPX1QSN. Message Type is specified prior to issuing BOX1QGT,
and is part of the SMODE_DS Structure.
Can some one advise why my BPXQSN is failing with a Reason Code of 030a as
MSG_TYPE is not zero
MVI S_TYPE,IPC_CREAT+IPC_EXCL
Paul D'Angelo
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN