A really frustrating "bump" has got two of us scratching our heads.  We
are using RCVJRNE and an exit program written in RPGLE:

          RCVRNG(*CURCHAIN) FROMTIME(031204 090000) +
          TOTIME(031204 180000) ENTTYP(PT PX UB UP DL) DELAY(1)

In the RPG program:

     c     *Entry        Plist                         
     c                   Parm                    JrnRcv
     c                   Parm                    $Flag 

$Flag is a 1-character field.  For each journal entry processed, $Flag is
set to '1'.  After the last journal entry is processed, we are expecting
RCVJRNE to call the exit program again, passing '0' in $Flag.  Instead,
the exit program is NOT called, and the RCVJRNE command ends, passing
control back to the calling CL program.

The problem is that, since LR is set on only when the program is called
with $Flag = '0', the output file that the RPG program is writing to is
left open, and there are records in the buffer that are not yet written to
the output file, and won't be until the job ends.  This is a problem for
our process, since we need to process the output file in the same job

The help on the EXITPGM parameter seems to indicate that RCVJRNE will
always call the exit program with a Flag = '0' when there are no more
entries to process.

What are we missing?


Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.