I have following requirement:
An application has set of Libraries, once the application is run the PFs and PRTFs in the libraries gets changed. I have to compare all the PFs and PRTFs and display a report of changes.
I am using some RPFLE code and some CLLE code. At one place ineed the CL commands to get executed in RPGLE loop. I have written following code but it did not work. Can we use CL commands in the following way in RPGLE code. I think that variables defined in the cl command cause problem.
Can any one suggest any thing in this regard or can suggest alternate way of achieving this task.
Thanks
D****************************************
d zcmd s 200a
d qcmdexc pr extpgm('QCMDEXC')
d 200a const
d 15p 5 const
C*********************************************
c eval zcmd = 'CLRPFM FILE(&LIBP/&PF1)'
c callp(e) qcmdexc(%trim(zcmd):%len(%trim(zcmd)))
c eval zcmd = 'CMPPFM NEWFILE(&LIBN/&NEW) NEWMBR
c (*FIRST) OLDFILE(&LIBO/&OLD) OLDMBR (*FIR
c CMPTYPE(*LINE) RPTTYPE(*DIFF) OUTPUT +
c (*OUTFILE) OUTFILE(&LIBP/&PF1)'
c callp(e) qcmdexc(%trim(zcmd):%len(%trim(zcmd)))
An application has set of Libraries, once the application is run the PFs and PRTFs in the libraries gets changed. I have to compare all the PFs and PRTFs and display a report of changes.
I am using some RPFLE code and some CLLE code. At one place ineed the CL commands to get executed in RPGLE loop. I have written following code but it did not work. Can we use CL commands in the following way in RPGLE code. I think that variables defined in the cl command cause problem.
Can any one suggest any thing in this regard or can suggest alternate way of achieving this task.
Thanks
D****************************************
d zcmd s 200a
d qcmdexc pr extpgm('QCMDEXC')
d 200a const
d 15p 5 const
C*********************************************
c eval zcmd = 'CLRPFM FILE(&LIBP/&PF1)'
c callp(e) qcmdexc(%trim(zcmd):%len(%trim(zcmd)))
c eval zcmd = 'CMPPFM NEWFILE(&LIBN/&NEW) NEWMBR
c (*FIRST) OLDFILE(&LIBO/&OLD) OLDMBR (*FIR
c CMPTYPE(*LINE) RPTTYPE(*DIFF) OUTPUT +
c (*OUTFILE) OUTFILE(&LIBP/&PF1)'
c callp(e) qcmdexc(%trim(zcmd):%len(%trim(zcmd)))





Comment