H DEBUG(*YES) *O: CRTBNDRPG DBGVIEW(*ALL) *O: DFTACTGRP(*NO) BNDDIR(UTILITY QC2LE) ACTGRP(TEST) *===================================================================== D ThisProgram C 'TESTCMDPRC' *--------------------------------------------------------------------- D/COPY QRPGLESRC,CMDPRC_P ‚Command processing *--------------------------------------------------------------------- D QUSEC DS Likeds(QUSEC_T) Inz(*Likeds) D rc S 10I 0 iNZ *===================================================================== /free cl( 'DSPLIBL' ); //‚No error parameter or return code rc = cl( 'DSPLIBL' ); //‚No error parameter //‚rc is now 0, because the command completed successfully rc = cl( 'DSPLIBX' ); //‚No error parameter (invalid command) //‚rc is now 1, because the command did not complete successfully reset QUSEC; rc = cl( 'DSPLIBL' : QUSEC ); //‚Valid command //‚rc is now 0, because the command completed successfully //‚QUSEC is still initialized reset QUSEC; rc = cl( 'DSPLIBX' : QUSEC ); //‚Invalid command //‚rc is now 1, because the command did not complete successfully //‚QUSEC now contains error information about the command failure return; begsr *pssr; return; endsr; /end-free