WRKJRNA JRN(TEST/TESTING) OUTPUT(*OUTFILE) DETAIL(*RCVDIR) OUTFILE
(QTEMP/WRKJRNA)
No dice, all the other ways will not put the journal receiver as a
field that you can query against.
It looks like this API could be used to get that receiver info:
Retrieve Journal Information (QjoRetrieveJournalInformation) API
http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/index.jsp?topic=/apis/QJORJRNI.htm
In particular, see: Key 1 Output Section
Here is an RPG example using a journal API, although perhaps not this one:
http://www-03.ibm.com/systems/i/software/db2/chgjrnstr.html
--
Karl Hanson
I cant select *outfile for output, only *print & I dont even get
DETAIL as a possible option if I F4.
So I would print it then cpysplf :)
Are you having a problem that in generating one file called QTEMP/
WRKJRNA you cannot now create a new one with a different format? If so
delete the 1st one & try again.
Jonathan.
The help for DETAIL(*RCVDIR) says this in part:
*RCVDIR
The printer file will contain the names of the journal
receivers currently associated with the journal. This
entry will also contain some attribute information
about the journal receiver. This value is not valid <<<
with OUTPUT(*OUTFILE). <<<
Using OUTPUT(*PRINT) DETAIL(*RCVDIR) followed by CPYSPLF should work,
but if the data is needed in a program (or, eg input to SQL query), some
logic would probably be needed to skip over page headings, column
headings, etc. Also there is no guarantee the listing format would not
change, eg in a future release. This is why usage of an equivalent API
is encouraged - much effort is given to avoiding incompatible changes to
APIs. Of course, using an API is not as simple as the OUTPUT(*OUTFILE)
CL option.
--
Karl Hanson
I was able to track down the api to get what I needed, I really needed
the 'x' reference between objects/journal/receiver. Does someone have
code example of reading a spooled file.