I have a button program that prints labels using a call to TL Ashford software. I need to override the TLA printer file to output to the appropriate printer. I have that working, but I thought (incorrectly) that the override would "end" when the button program ends.
Within the button program i have a procedure ovrprtf();
The override in question is on BCLABELS. I had to use OVRSCOPE(*JOB) at the request of TLA support. This was the only way I could get the labels printing correctly.
For now, I have created dltovr() procedure that runs "on-exit" of my procedure that prints both documents. It deletes all prtf overrides.
Just wondering if there's a better way?
Within the button program i have a procedure ovrprtf();
Code:
dcl-proc ovrPrtf;
dcl-s cmd varchar(512) inz;
dcl-s zebOutq char(10) inz;
dcl-s laserOutq char(10) inz;
... code here populates outq variables
cmd='OVRPRTF FILE(ASN003PF) OUTQ(' + %trim(laserOutq) + ') USRDTA(MSTR_BOL) COPIES(2)';
vvUtility_qCmd(cmd);
cmd='OVRPRTF FILE(BCLABELS) CPI(15) OUTQ(' + %trim(zebOutq) + ') ' +
'USRDTA(SKIDLAB) OVRSCOPE(*JOB)';
vvUtility_qCmd(cmd);
end-proc;
For now, I have created dltovr() procedure that runs "on-exit" of my procedure that prints both documents. It deletes all prtf overrides.
Code:
dcl-proc dltOvr;
dcl-s cmd varchar(512) inz;
cmd='DLTOVR FILE(*PRTF) LVL(*JOB)';
monitor;
vvUtility_qCmd(cmd);
on-error;
endmon;
end-proc;

Comment