 |
» |
|
|
|
The parameter mask, or bit mask, is a string of bits, each
corresponding to an intrinsic parameter. The leftmost bit corresponds
to the first parameter in the intrinsic call. If a bit is set to 1, the corresponding parameter is passed, and if
the bit is set to 0 the parameter is omitted. For intrinsics with
up to 16 parameters, a 16-bit mask is used. For intrinsics with
17 through 32 parameters, a 32-bit mask is used. Parameters for Future Expansion |  |
To allow for future expansion on MPE V, all LU 6.2 API intrinsics contain
additional parameters that are not documented in this manual. When
coding the bit mask, you must account for these "hidden" parameters
as well as the documented parameters. In the future, if the hidden
parameters are implemented, you will not have to change and re-compile
your TP. Parameter Mask Templates |  |
Table E-1 “Intrinsics Requiring a 16-Bit Mask” and Table E-2 “Intrinsics Requiring a 32-Bit Mask” describe
the parameter mask for each intrinsic. Table E-1 “Intrinsics Requiring a 16-Bit Mask” lists
the intrinsics that require 16-bit masks The parameter mask templates for each intrinsic indicate which
bits correspond to required, optional, and hidden parameters. Required parameters
are represented by 1's, and hidden parameters are represented
by 0's. Optional parameters are represented by x's
in the templates, and you must replace them with 0's or 1's when
you code the parameter mask into your TP. If you are passing an
optional parameter, put a 1 in the corresponding bit of the parameter
mask, and if you are omitting it, put a 0 in the bit mask. After you replace every x with a 0 or 1, translate the bit
string to a decimal value to be coded into your TP. For intrinsics
with no optional parameters, the mask value will always be the same
and is given in the "Mask Constant" column. Table E-1 Intrinsics Requiring a 16-Bit Mask Intrinsic | Number of Hidden Parameters | Bit Map Template 1 = required x = optional 0 = hidden | Mask Constant |
---|
TPStarted | 7 | 111xxxx0000000 | n/a | TPEnded | 5 | 1100000 | 96 | MCConfirm | 5 | 11100000 | 224 | MCConfirmed | 5 | 1100000 | 96 | MCDeallocate | 5 | 1x100000 | n/a | MCErrMsg | 4 | 11110000 | 240 | MCFlush | 5 | 1100000 | 96 | MCPostOnRcpt | 5 | 111100000 | 480 | MCPrepToRcv | 5 | 11xx00000 | n/a | MCRcvAndWait | 6 | 111111000000 | 4032 | MCRcvNoWait | 6 | 111111000000 | 4032 | MCReqToSend | 5 | 1100000 | 96 | MCSendData | 7 | 111110000000 | 3968 | MCSendError | 5 | 11100000 | 224 | MCTest | 5 | 1x1x00000 | n/a | MCWait | 5 | 1111x00000 | n/a |
Table E-2 “Intrinsics Requiring a 32-Bit Mask” lists the intrinsics that require
32-bit masks. Table E-2 Intrinsics Requiring a 32-Bit Mask Intrinsic | Number of Hidden Parameters | Bit Map Template 1 = required x = optional 0 = hidden | | Mask Constant |
---|
MCAllocate | 3 | 111111xxxxxxxxxxxxxxxxxxxxxx000 | n/a | MCGetAllocate | 3 | 11111xxxxxxxxxxxxxxxxxxxxx000 | n/a | MCGetAttr | 24 | 11xxxxx000000000000000000000000 | n/a |
Using the Parameter Mask in TPs |  |
To use the parameter mask in the TP you must do the following: Declare both the 16-bit and 32-bit
parameter masks at the beginning of the program. Assign the appropriate number to the parameter mask
in a LET statement before each LU 6.2 API intrinsic call.
The number in the parameter mask must be the decimal representation
of the bit mask described in "Parameter Mask Templates." Include place holders for the hidden parameters
in the intrinsic call. Commas serve as place holders in Transact. List the parameter mask in the intrinsic call as
the last parameter passed. The parameter mask is passed by value.
Examples |  |
Following are examples of LU 6.2 API intrinsic calls in Transact. Optional
parameters are marked, and they must have their mask bits set to
0 or 1, depending on whether or not they are passed. All commas shown
are required. Parameters common to several intrinsics appear in the
example declarations for every intrinsic that uses them. These parameters
need to be declared only once in a program. Example E-1 Example Parameter Mask Declaration < Declarations of bit masks and status parameter >>
DEFINE(ITEM) MASK16 I(4): << 16-bit parameter mask >>
MASK32 I(9): << 32-bit parameter mask >>
STATUS I(9):
INFO I(4) = STATUS(I):
INFO I(4) = STATUS (3);
LIST MASK16: MASK32: STATUS;
---------------------------------------------------------------------------- |
Example E-2 TPStarted Declarations and Intrinsic Call DEFINE(ITEM) LOCAL-TP-NAME X(8):
TP-ID I(4):
TRACE-ON I(4):
TRACE-SIZE I(4):
TRACE-FILE X(35):
DEFAULT-FILE X(28);@COMPUTERTEXTW = LIST LOCAL-TP-NAME: TP-ID: TRACE-ON: TRACE-SIZE: TRACE-FILE: DEFAULT-FILE;
LET (MASK16) = 15872; << "11111000000000" >>
PROC TPSTARTED ( %(LOCAL-TP-NAME),
(TP-ID),
(STATUS),
(TRACE-ON), << optional >>
#(TRACE-SIZE), << optional >>
<< %(TRACE-FILE), optional, not used >>
<< %(DEFAULT-FILE), optional, not used >>
, , , , , , , << 7 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-3 TPEnded Declarations and Intrinsic Call DEFINE(ITEM) TP-ID I(4);
LIST TP-ID;
LET (MASK16) = 96; << "1100000" >>
PROC TPENDED ( #(TP-ID),
(STATUS),
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-4 MCAllocate Declarations and Intrinsic Call DEFINE(ITEM) TP-ID I(4):
SESSION-TYPE X(8):
REMOTE-TP-NAME X(64):
REMOTE-TP-LEN I(4):
RESOURCE-ID I(4):
RETURN-CONTROL I(4):
SYNC-LEVEL I(4):
TIMER I(4):
SECURITY I(4):
NUM-PIPS I(4):
PIP-LENGTHS[16] I(4):
PIP1 X(1980):
PIP2 X(1980): << The lengths given in the PIP >>
PIP3 X(1980): << declarations may vary from >>
PIP4 X(1980): << 0 to 1980 bytes. >>
PIP5 X(1980):
PIP6 X(1980): << The maximum combined length >>
PIP7 X(1980): << of all PIP parameters is >>
PIP8 X(1980): << 1980 bytes. >>
PIP9 X(1980):
PIP10 X(1980):
PIP11 X(1980):
PIP12 X(1980):
PIP13 X(1980):
PIP14 X(1980):
PIP15 X(1980):
PIP16 X(1980);
LIST TP-ID: SESSION-TYPE: REMOTE-TP-NAME: REMOTE-TP-LEN:
RESOURCE-ID: RETURN-CONTROL: SYNC-LEVEL: TIMER:
SECURITY: NUM-PIPS: PIP-LENGTHS: PIP1: PIP2: PIP3:
PIP4: PIP5: PIP6: PIP7: PIP8: PIP9: PIP10: PIP11:
PIP12: PIP13: PIP14: PIP15: PIP16;
LET (MASK32) = 2115960832; << "1111110000111110000000000000000" >>
PROC MCALLOCATE ( #(TP-ID),
%(SESSION-TYPE),
%(REMOTE-TP-NAME),
#(REMOTE-TP-LEN),
(RESOURCE-ID),
(STATUS),
<< #(RETURN-CONTROL), << optional, not used >>
<< #(SYNC-LEVEL), << optional, not used >>
<< #(TIMER), << optional, not used >>
<< #(SECURITY), << optional, not used >>
#(NUM-PIPS), << optional >>
(PIP-LENGTHS), << optional >>
%(PIP1), << optional >>
%(PIP2), << optional >>
%(PIP3), << optional >>
<< %(PIP4) >>, << optional, not used >>
<< %(PIP5), << optional, not used >>
<< %(PIP6), << optional, not used >>
<< %(PIP7), << optional, not used >>
<< %(PIP8), << optional, not used >>
<< %(PIP9), << optional, not used >>
<< %(PIP10), << optional, not used >>
<< %(PIP11), << optional, not used >>
<< %(PIP12), << optional, not used >>
<< %(PIP13), << optional, not used >>
<< %(PIP14), << optional, not used >>
<< %(PIP15), << optional, not used >>
<< %(PIP16), << optional, not used >>
, , , << 3 hidden parameters >>
#(MASK32) ); |
Example E-5 MCConfirm Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
REQUEST-TO-SEND-RECEIVED I(4);
LIST RESOURCE-ID: REQUEST-TO-SEND-RECEIVED;
LET (MASK16) = 224; << "11100000" >>
PROC MCCONFIRM ( #(RESOURCE-ID),
(REQUEST-TO-SEND-RECEIVED),
(STATUS),
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-6 MCConfirmed Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4);
LIST RESOURCE-ID;
LET (MASK16) = 96; << "1100000" >>
PROC MCCONFIRMED ( #(RESOURCE-ID),
(STATUS),
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-7 MCDeallocate Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
DEALLOCATE-TYPE I(4);
LIST RESOURCE-ID: DEALLOCATE-TYPE;
LET (MASK16) = 160; << "10100000" >>
@COMPUTERTEXTW = PROC MCDEALLOCATE ( #(RESOURCE-ID),
<< #(DEALLOCATE-TYPE), optional, not used >>
(STATUS),
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-8 MCErrMsg Declarations and Intrinsic Call DEFINE(ITEM) OLD-STATUS I(9):
MESSAGE-BUFFER X(256):
MESSAGE-LENGTH I(4);
LIST OLD-STATUS: MESSAGE-BUFFER: MESSAGE-LENGTH;
LET (MASK16) = 240; << "11110000" >>
PROC MCERRMSG ( #(OLD-STATUS),
%(MESSAGE-BUFFER),
(MESSAGE-LENGTH),
(STATUS),
, , , , << 4 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-9 MCFlush Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4);
LIST RESOURCE-ID;
LET (MASK16) = 96; << "1100000" >>
PROC MCFLUSH ( #(RESOURCE-ID),
(STATUS),
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-10 MCGetAllocate Declarations and Intrinsic Call DEFINE(ITEM) TP-ID I(4):
SESSION-TYPE X(8):
TP-NAME X(64):
RESOURCE-ID I(4):
SYNC-LEVEL I(4):
TIMER I(4):
SECURITY I(4):
NUM-PIPS I(4):
PIP-LENGTHS[16] I(4):
PIP1 X(1980):
PIP2 X(1980): << The lengths given in the PIP >>
PIP3 X(1980): << declarations may vary from >>
PIP4 X(1980): << 0 to 1980 bytes. >>
PIP5 X(1980):
PIP6 X(1980): << The maximum combined length >>
PIP7 X(1980): << of all PIP parameters is >>
PIP8 X(1980): << 1980 bytes. >>
PIP9 X(1980):
PIP10 X(1980):
PIP11 X(1980):
PIP12 X(1980):
PIP13 X(1980):
PIP14 X(1980):
PIP15 X(1980):
PIP16 X(1980);
LIST TP-ID: SESSION-TYPE: TP-NAME: RESOURCE-ID:
SYNC-LEVEL: TIMER: SECURITY: NUM-PIPS: PIP-LENGTHS:
PIP1: PIP2: PIP3: PIP4: PIP5: PIP6: PIP7: PIP8: PIP9:
PIP10: PIP11: PIP12: PIP13: PIP14: PIP15: PIP16;
LET (MASK32) = 522125312; << "11111000111110000000000000000" >>
|
PROC MCGETALLOCATE ( #(TP-ID),
%(SESSION-TYPE),
%(TP-NAME),
(RESOURCE-ID),
(STATUS),
<< #(SYNC-LEVEL), optional, not used >>
<< #(TIMER), optional, not used >>
<< #(SECURITY), optional, not used >>
#(NUM-PIPS), << optional >>
#(PIP-LENGTHS), << optional >>
%(PIP1), << optional >>
%(PIP2), << optional >>
%(PIP3), << optional >>
<< %(PIP4), optional, not used >>
<< %(PIP5), optional, not used >>
<< %(PIP6), optional, not used >>
<< %(PIP7), optional, not used >>
<< %(PIP8), optional, not used >>
<< %(PIP9), optional, not used >>
<< %(PIP10), optional, not used >>
<< %(PIP11), optional, not used >>
<< %(PIP12), optional, not used >>
<< %(PIP13), optional, not used >>
<< %(PIP14), optional, not used >>
<< %(PIP15), optional, not used >>
<< %(PIP16), optional, not used >>
, , , << 3 hidden parameters >>
#(MASK32) );
---------------------------------------------------------------------------- |
Example E-11 MCGetAttr Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
OWN-FULLY-QUALIFIED-LU-NAME X(17):
PARTNER-LU-NAME X(8):
PARTNER-FULLY-QUALIFIED-LU-NAME X(17):
MODE-NAME X(8):
SYNC-LEVEL I(4);
@COMPUTERTEXTW = LIST RESOURCE-ID: OWN-FULLY-QUALIFIED-LU-NAME:
PARTNER-LU-NAME: PARTNER-FULLY-QUALIFIED-LU-NAME:
MODE-NAME: SYNC-LEVEL;
LET (MASK32) = 1795162112; << "1101011000000000000000000000000" >>
PROC MCGETATTR ( #(RESOURCE-ID),
(STATUS),
<< %(OWN-FULLY-QUALIFIED-LU-NAME), optional, not used >>
%(PARTNER-LU-NAME), << optional >>
<< %(PARTNER-FULLY-QUALIFIED-LU-NAME), optional, not used >>
%(MODE-NAME), << optional >>
(SYNC-LEVEL), << optional >>
, , , , , ,
, , , , , ,
, , , , , ,
, , , , , , << 24 hidden parameters >>
#(MASK32) );
---------------------------------------------------------------------------- |
Example E-12 MCPostOnRcpt Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
LENGTH I(4):
DATA X(4092);
LIST RESOURCE-ID: LENGTH: DATA;
LET (MASK16) = 480; << "111100000" >>
PROC MCPOSTONRCPT ( #(RESOURCE-ID),
#(LENGTH),
%(DATA),
(STATUS),
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-13 MCPrepToRcv Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
PREP-TO-RCV-TYPE I(4):
LOCKS I(4);
LIST RESOURCE-ID: PREP-TO-RCV-TYPE: LOCKS;
LET (MASK16) = 384; << "110000000" >>
PROC MCPREPTORCV ( #(RESOURCE-ID),
(STATUS),
<< #(PREP-TO-RCV-TYPE), optional, not used >>
<< #(LOCKS), optional, not used >>
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-14 MCRcvAndWait Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
LENGTH I(4):
REQUEST-TO-SEND-RECEIVED I(4):
DATA X(4092):
WHAT-RECEIVED I(4);
LIST RESOURCE-ID: LENGTH: REQUEST-TO-SEND-RECEIVED:
DATA: WHAT-RECEIVED;
LET (MASK16) = 4032; << "111111000000" >>
PROC MCRCVANDWAIT ( #(RESOURCE-ID),
(LENGTH),
(REQUEST-TO-SEND-RECEIVED),
%(DATA),
(WHAT-RECEIVED),
(STATUS),
, , , , , , << 6 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-15 MCRcvNoWait Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
LENGTH I(4):
REQUEST-TO-SEND-RECEIVED I(4):
DATA X(4092):
WHAT-RECEIVED I(4);
LIST RESOURCE-ID: LENGTH: REQUEST-TO-SEND-RECEIVED:
DATA: WHAT-RECEIVED;
LET (MASK16) = 4032; << "111111000000" >>
PROC MCRCVNOWAIT ( #(RESOURCE-ID),
(LENGTH),
(REQUEST-TO-SEND-RECEIVED),
%(DATA),
(WHAT-RECEIVED),
(STATUS),
, , , , , , << 6 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-16 MCReqToSend Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4);
LIST RESOURCE-ID;
LET (MASK16) = 96; << "1100000" >>
PROC MCREQTOSEND ( #(RESOURCE-ID),
(STATUS),
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-17 MCSendData Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
DATA X(4092):
LENGTH I(4):
REQUEST-TO-SEND-RECEIVED I(4);
LIST RESOURCE-ID: DATA: LENGTH: REQUEST-TO-SEND-RECEIVED;
LET (MASK16) = 3968; << "111110000000" >>
PROC MCSENDDATA ( #(RESOURCE-ID),
%(DATA),
#(LENGTH),
(REQUEST-TO-SEND-RECEIVED),
(STATUS),
, , , , , , , << 7 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-18 MCSendError Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
REQUEST-TO-SEND-RECEIVED I(4);
LIST RESOURCE-ID: REQUEST-TO-SEND-RECEIVED;
LET (MASK16) = 224; << "11100000" >>
PROC MCSENDERROR ( #(RESOURCE-ID),
(REQUEST-TO-SEND-RECEIVED),
(STATUS),
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-19 MCTest Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-ID I(4):
TEST I(4):
POSTED-TYPE I(4);
LIST RESOURCE-ID: TEST: POSTED-TYPE;
LET (MASK16) = 480; << "111100000" >>
PROC MCTEST ( #(RESOURCE-ID),
#(TEST), << optional >>
(STATUS),
(POSTED-TYPE), << optional >>
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
Example E-20 MCWait Declarations and Intrinsic Call DEFINE(ITEM) RESOURCE-LIST[8] I(4):
NUM-RESOURCES I(4):
RESOURCE-POSTED I(4):
POSTED-TYPE I(4);
LIST RESOURCE-LIST: NUM-RESOURCES: RESOURCE-POSTED:
POSTED-TYPE;
LET (MASK16) = 992; << "1111100000" >>
PROC MCWAIT ( (RESOURCE-LIST),
#(NUM-RESOURCES),
(RESOURCE-POSTED),
(STATUS),
(POSTED-TYPE), << optional >>
, , , , , << 5 hidden parameters >>
#(MASK16) );
---------------------------------------------------------------------------- |
|