|
Are you calling the CL program from the same RPG that creates the spool file? If so, you have to take activation group and/or call-level into account, since the CL program runs at a later call level, call-level overrides will be a problem. If the CL does not use the same activation group, then that will be a problem. I generally use QCMDEXC for this type of thing because I don't like dealing with the actgrp/call-level problem. To me, QCMDEXC is a LOT easier than calling a separate CL program. Also, you have to make sure that you do the override BEFORE opening the spool file. Therefore, if the override isn't in place before the RPG program starts up, you'll have to use a USROPN printer file, and the OPEN op-code, to control when the spool file gets opened. Overrides only affect things at the time that the program opens. My system doesn't have a CHGSPLF command. You must mean CHGSPLFA? That method should also work, as long as you manage to do it before the file is sent to the writer. Personally, I prefer the OVRPRTF approach. On Wed, 15 May 2002, Wills, Mike N. (TC) wrote: > > Oh... one additional thing. I am doing this by calling a CL program with a > parm. > > What we need to do is dynamically assign an overlay based upon criteria in a > file I read in my RPG program. I create different spool file for every > header record read in and each spool file can have a different overlay. I > have tried to do a 'OVRPRTF *PRTF' before every time I open a new spool file > and tried to do a CHGSPLF after every time I close the spoolfile (which > causes a MSGW), neither worked. What can I do to accomplish this?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.