eg
RTVSYSVAL QTIME &TIME
CHGVAL &OBJ ('PGM' || &TIME)
CRTDUPOBJ OBJ(MYLIB/MYPGM) OBJTYPE(*PGM) TOLIB(QTEMP) TOOBJ(&OBJ)
CALL QTEMP/&OBJ
"tmnelson" <tmne...@gfgfs.com> wrote in message
news:i29S7.447$km1.1...@news.uswest.net...
This should start the program in a new activation group each time.
Note, however, that you need to think about the scope of overrides if
you have any.
Sam
"tmnelson" <tmne...@gfgfs.com> wrote in message
news:i29S7.447$km1.1...@news.uswest.net...
Subprocedures can be called recursively.
Could you implement the recursion within a subprocedure rather than
the whole program?
Normally with recursion, static variables are the same for each
recursive invocation. This is the way subprocedure recursion works:
global variables (including files that are open in the module) and local
variables declared with STATIC are shared by the invocations; each
invocation gets its own copy of local automatic variables. When you use
actgrp(*new) to get recursion, there are no shared variables.