In the AS400 Connector post script examples, the SCRPOST member of the SCRIPT file in the data library contain the variable CTSA_SAY. Â This variable is not found anywhere else in the code and is not currently explained anywhere in the documentation, so questions have arisen regarding its purpose. Â
While executing the post script, the AS400 agent creates a temporary file with the path SCRIPT_WORK_DIR and a name that includes the process ID (S%PID).Â CTSA_SAY contains the fully qualified file name for this file (i.e. CTSA_SAY=SCRIPT_WORK_DIR\S%PID).
ARG CTSA_TOKEN CALL "CTSCVAR" GET, CTSA_TOKEN "OVRPRTF FILE(STDOUT) SPOOL(*NO) TOFILE(" || CTSA_SAY || ")" IF RESULT <> "SUCCESS" THEN DO SAY "SCRPOST: SCRIPT ERROR. CTSCVAR GET FAILED WITH RC = "RC RETURN 16 END