|
the type is CLE so you have to create with CRTCLMOD then CRTPGM
PGM PARM(&PARM)
DCL VAR(&PARM) TYPE(*CHAR) LEN(32)
DCL VAR(&RTNVALINT) TYPE(*CHAR) LEN(4)
DCL VAR(&RTNVAL) TYPE(*CHAR) LEN(2)
DCL VAR(&PATH) TYPE(*CHAR) LEN(100)
DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00')
DCL VAR(&BUF) TYPE(*CHAR) LEN(4096)
CHGVAR VAR(&PATH) VALUE(&PARM *TCAT &NULL)
CALLPRC PRC('stat') PARM(&PATH &BUF) +
RTNVAL(%BIN(&RTNVALINT 1 4))
CHGVAR VAR(&RTNVAL) VALUE(%BIN(&RTNVALINT))
IF COND(&RTNVAL = '00') THEN(SNDPGMMSG +
MSGID(CPF9898) MSGF(QCPFMSG) +
MSGDTA('Object Found') +
MSGTYPE(*INFO ))
ELSE CMD(SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) +
MSGDTA('Object Not Found') +
MSGTYPE(*INFO ))
ENDPGM
-------------------------
Bryan Dietz
3X Corporation
---------------------------------------------------
What's the best way to check for the existence of an IFS file in a
CL program? There is no CHKOBJ for the IFS. I am running V5R1...
Thanks.
Rich Herdman
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.