You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The JSMGETENV program can be used in the JSMADMEXT, JSMPXYEXT, JSMDRTEXT and JSMLSAEXT program to read CGI environment variables.

The program status code will have one of the following values OK, ERROR or NOVAR.

DCL VAR(&ENVNAME)   TYPE(*CHAR) LEN(128)
DCL VAR(&ENVVALUE)  TYPE(*CHAR) LEN(1024)
DCL VAR(&ENVSTS)    TYPE(*CHAR) LEN(5)

CHGVAR VAR(&ENVNAME) VALUE(HTTPS)

CALL PGM(JSMGETENV) PARM(&ENVNAME &ENVVALUE &ENVSTS)

IF COND(&ENVSTS *NE 'OK') THEN(DO)
  GOTO END
ENDDO



  • No labels