The QCAPCMD API returns error information where QCMDEXC does not.
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
CL within RPG
Collapse
X
-
CL within RPG
Hi, use the (E)-Extender on the call statement and define the Program Status Datastructure in your RPG Program: D PGMSTA SDS D MsgText 91 170 Message-Text If you get an Error in your CL command you get the Message-Text in MsgText For example to check object existence: C eval P$cmd = 'CHKOBJ OBJ(' + %Trim(P$PGM) + ') '+ 'OBJTYPE(*PGM)' C callp (E) Qcmdexc(P$Cmd: %Len(P$Cmd)) C if %Error C eval MsgId = 'CPF9898' C eval MsgData= MsgText C eval MsgFile= 'QCPFMSG *LIBL' C exsr SndPgmMsg C endif Birgitta
Comment
Comment