Richard Schoen wrote:
Stuff the attributes into the user defined data or other attributes
and use
that info to drive file names.
On Fri, Jul 7, 2017 at 11:50 AM, Kevin Bucknum
<Kevin@xxxxxxxxxxxxxxxxxxx> wrote:
That's what I'm trying to do. The question was is there an easy way to
do that without modifying hundreds of programs or creating 50 or 60
duplicates of QPRINT and QSYSPRT print files.
This feels like a job for scripting. I'm imagining a one-time
scripting job to fix and compile all your programs for you, but I
imagine you could possibly also structure this as a permanent script
which is introduced into the process flow (in other words, kind of
like the exit point functionality you seemed to be hoping for).
Presumably these "hundreds of programs" either all have different
names, or are all in different libraries. And presumably you could use
either the program name or the library name (whatever is
differentiating them NOW) as your spooled file user data. I would
think the easiest way to get these is by querying the system catalog.
Then I'd iterate through the names and modify the programs (by
directly modifying the source members) and recompile them.
I am guessing Rexx would probably be ideal for this. Obviously if I
were writing this script myself I would use Python. I suspect you
could lash up some combination of CL, RPG, and SQL to do this for you
as well.
It may well be that writing this script takes longer than modifying
the programs by hand, I'm afraid. Unless someone on this list steps
up. (I don't have the time right now.) But it would certainly be fun
to do, and a good learning experience. :)
John Y.
As an Amazon Associate we earn from qualifying purchases.