Try to use external date
search cancel

Try to use external date

book

Article ID: 136292

calendar_today

Updated On:

Products

TLMS Tape Management

Issue/Introduction

don't get explicit error message when the SET FUNCTION = 'FROM _EXTERNAL' is used on the EARL report and result obtained not correct.




Environment

Release :

Component : CA TLMS Tape Management

Resolution

The following example shows one technique for handling nonzero return codes from CTSEDATE. The date format field is deliberately filled with the character X to cause an error. Note the additional coding and the CTSEDATE Error Report. 

 COPY EARLDEFS

 DEF CTSEDATE_RC    (B 5.0) = 00000 'CTSEDATE' 'RETURN CODE'

 DEF FIRST_SW         (X 1) = ' '

 IF FIRST_SW = ' '

    THEN SET FIRST_SW = '*'

    SET FUNCTION = 'RETURN_DATE'

    CALL CTSEDATE USING FUNCTION,RUNDATE,RUNTIME

    SET FUNCTION = 'TO_EXPLODED'

    CALL CTSEDATE USING FUNCTION,P_EXP_DATA,RUNDATE

 ENDIF

 SET FUNCTION = 'TO_EXTERNAL'

 SET DATE_FMT = 'XXXXXXXXXX'

 SET TYPRUN = R_VOLUME

!

! CHECK THE LAST RETURN CODE FROM CTSEDATE

!

 IF CTSEDATE_RC NOT = 0 THEN

    GOTO EOJ

 ENDIF

 GET TAPEDB

 GOTO EOJ TAPEDB = 'E'

 IF SCRATCH_IND NOT = 'N'

     GOTO START

 ENDIF

 CALL  CTSEDATE  USING FUNCTION,P_EXPDT,EXPDT,DATE_FMT

 SET CTSEDATE_RC = CTSEDATE

 REPORT TITLE  @1 P_EXP_DAYNAM @11 ',' @13 P_EXP_MONNAM @24 P_EXP_DD

               @26 ',' @28 P_EXP_YYYY @32 '.' @33 P_EXP_DDD

               @50 COMPANY_NAME @115 'PAGE' @125 PAGENUMBER

        TITLE  @1 ' '

        TITLE  @1 'TMS REPORT-TMEDAT01'

                3 'TAPE DATASETS EXPIRING IN JANUARY, YYYY'

   SELECT EXPDT > 90000 AND EXPDT < 90032

   PRINT DSN VOLSER P_EXPDT

 REPORT TITLE  @1 P_EXP_DAYNAM @11 ',' @13 P_EXP_MONNAM @24 P_EXP_DD

               @26 ',' @28 P_EXP_YYYY @32 '.' @33 P_EXP_DDD

               @50 COMPANY_NAME @115 'PAGE' @125 PAGENUMBER

        TITLE  @1 ' '

        TITLE  @1 'TMS REPORT-TMEDAT01'

                3 'CTSEDATE ERROR REPORT'

   SELECT CTSEDATE_RC NOT = 0

   PRINT CTSEDATE_RC FUNCTION  EXPDT P_EXPDT DATE_FMT

END