ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Trying to find out when a library list was added

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trying to find out when a library list was added

    My End of Day routine, which runs in batch, blew up last night because the library list in the session that scheduled the job had a test library in it. The batch job includes S/36 OCL to control flow. Is there a way to find out in system auditing when a modification to the library list occurred? No one seems to know when the ADDLIBLE command would have been executed in that session. I know the user profile and have a time frame in which it probably happened.

    Thanks for your help!
    "It's what you learn after you know it all that counts." - John Wooden

  • #2
    I would be very surprised if system auditing could answer this question. The library list is an attribute of a job, so I'd start by determining how the job gets its library list. From a job description? From system value QUSRLIBL? Does some program in the job execute ADDLIBLE?

    Comment


    • #3
      I just reread the question. The batch job gets the library list from the interactive job. Do you have a job log of the interactive job?

      Comment


      • #4
        Unfortunately, no. If our jobs end with a 0 ending code, they're not output to the QEZJOBLOG. I'm the one who kicked off the batch job from the QSYSOPR session, then I ended normally. Someone added the testing library to the list via command during the day. It may have even been me - I'm trying to think of why I would... - but if I can find out the time the ADDLIBLE was executed, I might be able to figure out who added it and why.
        "It's what you learn after you know it all that counts." - John Wooden

        Comment


        • #5
          I realize it's a little late now, but if this is a critical process, you may want to replace the default value of the INLLIBL parameter in the SBMJOB command for this process from *CURRENT to, perhaps, *JOBD.

          Cheers,

          Emmanuel

          Comment


          • #6
            Emmanuel - I probably didn't word it correctly. This initiates through a S/36 OCL EVOKE command - either at a delayed time in batch, or setting time to run at 00:00 and it runs interactively.

            Thanks for the recommendation though!

            Code is below.


            Code:
            * INITIATE JOB-Q SCHEDULER                                                                                 
            *                                                                                                          
            * SET CANCEL AND INQUIRY                                                                                   
            *                                                                                                           
            // MEMBER USER1-XAATTR                                                                                     
            // ?M'0001,1,30'?                                                                                          
            *                                                                                                          
            // IF EVOKED-YES GOTO TG2000                                                                               
            // IF ?L'172,4'?/0000  GOTO TG2000                                                                         
            *                                                                                                          
            // LOCAL BLANK-*ALL                                                                                        
            // LOCAL OFFSET-001,DATA-'?WS?'                                                                            
            // LOCAL OFFSET-011,DATA-'?USER?'                                                                          
            // EVALUATE P64='?PRINTER?'                                                                                
            *                                                                                                          
            // IF ACTIVE-XA9019 * 'THE SCHEDULER IS ALREADY ACTIVE...MUST CANCEL!!'                                    
            // IF ACTIVE-XA9019 PAUSE                                                                                  
            // IF ACTIVE-XA9019 CANCEL                                                                                 
            *                                                                                                          
            // TAG TG1000                                                                                              
            *                                                                                                          
            // LOAD XA9010                                                                                             
            // FILE NAME-XZC00,DISP-SHR,LABEL-XZC00                                                                    
            // FILE NAME-XZS00,DISP-SHR,LABEL-XZS00                                                                    
            // FILE NAME-XZH00,DISP-SHR,LABEL-XZH00                                                                    
            // RUN                                                                                                     
            *                                                                                                          
            // IFT ?L'080,001'?/Y GOTO TG9000                                                                          
            // IFF ?L'172,4'?/0000 EVOKE XA9019                                                                        
            // IFF ?L'172,4'?/0000 GOTO TG9000                                                                         
            *                                                                                                          
            // TAG TG2000                                                                                              
            *                                                                                                          
            // EVALUATE P1='?L'177,1'?'                                                                                
            *                                                                                                          
            // IF ?L'172,4'?/0000 GOTO TG2100                                                                          
            // ATTR PRIORITY-LOW                                                                                       
            // WAIT TIME-?L'172,4'?00                                                                                  
            *                                                                                                          
            // TAG TG2100                                                                                              
            *                                                                                                          
            // LOAD XA9019                                                                                             
            // FILE NAME-XZC00,DISP-SHR,LABEL-XZC00                                                                    
            // FILE NAME-XZJ00,DISP-SHR,LABEL-XZJ00                                                                    
            // RUN                                                                                                     
            *                                                                                                          
            // IFF ?L'080,1'?/X   GOTO TG3000           ...NOT AT END OF FILE                                          
            *                                                                                                          
            // IF  ?L'176,1'?/Y   GOTO TG9000           ...CANCEL                                                      
            *                                                                                                          
            // LOCAL OFFSET-157,DATA-'N00        000'   ...RESET L.D.A FOR NEXT RUN                                    
            // GOTO TG2000                                                                                             
            *                                                                                                          
            // TAG TG3000                                                                                              
            *                                                                                                          
            // IFF ?L'160,6'?/BL6909    GOTO TG4000                                                                    
            *                                                                                                          
            *  MUST BE ABLE TO LOCK THE CONTROL FILE TO CONTINUE WITH END OF DAY                                       
            *  IF END OF DAY IS NOT THE FIRST PROGRAM                                                                  
            *                                                                                                          
            // IF ?L'168,3'?/001 GOTO TG3100                                                                           
            *                                                                                                          
            *  MUST BE ABLE TO LOCK THE CONTROL FILE TO CONTINUE WITH END OF DAY                                       
            *  LOCK IN SUB-PROCEDURE SINCE XZC00 IS USED IN THIS PROCEDURE                                             
            *                                                                                                          
            // XA9018                                                                                                  
            *                                                                                                          
            // TAG TG3100                                                                                              
            *                                                                                                          
            // EVALUATE P63='?L'158,8'?'                                                                               
            *                                                                                                          
            // LOCAL OFFSET-293,DATA-'X'                                                                               
            // INCLUDE BL6909 ?1?                                                                                      
            // LOCAL OFFSET-158,DATA-'?63?'                                                                            
            *                                                                                                          
            *  JUST RETURN, NO ADDITIONAL JOBS TO RUN AT UNITED                                                        
            *                                                                                                          
            // RETURN                                                                                                  
            *                                                                                                          
            // GOTO TG2100                                                                                             
            *                                                                                                          
            // TAG TG4000                                                                                              
            *                                                                                                          
            // LOCAL OFFSET-177,DATA-'?PRINTER?'                                                                       
            // IFF ?L'166,2'?/  FORMS DEVICE-?L'166,2'?                                                                
            // JOBQ 3,?CLIB?,?L'160,6'?                                                                                
            // IFF ?L'166,2'?/  FORMS DEVICE-?L'177,2'?                                                                
            *                                                                                                          
            // IFF ?L'158,2'?/05 GOTO TG2100                                                                           
            *                                                                                                          
            *  IF YOU CAN LOCK THE CONTROL FILE,(NOTHING ACTIVE) CONTINUE SENDING JOBS                                 
            *                                                                                                          
            // TAG TG5000                                                                                              
            *                                                                                                          
            // FILE NAME-XZC00,LABEL-XZC00,WAIT-NO                                                                     
            // IF ?CD?/0000 GOTO TG2100                                                                                
            // WAIT INTERVAL-000100                                                                                    
            // GOTO TG5000                                                                                             
            *                                                                                                          
            *                                                                                                          
            // TAG TG9000                                                                                              
            *                                                                                                          
            // LOCAL BLANK-*ALL                                                                                        
            **
            "It's what you learn after you know it all that counts." - John Wooden

            Comment


            • #7
              It's not clear what the code for the OCL proc has to do with the question (except that an OCL proc is apparently affected by an ADDLIBLE at some point). But command auditing potentially have shown the moment when it happened. Unfortunately, if any particular auditing isn't enabled, it won't help. It's commonly not enabled.
              Tom

              There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

              Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

              Comment

              Working...
              X