Jim

At V5R4 you have the *DEFINED keyword on the DCL command - with this you can build up what amounts to a data structure. Then you take that QjoRetrieveJournalInformation API and give it the main receiver variable - badabing!

All the parameters for this API are pointers, so regular CL variables should work.

So here's an example of the DCLs -

dcl &rrcv0100 *char 512
dcl &bytrtn *int4 stg(*defined) defvar(&rrcv0100 1)
dcl &bytavl *int4 stg(*defined) defvar(&rrcv0100 5)
dcl &jrnrcv *char 10 stg(*defined) defvar(&rrcv0100 9)
dcl &jrnrcvlib *char 10 stg(*defined) defvar(&rrcv0100 19)
dcl &jrn *char 10 stg(*defined) defvar(&rrcv0100 29)
dcl &jrnlib *char 10 stg(*defined) defvar(&rrcv0100 39)
dcl &threshold *int4 stg(*defined) defvar(&rrcv0100 49)
dcl &size *int4 stg(*defined) defvar(&rrcv0100 53)
dcl &asp *int4 stg(*defined) defvar(&rrcv0100 57)
dcl &nbrjrnetn *int4 stg(*defined) defvar(&rrcv0100 61)
dcl &ma dtalen *int4 stg(*defined) defvar(&rrcv0100 65)
dcl &ma nulind *int4 stg(*defined) defvar(&rrcv0100 69)
dcl &frstseqnbr *int4 stg(*defined) defvar(&rrcv0100 73)
dcl &mindtaara *char 1 stg(*defined) defvar(&rrcv0100 77)
dcl &minfile *char 1 stg(*defined) defvar(&rrcv0100 78)
dcl &rsvd01 *char 2 stg(*defined) defvar(&rrcv0100 79)
dcl &lastseqnbr *int4 stg(*defined) defvar(&rrcv0100 81)
dcl &rsvd02 *int4 stg(*defined) defvar(&rrcv0100 85)
dcl &status *char 1 stg(*defined) defvar(&rrcv0100 89)
dcl &rcvrsizopt *char 1 stg(*defined) defvar(&rrcv0100 90)
dcl &rcvrmaxopt *char 1 stg(*defined) defvar(&rrcv0100 91)
dcl &rsvd03 *char 4 stg(*defined) defvar(&rrcv0100 92)
dcl &attachdttm *char 13 stg(*defined) defvar(&rrcv0100 96)
dcl &detachdttm *char 13 stg(*defined) defvar(&rrcv0100 109)
dcl &savedttm *char 13 stg(*defined) defvar(&rrcv0100 122)
dcl &text *char 50 stg(*defined) defvar(&rrcv0100 135)
dcl &pend act *char 1 stg(*defined) defvar(&rrcv0100 185)
dcl &rmtjrntyp *char 1 stg(*defined) defvar(&rrcv0100 186)
dcl &lcljrn *char 10 stg(*defined) defvar(&rrcv0100 187)
dcl &lcljrnlib *char 10 stg(*defined) defvar(&rrcv0100 197)
dcl &locjrnsys *char 8 stg(*defined) defvar(&rrcv0100 207)
dcl &lclrcvrlib *char 10 stg(*defined) defvar(&rrcv0100 215)
dcl &srcjrn *char 10 stg(*defined) defvar(&rrcv0100 225)
dcl &srcjrnlib *char 10 stg(*defined) defvar(&rrcv0100 235)
dcl &srcjrnsys *char 8 stg(*defined) defvar(&rrcv0100 245)
dcl &srcrcvrlib *char 10 stg(*defined) defvar(&rrcv0100 253)
dcl &rdrrcvrlib *char 10 stg(*defined) defvar(&rrcv0100 263)
dcl &dualjrnrcv *char 10 stg(*defined) defvar(&rrcv0100 273)
dcl &dualrcvlib *char 10 stg(*defined) defvar(&rrcv0100 283)
dcl &prvjrnrcv *char 10 stg(*defined) defvar(&rrcv0100 283)
dcl &prvrcvlib *char 10 stg(*defined) defvar(&rrcv0100 302)
dcl &prvdulrcv *char 10 stg(*defined) defvar(&rrcv0100 313)
dcl &prvdullib *char 10 stg(*defined) defvar(&rrcv0100 323)
dcl &nxtjrnrcv *char 10 stg(*defined) defvar(&rrcv0100 333)
dcl &nxtrcvlib *char 10 stg(*defined) defvar(&rrcv0100 343)
dcl &nxtdulrcv *char 10 stg(*defined) defvar(&rrcv0100 353)
dcl &nxtdullib *char 10 stg(*defined) defvar(&rrcv0100 363)
dcl &nbrentlong *char 20 stg(*defined) defvar(&rrcv0100 373)
dcl &maxentlong *char 20 stg(*defined) defvar(&rrcv0100 393)
dcl &frstsqlong *char 20 stg(*defined) defvar(&rrcv0100 413)
dcl &lastsqlong *char 20 stg(*defined) defvar(&rrcv0100 433)
dcl &aspdev *char 10 stg(*defined) defvar(&rrcv0100 453)
dcl &lcljaspgrp *char 10 stg(*defined) defvar(&rrcv0100 463)
dcl &srcjaspgrp *char 10 stg(*defined) defvar(&rrcv0100 473)
dcl &fldjob *char 1 stg(*defined) defvar(&rrcv0100 483)
dcl &fldusr *char 1 stg(*defined) defvar(&rrcv0100 484)
dcl &fldpgm *char 1 stg(*defined) defvar(&rrcv0100 485)
dcl &fldpgmlib *char 1 stg(*defined) defvar(&rrcv0100 486)
dcl &fldsysseq *char 1 stg(*defined) defvar(&rrcv0100 487)
dcl &fldrmtadr *char 1 stg(*defined) defvar(&rrcv0100 488)
dcl &fldthd *char 1 stg(*defined) defvar(&rrcv0100 489)
dcl &fldluw *char 1 stg(*defined) defvar(&rrcv0100 490)
dcl &fldxid *char 1 stg(*defined) defvar(&rrcv0100 491)
dcl &rsvd04 *char 21 stg(*defined) defvar(&rrcv0100 492)

