**********************************************************************
* But : placer systématiquement DBGVIEW(*SOURCE) sur CRTBDNRPG *
* *
* Mise en place : *
* ADDEXITPGM EXITPNT(QIBM_QCA_CHG_COMMAND) FORMAT(CHGC0100) PGMNBR(1)
* PGM(CHG_CRTBND) PGMDTA(*JOB 20 'CRTBNDRPG QSYS')
**********************************************************************
Dparam DS
D exit_point 20
D format 8
D commande 10
D commande_bib 10
D modif_ok n
D invite n
D filler 2
D offset 10I 0
D lg 10I 0
D reste 9999
 
dnouvelle_cmd s 32767
dnouvelle_lg s 10I 0
dcommand_string s 9999
dpos s 10I 0
 
c *entry plist
c parm param
c parm nouvelle_cmd
c parm nouvelle_lg
 
/free
if modif_ok ;
command_string = %SUBST(param : offset + 1 : lg);
pos = %scan('DBGVIEW' : command_string);
if pos = 0;
nouvelle_cmd = %trim(command_string) + ' DBGVIEW(*SOURCE)';
else;
nouvelle_cmd = %replace('DBGVIEW(*SOURCE) ' :
command_string : pos :
%scan(' ' : command_string : pos) - pos);
endif;
nouvelle_lg = %len(%trim(nouvelle_cmd));
endif;
*inlr = *on;
/end-free
|