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



Hi,                     

I'm a novice programmer in AS400 journaling concepts. I'm facing trouble while 
I try to use journal to get audit info using the DSPJRN command. Actually I'm 
getting many duplicate records in the audit file(audit file is updated 2 hrs 
once with the journal data). My audit program should run 2 hrs once and get the 
record from the journal and put them in the audit file.

To achieve this I've stored MAX( sequence number) in the journal retrieved in a 
dtaara and when the job runs next 2 hrs, it will get the journal entries from 
that sequence number. What will happen if CURCHIAN is used and the sequence 
number is reset? Will that be an issue if I try to use sequence number for 
retrieving the data from journal?



Below is my code snippet:

&FAUDSTRSEQ is available in a *DTAARA.

IF         COND(&FAUDSTRSEQ *EQ 0) THEN(DO)            
DSPJRN     JRN(&PJRNLIB/&FJOURNAL) +                   
             FILE((&PEMC2LIB/*ALL)) RCVRNG(*CURCHAIN) +
             FROMENT(*FIRST) JRNCDE((R)) ENTTYP(*RCD) +
             OUTPUT(*OUTFILE) OUTFILFMT(*TYPE3) +      
             OUTFILE(&PJRNLIB/AUJRNOUT) OUTMBR(*FIRST +
             *ADD) ENTDTALEN(*CALC)                    
MONMSG     MSGID(CPF7062 CPF7054)                      
ENDDO                                                  
                                                       
IF         COND(&FAUDSTRSEQ *NE 0) THEN(DO)            
DSPJRN     JRN(&PJRNLIB/&FJOURNAL) +                   
             FILE((&PEMC2LIB/*ALL)) +                  
             RCVRNG(*CURCHAIN) FROMENT(&FAUDSTRSEQ) +  
             JRNCDE((R)) ENTTYP(*RCD) OUTPUT(*OUTFILE) +
             OUTFILFMT(*TYPE3) +                       
             OUTFILE(&PJRNLIB/AUJRNOUT) OUTMBR(*FIRST +
              *ADD) ENTDTALEN(*CALC) 
 ENDDO                              

Thanks for your time. Pls. help me in getting away with duplicate records. 
Thanks in advance.

Regards,
Nandini



This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

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.