× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 29-Jul-2016 03:51 -0500, Leo Ridderikhoff wrote:
If you only want to write one record, I think replacing the DADD on
the output line by TADD would do the trick. (replacing Detail time
for Total time) <<SNIP>>

That reflects what I thought I was trying to do; i.e. wanting just one row written, upon\per LR=*ON, and as read from just one row of input irrespective the number of rows in the file.

That sole change to the original source from the OP [the specific O-spec change shown below] was successful!

MLazarus explained that my output was conditioned on totals, per use of the LR indicator, but I did not comprehend the meaning of that comment, in relationship to my O-spec, despite having explicitly coded the D for [presumed want of] Detail Records; i.e. I knew I had coded the file for output of detail-records, but did not understand that I was conditioning my desired output as a total-record with the LR indicator on my definition for RCDOUT. At least that much seems so clear now:

O* .1....D=Detail
OS36OUT DADD
O LR RCDOUT 55

versus

O* .1....T=Total
OS36OUT TADD
O LR RCDOUT 55


And since, Buck's reply further elucidates; I should have gone directly to general RPG-cycle docs rather than limiting my reference for the task, to poring over the System/36-Compatible RPG II User’s Guide and Reference SC09-1818-00 looking for example(s).

If you just want the functionality, I would go for EXCPT-output, much
easier to code, much easier to read

Probable. Except (pun intended) I never could figure out what I was EXCePTing with EXCPT (EXCEPTION OUTPUT) for database output, for which I perceive all records to be consistently either summary or detail. Using the cycle for printer output, perhaps the naming of the op-code seems more apropos when thought of as writing all _except_ the standard heading, detail, and total records.?.?

(unless you would have been a very old fashioned RPGII-cycle
programmer :-)

Luckily my exposure to RPGII was limited to dealing with debugging the effects of the DB I\O that the RPG run-time had initiated for the program. I would often be able to see what I\O the program had initiated, and then mimic that I\O request using internal tools; doing the best I could to avoid ever having to /read/ the RPGII source. And I certainly have never wanted to _write_ any RPGII code :-)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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.