Author Topic: Sample of how to write to the SYSLOG from within a batch job  (Read 4534 times)

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1208
    • View Profile
Sample of how to write to the SYSLOG from within a batch job
« on: September 13, 2011, 07:31:28 AM »
This is best shown by example:

//ARSDBJOB JOB (XXXX,YYYYYYY,'ARNOLD',CLASS=A,REGION=0M,
//             MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*
//TMP1  EXEC  PGM=IKJEFT01,                                           
//            DYNAMNBR=200                                           
//SYSPROC  DD  DSN=SYS1.SBPXEXEC,DISP=SHR                             
//*                                                                   
//SYSTSPRT DD  SYSOUT=*                                               
//*                                                                   
//SYSTSIN  DD  *                                                     
 oshell logger -d1 starting ed run                                 
 oshell /usr/lpp/ars/V8R5M0/bin/arsdb -I ARCH850 -vx ARSUSER -o /tmp/e
 oshell logger -d1   ending ed run                                 
//*                                                                   

The above job produces the following in the SYSLOG:
+ODV733: 16777369: starting ed run                   
IWM034I PROCEDURE DB1XWLMJ STARTED FOR SUBSYSTEM DB1X
APPLICATION ENVIRONMENT DSNWLMX_JAVA                 
PARAMETERS DB2SSN=DB1X,APPLENV='DSNWLMX_JAVA'         
$HASP100 DB1XWLMJ ON STCINRDR                         
$HASP373 DB1XWLMJ STARTED                             
IEF403I DB1XWLMJ - STARTED - TIME=15.42.42           
+ODV733: 16777377: ending ed run                     

And that very nicely shows what the job caused to happen between the two logger commands.
#zOS #ODF