Given a qualified journal receiver name, this program will provide the journal and journal library that the receiver is associated with.
* Associate Journal with Journal receiver TJ9999R * written by James H Greene on 2004/03/06 * TRIPLEJ, INC * TRIPLEJ46@hotmail.com * * Prior to compiling execute the below command to create the externally * described file * DSPOBJD OBJ(*ALLUSR/*ALL) OBJTYPE(*JRNRCV) OUTPUT(*OUTFILE) * OUTFILE(JHGREENE/TJ9999D) * * compile this pgm using the below command * CRTBNDRPG PGM(JHGREENE/TJ9999R) SRCFILE(JHGREENE/QSOURCE1) * DFTACTGRP(*NO) BNDDIR(QUSAPIBD) * ftj9999d if e disk usropn fqsysprt o f 120 printer d******************************************************************** d* d specs for format RRCV0010 from qsysinc/qrpglesrc/qjournal dqjov0100 ds 512 Qjo RRCV0100 d qjojrn00 9 18 Jrn Rcv Name d qjojrln00 19 28 Jrn Rcv Lib Name d qjojn01 29 38 Jrn Name d qjojln00 39 48 Jrn Lib Name d ibmapi c 'QjoRtvJrnReceiverInformation' d cmdlength s 15 5 inz(160) d command s 160 d format s 8 d errcode s 10 d rcvrlibr s 20 d rtnvarlen s 4b 0 inz(%size(qjov0100)) c dou %eof(tj9999d) c read tj9999d c if not %eof(tj9999d) c eval rcvrlibr = odobnm c eval %subst(rcvrlibr:11:10) = odlbnm c eval format = 'RRCV0100' C callb ibmapi C parm qjov0100 C parm rtnvarlen C parm rcvrlibr C parm format C parm errcode c except detail c endif c enddo c eval *inlr = *on c *inzsr begsr c eval command = 'DSPOBJD OBJ(*ALLUSR/*ALL) - c OBJTYPE(*JRNRCV) OUTPUT(*OUTFILE) - c OUTFILE(JHGREENE/TJ9999D)' c call 'QCMDEXC' c parm command c parm cmdlength c open tj9999d c except header c endsr oqsysprt e header 1 1 o 10 'Receiver' o 21 'Recvr Lib' o 30 'Journal' o 42 'Jrnl Lib' oqsysprt e detail 1 o qjojrn00 11 o qjojrln00 22 o qjojn01 33 o qjojln00 44
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
This was first published in March 2004