** This thread discusses the article: Two CL Commands You Should Know **
** This thread discusses the Content article: Two CL Commands You Should Know **
0
** This thread discusses the Content article: Two CL Commands You Should Know **
0
D Qp0zPutEnv PR 10I 0 ExtProc('Qp0zPutEnv') D envvar * VALUE OPTIONS(*STRING) D nCCSID 10I 0 VALUE D getenv PR * ExtProc('getenv') D pEnvVar * D VALUE OPTIONS(*STRING)The first one is used like this: qp0zPutEnv('CLASSPATH=/cozzi/ibmird;/java/macros':0); The Get is used like this: varValue = %str(getenv('CLASSPATH')); There's other ones as well.
D Qp0zGetEnvCCSID... D PR * extProc('Qp0zGetEnvCCSID') D envVarName * VALUE OPTIONS(*STRING) D CCSID 10I 0 D Qp0zPutEnvCCSID... D PR * extProc('Qp0zPutEnvCCSID') D envVar * VALUE OPTIONS(*STRING) D CCSID 10I 0 Value D Qp0zInitEnv PR 10I 0 extProc('Qp0zInitEnv') D Qp0zDltEnv PR 10I 0 extProc('Qp0zDltEnv') D envVarName * VALUE OPTIONS(*STRING) ** CGI API for Get Environment Variable Value D QzsrGetEnvCCSID... D PR extProc('QzsrGetEnvCCSID') D rtnBuff 65535A OPTIONS(*VARSIZE) D nLenRtnBuff 10I Const D nRtnValueLen 10I D varName 256A Const OPTIONS(*VARSIZE) D nLenVarName 10I 0 Const D nVarNameCCSID 10I 0 Const D nRtnBuffCCSID 10I 0 Const D apiError LikeDS(QUSEC_T) OPTIONS(*VARSIZE) ** CGI API for Get Environment Variable Value D QtmhGetEnv PR extProc('QtmhGetEnv') D rtnBuff 65535A OPTIONS(*VARSIZE) D nLenRtnBuff 10I Const D nRtnValueLen 10I D varName 256A Const OPTIONS(*VARSIZE) D nLenVarName 10I 0 Const D apiError LikeDS(QUSEC_T) OPTIONS(*VARSIZE) D Qp0zPutSysEnv PR 10I 0 extProc('Qp0zPutSysEnv') D envVar * VALUE OPTIONS(*STRING) D CCSID 10I 0 Const D reserved * VALUE OPTIONS(*OMIT) D Qp0zGetSysEnv PR 10I 0 extProc('Qp0zGetSysEnv') D envVarName * VALUE OPTIONS(*STRING) D rtnBuffer 65535A OPTIONS(*VARSIZE) D bufLen 10I 0 Const D CCSID 10I 0 D reserved * VALUE OPTIONS(*OMIT) D Qp0zSystem PR 10I 0 extProc('Qp0zSystem') D CLcmd * VALUE OPTIONS(*STRING) D Qp0zDltSysEnv PR extProc('Qp0zDltSysEnv') D envVarName * VALUE OPTIONS(*STRING) D reserved * VALUE OPTIONS(*OMIT) D Qp0zGetEnv PR 10I 0 extProc('Qp0zGetEnv') D envVarName * VALUE OPTIONS(*STRING) D CCSID 10I 0 D Qp0zPutEnv PR 10I 0 extProc('Qp0zPutEnv') D envVar * VALUE OPTIONS(*STRING) D CCSID 10I 0 VALUE D Qp0zGetEnvNoInit... D PR * extProc('Qp0zGetEnvNoInit') D envVarName * VALUE OPTIONS(*STRING)
Comment