Previous Page | Next Page

Appender Reference

ZOSFacilityAppender


ZOSFacilityAppender Overview

ZOSFacilityAppender is a logging facility appender that supports event logging on z/OS operating systems. ZOSFacilityAppender enables multiple instances of SAS in the z/OS environment to write log information to a common location. If the z/OS environment uses the coupling facility, all of the SAS jobs that run on all of the z/OS systems that are on the sysplex can write their logs to the same location.


ZOSFacilityAppender Syntax

<appender class="ZOSFacilityAppender" name="appender-name">
<param name="stream" value="SAS.LOG"/>
<layout>
<param name="ConversionPattern" value="conversion-pattern"/>
</layout>
</appender>

ZOSFacilityAppender Syntax Description

name="stream" value="value"

specifies the logstream for ZOSFacilityAppender.

Restriction: The logstream must be defined, using the IBM IXCMIAPU utility.

For information about the generic elements of the appender syntax, see General Appender Syntax.


ZOSFacilityAppender Examples


Configuring ZOSFacility Appender

The following example is a typical XML configuration file that specifies ZOSFacilityAppender.

<appender  class="ZOSFacilityAppender" name="LOG">
   <param name="stream" value="USERNAME.SAS.LOG"/>
   <layout>
      <param name="ConversionPattern"
             value="%d %-5p [%t] %c (%F:%L) - %m"/>
   </layout>
</appender>

<root>
   <level value="trace"/>
   <appender-ref ref="LOG"/>
</root>


Defining the Logstream

The following example is for use with direct access storage devices (DASD) only. The values that are included are not necessarily the values that you might want to use. The values that you specify can depend on the amount of data that is being processed, or on other variables.

//STEP1  EXEC PGM=IXCMIAPU                      
//SYSIN    DD  *                                
   DATA TYPE(LOGR)                             
   DEFINE LOGSTREAM NAME(SAS.LOG) 
         LS_DATACLAS(STD)
         LS_MGMTCLAS(STD) 
         LS_STORCLAS(STD) 
         HLQ(IXGLOGR) 
         MODEL(NO) 
         LS_SIZE(0)
         STG_MGMTCLAS(STD) 
         STG_STORCLAS(STD) 
         STG_DATACLAS(STD) 
         STG_SIZE(3000)
         LOWOFFLOAD(60) 
         HIGHOFFLOAD(95) 
         STG_DUPLEX(YES) 
         DUPLEXMODE(UNCOND)
         RETPD(3) 
         AUTODELETE(YES) 
         OFFLOADRECALL(YES)
         DASDONLY(YES) 
         DIAG(NO) 
         LOGGERDUPLEX() 
         EHLQ(NO_EHLQ) 
         MAXBUFSIZE(64000)


Using the SUBSYS DD Statement

To see the contents of the logstream, you can activate the LOGR subsystem by placing SUBSYS SUBNAME(LOGR) in SYS1.PARMLIB(IEFSSNxx). The following example shows how, after the LOGR subsystem has started, you can treat the logstream as a data set by using the SUBSYS DD statement.

//REPRO    EXEC PGM=IDCAMS,REGION=20M                           
//SYSUT1   DD DISP=SHR,DSN=SAS.LOG,                     
//            SUBSYS=(LOGR),                                   
//            DCB=(DSORG=PS,RECFM=VB,LRECL=32756,BLKSIZE=32760)
//SYSUT2   DD SYSOUT=*,                                        
//            DCB=(DSORG=PS,RECFM=VB,LRECL=32756,BLKSIZE=32760)
//SYSIN    DD *                                                 
 REPRO INFILE(SYSUT1) OFILE(SYSUT2)                             
/*


Limiting the Output

The FROM and TO options in the following example are options of the LOGR subsystem that limit the output.

//IN   DD DSN=SAS.LOG,DISP=SHR, 
//        DCB=(DSORG=PS,RECFM=VB,LRECL=32756,BLKSIZE=32760)
//        SUBSYS=(LOGR,IXGSEXIT,      
//        'FROM=(1997/152,05:00),TO=(1997/153,23:59),GMT'


Deleting the Logstream Contents

To delete the entire contents of the logstream, copy the IBM sample PROC IXGDELAB into SYS1.PROCLIB and start it with the logstream name as the parameter. Although this code does not delete the logstream, it resets the stream to an empty condition.

S IXGDELAB,LOGSTRM=SAS.LOG


ZOSFacilityAppender Usage and Best Practices

To use z/OS Facility Appender, specify a class of ZOSFacilityAppender that has a stream parameter that names the z/OS logstream that is used. You can define coupling facility (CF) logstreams or DASD-only logstreams for use with ZOSFacilityAppender.

Previous Page | Next Page | Top of Page