|
Note there are assumptions in the quoted CL that might fail for lackRPG400-L-request@xxxxxxxxxxxxxxxxxx posting, please take a moment to review the
of explicitly specified parameters or for actions since the last
invocation. Be sure to prompt the commands and specify parameters
explicitly to avoid breakage from change command defaults; most notably,
RCVRNG(*CURRENT) is not explicit, but documented as an assumption.
There is nothing apparent that ensures no CHGJRN JRNRCV() has taken
place since the last invocation; that is a consideration that may need
to be made, depending on the environment in which the program runs.
Additionally there is a spurious DLCOBJ request; a DLCOBJ must be paired
with an equivalent ALCOBJ request that affects the same member.
Regards, Chuck
JK wrote:
day's changes> from the ORDJRN into the ORDJRN0 workfile which is
The dayend job runs the following code to harvest the
passed to an RPG > that filters the good bits and distributes a 'change
recap' to the> plant's CSRs so they'll be ready for the next day's
run.>
/* Create a new receiver */>
CHGJRN JRN(*LIBL/ORDJRN) JRNRCV(*GEN)
> /* Dump the J PR record of the CURRENT receiver into
CurJrn0 *> DSPJRN JRN(*LIBL/ORDJRN) JRNCDE((J)) ENTTYP(PR)
+ > OUTPUT(*OUTFILE) OUTFILE(*LIBL/CURJRN0) +
> OUTMBR(*FIRST *REPLACE)
>
> /* Read CURJRN0 to find name of the PREVIOUS receiver
*/ > RCVF DEV(*FILE)
> CHGVAR &prvjrnrcv %SST(&joesd 1 10)
>
> /* Deallocate CURJRN0 to allow other instances to run
*/ > DLCOBJ OBJ((*LIBL/CURJRN0 *FILE *EXCL))
>
> /* Now we know the name of the PREVIOUS receiver, dump
its */ > /* contents into ORDJRN0 */
> DSPJRN JRN(*LIBL/ORDJRN) +
> RCVRNG(*LIBL/&PrvJrnRcv *LIBL/&PrvJrnRcv)
+ > JRNCDE(*ALL) +
> OUTPUT(*OUTFILE) OUTFILE(*LIBL/ORDJRN0) +
> OUTMBR(&WSTIME) ENTDTALEN(500)
>
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
listTo post a message email: RPG400-
L@xxxxxxxxxxxxxx subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-lor email:
at http://archive.midrange.com/rpg400-l.
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.