Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : $GETCONTAINER

$GETCONTAINER
Retrieves data from the specified channel container. (C)
Invocation
CALL $GETCONTAINER(channel, container, area, length, intoccsid)
On input, length specifies the maximum length of the data that the rule accepts. If the actual data length exceeds the value specified, the data is truncated to that value and the LENGERR condition occurs.
On output (that is, on completion of the retrieval operation), length specifies the actual data length in the container. If the container holds character data that has been converted from one Coded Character Set Identifier (CCSID) to another, length is the data length after conversion.
A fullword binary number that represents the Coded Character Set Identifier (CCSID) into which the character data in the container is to be converted. For an explanation of CCSIDs, see the section “Data Conversion With Channels” in the CICS Transaction Server for z/OS CICS Application Programming Guide.
Example
Following is a sample rule:

 
    RULE EDITOR ===> SCROLL: P
C_$GETCONTAINER(CHANNEL, CONTAINER);
_ LOCAL CONTENT, LEN, TOCCSID;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------------+-----
_ @MAP.ADDRESS = 0; ¦ 1
_ @MAP.SIZE = 128; ¦ 2
_ INSERT @MAP('ENVIRONMENT'); ¦ 3
_ CONTENT = @MAP.ADDRESS; ¦ 4
_ LEN = @MAP.SIZE; ¦ 5
_ CCSID = ''; ¦ 6
_ CALL MSGLOG( ¦ 7
_ '$GETCONTAINER(CHANNEL, CONTAINER, CONTENT, LEN, TOCCSID)'); ¦
_ CALL MSGLOG('Channel name is: ===> ' || CHANNEL); ¦ 8
_ CALL MSGLOG('Container name is: ===> ' || CONTAINER); ¦ 9
_ CALL $GETCONTAINER(CHANNEL, CONTAINER, CONTENT, LEN, TOCCSID); ¦ A
_ GET CCN_CICSRESP(CONTENT); ¦ B
_ CALL MSGLOG('Container ' || CONTAINER || ' content:'); ¦ C
_ CALL MSGLOG(' ' || CCN_CICSRESP.CODES);                         ¦ D

 
Following is the MAP table CCN_CICSRESP:

 
COMMAND==> TABLE DEFINITION
 
Table: CCN_CICSRESP Type: MAP Unit: HZS80 IDgen: Y
 
Parameter Name Typ Syn Len Dc Cls Reference ' Event Rule Typ Acc
---------------- - -- --- -- - ---------------- ' ---------------- - -
_ ADDRESS B 4 0 A ' _
_ LOCATION I C 16 0 L ' _
_ ' _
------ EXTERNAL ------|---------- Metadata Definition ------
Field Name Xsyn Xlen Xdec Offset Key Typ Syn Len Dec Rqd Default
---------------- ---- ----- -- ------ - - -- ----- -- - -------------
_ KEY B 4 0 0 P I B 4 0
_ CODES C 36 0 0 C 36 0
_

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved