I have an old CLP that calls two reports over and over again (passing a different parameter). It has overrides for both PRTF and an "output" DB file. I moved the calls logic into an ILE program, leaving the overrides in the original CLP. They OVRPRTF works just fine. The OVRDBF does not. I've tried OVRSCOPE *CALLLVL and *JOB to no avail.
The two programs being called (RPT100 and RPT105) should update PF called PROJORDS... the file PROJWRK is defined in each RPT program.
Here is the CLP and SQLRPGLE. I know this has to do with the override and activation groups. I just can't seem to see what's wrong. Any help would be appreciated.
This is the new program
The two programs being called (RPT100 and RPT105) should update PF called PROJORDS... the file PROJWRK is defined in each RPT program.
Here is the CLP and SQLRPGLE. I know this has to do with the override and activation groups. I just can't seem to see what's wrong. Any help would be appreciated.
Code:
PGM DCL VAR(&USRDTA) TYPE(*CHAR) LEN(10) CHGVAR VAR(&USRDTA) VALUE('AMREPORTS') /* BUILD PROJECTION WORKFILE */ OVRDBF FILE(PROJWRK) TOFILE(PROJORDS) OVRSCOPE(*CALLLVL) OVRPRTF FILE(RPT100PF) USRDTA(&USRDTA) OVRSCOPE(*CALLLVL) OVRPRTF FILE(RPT105PF) USRDTA(&USRDTA) OVRSCOPE(*CALLLVL) OVRPRTF FILE(RPT105APF) USRDTA(&USRDTA) OVRSCOPE(*CALLLVL) CALL PGM(AMREPORTS) DLTSPLF FILE(*SELECT) SELECT(*CURRENT *ALL *ALL + &USRDTA *ALL) DLTOVR FILE(*ALL)
Code:
ctl-opt datfmt(*iso) option(*srcstmt: *nodebugio) dftactgrp(*no) actgrp(*new) bnddir('ASTBIND':'TBFBIND'); //------------------------------------------------------------------------ ..... code here if AMReports(comx(x)) < 0; RptErr(); endif; //=================================================================== // Run AM Reports for a Company //=================================================================== dcl-proc AMReports; dcl-pi AMReports int(10); inCom char(3) const; end-pi; dcl-c SP const(' '); // Projections cmdstring = 'call pgm(RPT105) ' + 'parm(' + q + %trim(inCom) + q + SP + q + endOfMonth + q +')'; monitor; qcmdexc(cmdstring:%len(cmdstring)); on-error; return -1; endmon; // MTD-YTD Report cmdstring = 'call pgm(RPT100) ' + 'parm(' + q + %trim(inCom) + q + SP + q + year + q + SP + q + month + q +')'; monitor; qcmdexc(cmdstring:%len(cmdstring)); on-error; return -1; endmon; return 0; end-proc;
Comment