The following code creates a private message queue. For
the callable service, see
msgget (BPX1QGT, BPX4QGT) — Create or find a message queue. For the
data structure, see
BPXYMSG — Map interprocess communication message queues.
AMODE 31 callers use
BPX1QGT (msgget) example.
MVI S_TYPE,IPC_CREAT+IPC_EXCL Error if exists
MVI S_MODE1,0 Not used
MVI S_MODE2,S_IRUSR All read and write permissions
MVI S_MODE3,S_IWUSR+S_IRGRP+S_IWGRP+S_IROTH+S_IWOTH
SPACE ,
CALL BPX4QGT, Create a message queue +
(=A(IPC_PRIVATE), Input: Key +
S_MODE, Input: Creation flags BPXYMODE/IPC+
RETVAL, Return value: -1 or msg ID +532200
RETCODE, Return code +
RSNCODE), Reason code +
MF=(E,PLIST) ----------------------------------
SPACE ,
ICM R15,B'1111',RETVAL Test return value
BNP PSEUDO Branch on msgget failure
ST R15,MSG_ID Store MSG_ID associated with key