Sample JCL for running CA Earl can be found in member TMSEARL in the CA 1 hlq.CTAPJCL library. See the EARLINDX member in the CA 1 hlq.CTAPEARL library for a list of supplied sample members. The following coding sequence example illustrates the two requirements for using CA Earl:
In this example, CA Earl lists all data sets that expire after the current date. A SET statement has been used to define a date format different from the default that CA 1 system option DATEFMT defines. The CONTROL statement defines the sort sequence for the output report.
! DEFINE WORK FIELDS
DEF PRINT_EXPDT (X 10) = NONE 'EXPIRATION' 'DATE'
DEF PRINT_CURR_DATE (X 10) = NONE 'TODAYS' 'DATE'
! COPY CA-1 CA-EARL RECORD DEFINITIONS
COPY EARLDEFS
! SET TYPRUN TO RETRIEVE VOLUME AND DSNB RECORDS
SET TYPRUN = R_SEQUENTIAL
! ISSUE GET FOR TMC RECORD
!SET DATE FORMAT
SET DATE_FMT='MMMDD.YYYY'
GET TAPEDB
! USE CTSEDATE TO FORMAT EXPDT AND RUNDATE FOR PRINTING
SET FUNCTION = 'TO_EXTERNAL'
CALL CTSEDATE USING FUNCTION
PRINT_EXPDT
EXPDT
DATE_FMT
SET FUNCTION = 'RETURN_DATE'
CALL CTSEDATE USING FUNCTION
PRINT_CURR_DATE
RUNDATE
DATE_FMT
! QUIT WHEN WE REACH END-OF-FILE ON THE TMC
GOTO EOJ TAPEDB = 'E'
! SELECT DATA SETS EXPIRING AFTER CURRENT DATE
REPORT 'DATA SETS EXPIRING BEYOND CURRENT DATE'
SELECT EXPDT > RUNDATE
CONTROL EXPDT DSN
PRINT VOLSER DSN PRINT_CURR_DATE PRINT_EXPDT
END
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|