
Subprogram SECTEST: Function Code Ownership Test
If you have any questions about the content of this page, please contact CICS Requests for clarification
This program is used to find out if a particular "function code" is owned by the terminal operator that invoked a transaction. The COMMAREA passed to SECTEST should be nine bytes long and consist of the eight byte function to be validated followed by a one byte return code. You fill in the first eight bytes, LINK to SECTEST and the return code will be set as follows:
- 0 = Validation Successful
- 1 = Validation Not Successful
The SECTESTD COPY member is available to define the appropriate COMMAREA layout. The COBOL names are as follows:
01 SECTEST-COMMAREA.
05 NWST-FUNCTION PIC X(08).
05 NWST-RETURN-CODE PIC X(01).
88 NWST-SECTEST-OK VALUE '0'.
88 NWST-SECTEST-FAILED VALUE '1'.
You code:
COPY SECTESTD.
MOVE 'FUNCTION' TO NWST-FUNCTION.
EXEC CICS LINK PROGRAM('SECTEST')
COMMAREA(SECTEST-COMMAREA)
END-EXEC.
IF NWST-SECTEST-FAILED
GO TO NOT-AUTHORIZED.