Fqclsrc if e disk extfile('BACKUP/QCLSRC') F rename(QCLSRC : fmt) Dqcmdexc pr EXTPGM('QCMDEXC') D 1024 CONST D 15P 5 CONST D wcmd S 1024 VARYING D srclg S 5I 0 D suite S N D msg S 50 D i S 5I 0 /free read fmt; dow not %eof; // cadrage à gauche srcdta = %triml(srcdta); // commentaire ? if %subst(srcdta :1 :2) <> '/*'; if suite; wcmd = %trimr(wcmd) + ' ' + srcdta; suite= *off; else; if wcmd <> *blanks; // execution de la commande précédente exsr exec_cmd; wcmd = ' '; endif ; // traitement de la ligne lue wcmd = srcdta; endif; srclg = %len(%trimr(srcdta)); if %subst(srcdta : srclg : 1) = '+'; suite = *on; endif; endif; read fmt; enddo; // traitement de la dernière commande avant fin de pgm if wcmd <> *blanks; exsr exec_cmd; endif ; *inlr = *on; begsr exec_cmd; // retrait des caractères de continuation '+' for i = 1 to %len(wcmd); if %subst(wcmd : i : 1) = '+'; wcmd = %replace('' : wcmd : i : 1); endif; endfor; CALLP(E) QCMDEXC( wcmd : %len(wcmd)); // device créé if NOT %error; msg = '[OK]' + wcmd; dsply msg; endif; endsr;