dcl &rrcvlen *int4 value(512)
dcl &qjrnrcv *char 20
dcl &jrnrcvnam *char 10 stg(*defined) defvar(&qjrnrcv 1)
dcl &jrnrcvlib *char 10 stg(*defined) defvar(&qjrnrcv 11)
dcl &format *char 8 value('RRCV0100')

callprc 'QjoRtvJrnReceiverInformation' (&rrcv0100 &rrcvlen &qjrnrcv &format)
On 11/21/2011 8:29 AM, Jim Oberholtzer wrote:
Gary,

Good thought but I don't need to ask the remote systems to send me
anything, the local (main) system has all the information needed. The
API Retrieve Journal Information will retrieve everything. Getting a
list of the journal receivers is as easy as you suggest.

Since my target audience for this function are administrators, most of
whom have little or no experience in RPG of any flavor I was hoping to
do the entire process in CL. (This is also partly due to my own
extraordinarily rusty RPG skills) At this moment it looks doable. And
before the chorus starts, yes, it would much faster and better to manage
in RPG with subfiles and all, even better in COBOL but the concept of
getting in done in CL is just appealing to me, so let's not have a
discussion about the better place to do it.

Now, does anyone have an example of calling the Remote Journal
Information API in CL?

Once I get the project done, I'll post to open source.


Jim Oberholtzer
Chief Technical Architect
Agile Technology Architects


On 11/18/2011 3:46 PM, Monnier, Gary wrote:
Jim,



Can you can use a series of SBMRMTCMD/RUNRMTCMD commands to run
something like the following?



CRTLIB LIB(MYTMPLIB)

DSPOBJD OBJ(*ALL/*ALL) OBJTYPE(*JRN) OUTPUT(*OUTFILE)
OUTFILE(MYTMPLIB/JOURNALS)

Run a command or call a program that utilizes the
Retrieve Journal Information (QjoRetrieveJournalInformation) API and
puts the info

into a table (MYTMPLIB/RMTJRNINFO). You will probably have to have this
installed. SNTNETF of a save file might do the trick.

SNDNETF FILE(MYTMPLIB/RMTJRNINFO) TOUSRID((SOMEID
SOMEADR))

DLTLIB LIB(MYTMPLIB)



So now you have a list of all the remote journals and their attributes
on the remote system.



An idea anyway.



Gary





-----Original Message-----
From:midrange-l-bounces+gary.monnier=terex.com@xxxxxxxxxxxx
[mailto:midrange-l-bounces+gary.monnier=terex.com@xxxxxxxxxxxx] On
Behalf Of Jim Oberholtzer
Sent: Friday, November 18, 2011 12:20 PM
To: Midrange Systems Technical Discussion
Subject: List remote journals and the status



Does any have a program (green screen) or know of a way to list all the
remote journals and their status on the remote system in one panel. I
know I can display each ones attributes and use the appropriate F key to


get there but I was hoping for a more time effective solution. Must be


V5R4 at this point.

Thanks!



--

Jim Oberholtzer

Chief Technical Architect

Agile Technology Architects



--

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.