I will include what I have attempted already, for reference; many
would find the Subject request to be improper, without showing some
prior effort. But any fully-functional but simple example-sources would
be welcome, as there is no specific reason the following code would need
to be /corrected/.
The following OCL performs a setup for a RPG36 that will be called.
A file S36OUT is created, into which the row should be output\written.
Another file is created too, file S36INP, for possible use to obtain as
data in the program via a read, so that same data can be written to the
S36OUT; note however, that I really do not care if the data written is a
literal or that row data.
Having tried to mimic [a poor excuse for] an example from the docs
showing some declarative that would enable copying data from one file to
another, I culled that example, and combined that with the QPROOF source
shipped in QS36SRC of #LIBRARY. I then created my program as
*CURLIB/INSS36 from the source member of the same name, but from file
QRPGSRC instead of QS36SRC from following source, compiled with a
request to:
FS36INP IP F 55 DISK
FS36OUT O F 55 DISK A
E ARRY 1 3 8
I* .1....+....2....+....3....+....4....+....5....+....6....+.
IS36INP XX
I 1 55 RCDINP
C MOVE ARRY,2 ARRY,3
C MOVE RCDINP RCDOUT 55
C SETON LR
C* .1....+....2....+....3....+....4....+....5....+....6
OS36OUT DADD
O LR RCDOUT 55
**
COMPILE
TIME
ARRAY
After invoking the program as loaded\run by the OCL, my output file
S36OUT has a blank record, followed by the expected record. Statement
trace seems to show the write at '.DRVFW02' occurring twice, but I have
almost no idea why, though possibly something to do with non-detail
record output -- I am really quite RPGII illiterate.
If I can finally get a sensible insert, then I want to get an update;
I have not even begun to delve into that.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.