× 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.



Jeff Crosby wrote:
Isn't the execution of a CHGJRN command to a new receiver supposed to generate a message? (I think it's CPF7020)

No message is generated in the MSGQ assigned to the journal, though there is one generated within the joblog. I'm looking for a way to retrieve the name of the journal receiver that was just detached.

Jeff:

Previous receiver is reasonably easy to determine. A trivial example:

/* Begin paste */
pgm

dcl &RcvInfo *char 512

dcl &RcvLen *char 4
dcl &RcvName *char 20
dcl &PrvRcvName *char 20

dcl &ErrCod *char 4 value( x'00000000' )


chgvar &RcvInfo ' '

chgvar %bin( &RcvLen ) 512
chgvar &RcvName 'AUDJRN1703LAUDJRN '

GETRCVINFO:

callprc 'QjoRtvJrnReceiverInformation' +
( +
&RcvInfo +
&RcvLen +
&RcvName +
'RRCV0100' +
&ErrCod +
)

chgvar &PrvRcvName %sst( &RcvInfo 293 20 )
/* Get previous receiver name... */

dmpclpgm
return

endpgm
/* End paste */

The request for receiver info is sent for the receiver named AUDJRN1703 in library LAUDJRN; that name is in variable &RcvName. The content of the returned structure has the 'previous receiver' name and library beginning in position 293 (offset 292) for 20 characters, name and library. That substring is placed into &PrvRcvName.

If you replace the value 'AUDJRN1703LAUDJRN ' with a receiver and library from your system, you should see its preceding receiver in &PrvRcvName in the dump when the program runs.

Of course, you have to determine what the starting (current?) receiver name is...

Tom Liotta


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.