CloneSet13


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
146710.998paragraph_list[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11463500
CCCC12.COB
21464088
CCCC14.COB
31465953
CCCC15.COB
41462932
CCCC3.COB
51463657
CCCC6.COB
61464911
CCCC7.COB
71463784
CCCC9.COB
Clone Instance
1
Line Count
146
Source Line
3500
Source File
CCCC12.COB

      *
      *
       2431-VALIDATE-DATE.
      ****************************************************************
      *                                                              *
      *      D A T E  V A L I D A T I O N  P R O C E D U R E         *
      *                                                              *
      *      INSTRUCTIONS:                                           *
      *      1.  MOVE THE DATE TO BE VALIDATED TO THE FOLLOWING      *
      *          FIELDS FOR THE GIVEN FORMATS:                       *
      *          A.  YYMMDD FORMAT -- MOVE TO: YYMMDD-DATE-WORKAREA  *
      *          B.  MMDD FORMAT   -- MOVE TO: MMDD-DATE-WORK-FIELDS *
      *              (NOTE BELOW FOR DETERMINING LEAP YEAR FOR MMDD  *
      *              DATE FORMAT.)                                   *
      *          C.  YYMM FORMAT   -- MOVE TO: YYMM-DATE-WORKAREA    *
      *      2.  WHEN PERFORMING THE PROCEDURE THAT USES THIS WORK   *
      *          AREA, FILL IN THE APPROPRIATE DATE-FORMAT-FLAG      *
      *          VALUES: 1, 2 OR 3.  SEE 03 LEVEL DATE-FORMAT-FLAG.  *
      *      3.  IF USING THE MMDD-DATE-FORMAT (VALUE 2), THE YEAR   *
      *          YOU WISH TO USE TO DETERMINE IF IT IS A LEAP YEAR   *
      *          MUST BE FILLED IN.  MOVE THIS VALUE INTO THE        *
      *          MMDD-YEAR DATA ITEM.  DO THIS PRIOR TO PERFORMING   *
      *          THIS PROCEDURE.                                     *
      *                                                              *
      ****************************************************************
           MOVE ZERO TO DATE-FLAGS.
           IF  YYMMDD-DATE-FORMAT
               IF YYMMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  MMDD-DATE-FORMAT
               IF MMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  YYMM-DATE-FORMAT
               IF YYMM-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
               MOVE DATE-MISSING-FLAG TO
                          DATE-VALIDATION-FLAG.
           IF  DATE-NOT-NUMERIC
                 OR   DATE-MISSING
               NEXT SENTENCE
           ELSE
               PERFORM 1DVP-VALIDATE-DAY-MONTH-RTN.
      *
      *
       1DVP-VALIDATE-DAY-MONTH-RTN.
           IF  YYMMDD-DATE-FORMAT
               MOVE YYMMDD-YEAR
                       IN YYMMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE YYMMDD-MONTH
                       IN YYMMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE YYMMDD-DAY
                       IN YYMMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  MMDD-DATE-FORMAT
               MOVE MMDD-YEAR
                       IN MMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE MMDD-MONTH
                       IN MMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE MMDD-DAY
                       IN MMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  YYMM-DATE-FORMAT
               MOVE 1 TO DAY-FLAG
               MOVE YYMM-MONTH
                       IN YYMM-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA.
           PERFORM 2DVP-VALIDATE-MONTH-ROUTINE.
           IF  VALID-MONTH
                 AND   NOT YYMM-DATE-FORMAT
               PERFORM 3DVP-VALIDATE-DAY-ROUTINE.
           IF  VALID-DAY
                 AND   VALID-MONTH
               MOVE 1 TO DATE-VALIDATION-FLAG.
      *
      *
       2DVP-VALIDATE-MONTH-ROUTINE.
           IF  NOT VALID-MONTH-VALUE
               MOVE ZERO TO MONTH-FLAG
           ELSE
               MOVE 1 TO MONTH-FLAG.
      *
      *
       3DVP-VALIDATE-DAY-ROUTINE.
           DIVIDE CENTURY-FOR-COMPUTATION
             BY       DIVISOR-FOR-LEAP-YEAR
             GIVING       LEAP-YEAR-QUOTIENT
             REMAINDER       LEAP-YEAR-REMAINDER.
           IF  YYMMDD-YEAR EQUAL 00
               MOVE 01 TO LEAP-YEAR-REMAINDER
               IN LEAP-YEAR-WORK.
           MOVE MONTH-WORKAREA TO
                      MAXIMUM-DAY-FLAG.
           IF  THIRTY-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-30-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  THIRTY-ONE-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-31-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  FEBRUARY
                   IN DATE-VALIDATION-WORKAREA
               IF  LEAP-YEAR
                     AND   DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-29-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
               IF NOT LEAP-YEAR
                    AND    DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-28-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
                   MOVE 1 TO DAY-FLAG
           ELSE
               MOVE 1 TO DAY-FLAG.
           IF  DAY-WORKAREA
                   IS LESS THAN 1
               MOVE ZERO TO DAY-FLAG.


Clone Instance
2
Line Count
146
Source Line
4088
Source File
CCCC14.COB

      *
      *
       2311-VALIDATE-DATE.
      ****************************************************************
      *                                                              *
      *      D A T E  V A L I D A T I O N  P R O C E D U R E         *
      *                                                              *
      *      INSTRUCTIONS:                                           *
      *      1.  MOVE THE DATE TO BE VALIDATED TO THE FOLLOWING      *
      *          FIELDS FOR THE GIVEN FORMATS:                       *
      *          A.  YYMMDD FORMAT -- MOVE TO: YYMMDD-DATE-WORKAREA  *
      *          B.  MMDD FORMAT   -- MOVE TO: MMDD-DATE-WORK-FIELDS *
      *              (NOTE BELOW FOR DETERMINING LEAP YEAR FOR MMDD  *
      *              DATE FORMAT.)                                   *
      *          C.  YYMM FORMAT   -- MOVE TO: YYMM-DATE-WORKAREA    *
      *      2.  WHEN PERFORMING THE PROCEDURE THAT USES THIS WORK   *
      *          AREA, FILL IN THE APPROPRIATE DATE-FORMAT-FLAG      *
      *          VALUES: 1, 2 OR 3.  SEE 03 LEVEL DATE-FORMAT-FLAG.  *
      *      3.  IF USING THE MMDD-DATE-FORMAT (VALUE 2), THE YEAR   *
      *          YOU WISH TO USE TO DETERMINE IF IT IS A LEAP YEAR   *
      *          MUST BE FILLED IN.  MOVE THIS VALUE INTO THE        *
      *          MMDD-YEAR DATA ITEM.  DO THIS PRIOR TO PERFORMING   *
      *          THIS PROCEDURE.                                     *
      *                                                              *
      ****************************************************************
           MOVE ZERO TO DATE-FLAGS.
           IF  YYMMDD-DATE-FORMAT
               IF YYMMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  MMDD-DATE-FORMAT
               IF MMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  YYMM-DATE-FORMAT
               IF YYMM-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
               MOVE DATE-MISSING-FLAG TO
                          DATE-VALIDATION-FLAG.
           IF  DATE-NOT-NUMERIC
                 OR   DATE-MISSING
               NEXT SENTENCE
           ELSE
               PERFORM 1DVP-VALIDATE-DAY-MONTH-RTN.
      *
      *
       1DVP-VALIDATE-DAY-MONTH-RTN.
           IF  YYMMDD-DATE-FORMAT
               MOVE YYMMDD-YEAR
                       IN YYMMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE YYMMDD-MONTH
                       IN YYMMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE YYMMDD-DAY
                       IN YYMMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  MMDD-DATE-FORMAT
               MOVE MMDD-YEAR
                       IN MMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE MMDD-MONTH
                       IN MMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE MMDD-DAY
                       IN MMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  YYMM-DATE-FORMAT
               MOVE 1 TO DAY-FLAG
               MOVE YYMM-MONTH
                       IN YYMM-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA.
           PERFORM 2DVP-VALIDATE-MONTH-ROUTINE.
           IF  VALID-MONTH
                 AND   NOT YYMM-DATE-FORMAT
               PERFORM 3DVP-VALIDATE-DAY-ROUTINE.
           IF  VALID-DAY
                 AND   VALID-MONTH
               MOVE 1 TO DATE-VALIDATION-FLAG.
      *
      *
       2DVP-VALIDATE-MONTH-ROUTINE.
           IF  NOT VALID-MONTH-VALUE
               MOVE ZERO TO MONTH-FLAG
           ELSE
               MOVE 1 TO MONTH-FLAG.
      *
      *
       3DVP-VALIDATE-DAY-ROUTINE.
           DIVIDE CENTURY-FOR-COMPUTATION
             BY       DIVISOR-FOR-LEAP-YEAR
             GIVING       LEAP-YEAR-QUOTIENT
             REMAINDER       LEAP-YEAR-REMAINDER.
           IF  YYMMDD-YEAR EQUAL 00
               MOVE 01 TO LEAP-YEAR-REMAINDER
               IN LEAP-YEAR-WORK.
           MOVE MONTH-WORKAREA TO
                      MAXIMUM-DAY-FLAG.
           IF  THIRTY-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-30-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  THIRTY-ONE-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-31-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  FEBRUARY
                   IN DATE-VALIDATION-WORKAREA
               IF  LEAP-YEAR
                     AND   DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-29-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
               IF NOT LEAP-YEAR
                    AND    DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-28-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
                   MOVE 1 TO DAY-FLAG
           ELSE
               MOVE 1 TO DAY-FLAG.
           IF  DAY-WORKAREA
                   IS LESS THAN 1
               MOVE ZERO TO DAY-FLAG.


Clone Instance
3
Line Count
146
Source Line
5953
Source File
CCCC15.COB

      *
      *
       8200-VALIDATE-DATE.
      ****************************************************************
      *                                                              *
      *      D A T E  V A L I D A T I O N  P R O C E D U R E         *
      *                                                              *
      *      INSTRUCTIONS:                                           *
      *      1.  MOVE THE DATE TO BE VALIDATED TO THE FOLLOWING      *
      *          FIELDS FOR THE GIVEN FORMATS:                       *
      *          A.  YYMMDD FORMAT -- MOVE TO: YYMMDD-DATE-WORKAREA  *
      *          B.  MMDD FORMAT   -- MOVE TO: MMDD-DATE-WORK-FIELDS *
      *              (NOTE BELOW FOR DETERMINING LEAP YEAR FOR MMDD  *
      *              DATE FORMAT.)                                   *
      *          C.  YYMM FORMAT   -- MOVE TO: YYMM-DATE-WORKAREA    *
      *      2.  WHEN PERFORMING THE PROCEDURE THAT USES THIS WORK   *
      *          AREA, FILL IN THE APPROPRIATE DATE-FORMAT-FLAG      *
      *          VALUES: 1, 2 OR 3.  SEE 03 LEVEL DATE-FORMAT-FLAG.  *
      *      3.  IF USING THE MMDD-DATE-FORMAT (VALUE 2), THE YEAR   *
      *          YOU WISH TO USE TO DETERMINE IF IT IS A LEAP YEAR   *
      *          MUST BE FILLED IN.  MOVE THIS VALUE INTO THE        *
      *          MMDD-YEAR DATA ITEM.  DO THIS PRIOR TO PERFORMING   *
      *          THIS PROCEDURE.                                     *
      *                                                              *
      ****************************************************************
           MOVE ZERO TO DATE-FLAGS.
           IF  YYMMDD-DATE-FORMAT
               IF YYMMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  MMDD-DATE-FORMAT
               IF MMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  YYMM-DATE-FORMAT
               IF YYMM-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
               MOVE DATE-MISSING-FLAG TO
                          DATE-VALIDATION-FLAG.
           IF  DATE-NOT-NUMERIC
                 OR   DATE-MISSING
               NEXT SENTENCE
           ELSE
               PERFORM 1DVP-VALIDATE-DAY-MONTH-RTN.
      *
      *
       1DVP-VALIDATE-DAY-MONTH-RTN.
           IF  YYMMDD-DATE-FORMAT
               MOVE YYMMDD-YEAR
                       IN YYMMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE YYMMDD-MONTH
                       IN YYMMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE YYMMDD-DAY
                       IN YYMMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  MMDD-DATE-FORMAT
               MOVE MMDD-YEAR
                       IN MMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE MMDD-MONTH
                       IN MMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE MMDD-DAY
                       IN MMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  YYMM-DATE-FORMAT
               MOVE 1 TO DAY-FLAG
               MOVE YYMM-MONTH
                       IN YYMM-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA.
           PERFORM 2DVP-VALIDATE-MONTH-ROUTINE.
           IF  VALID-MONTH
                 AND   NOT YYMM-DATE-FORMAT
               PERFORM 3DVP-VALIDATE-DAY-ROUTINE.
           IF  VALID-DAY
                 AND   VALID-MONTH
               MOVE 1 TO DATE-VALIDATION-FLAG.
      *
      *
       2DVP-VALIDATE-MONTH-ROUTINE.
           IF  NOT VALID-MONTH-VALUE
               MOVE ZERO TO MONTH-FLAG
           ELSE
               MOVE 1 TO MONTH-FLAG.
      *
      *
       3DVP-VALIDATE-DAY-ROUTINE.
           DIVIDE CENTURY-FOR-COMPUTATION
             BY       DIVISOR-FOR-LEAP-YEAR
             GIVING       LEAP-YEAR-QUOTIENT
             REMAINDER       LEAP-YEAR-REMAINDER.
           IF  YYMMDD-YEAR EQUAL 00
               MOVE 01 TO LEAP-YEAR-REMAINDER
               IN LEAP-YEAR-WORK.
           MOVE MONTH-WORKAREA TO
                      MAXIMUM-DAY-FLAG.
           IF  THIRTY-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-30-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  THIRTY-ONE-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-31-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  FEBRUARY
                   IN DATE-VALIDATION-WORKAREA
               IF  LEAP-YEAR
                     AND   DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-29-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
               IF NOT LEAP-YEAR
                    AND    DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-28-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
                   MOVE 1 TO DAY-FLAG
           ELSE
               MOVE 1 TO DAY-FLAG.
           IF  DAY-WORKAREA
                   IS LESS THAN 1
               MOVE ZERO TO DAY-FLAG.


Clone Instance
4
Line Count
146
Source Line
2932
Source File
CCCC3.COB

      *
      *
       2500-DATE-VALIDATION-ROUTINE.
      ****************************************************************
      *                                                              *
      *      D A T E  V A L I D A T I O N  P R O C E D U R E         *
      *                                                              *
      *      INSTRUCTIONS:                                           *
      *      1.  MOVE THE DATE TO BE VALIDATED TO THE FOLLOWING      *
      *          FIELDS FOR THE GIVEN FORMATS:                       *
      *          A.  YYMMDD FORMAT -- MOVE TO: YYMMDD-DATE-WORKAREA  *
      *          B.  MMDD FORMAT   -- MOVE TO: MMDD-DATE-WORK-FIELDS *
      *              (NOTE BELOW FOR DETERMINING LEAP YEAR FOR MMDD  *
      *              DATE FORMAT.)                                   *
      *          C.  YYMM FORMAT   -- MOVE TO: YYMM-DATE-WORKAREA    *
      *      2.  WHEN PERFORMING THE PROCEDURE THAT USES THIS WORK   *
      *          AREA, FILL IN THE APPROPRIATE DATE-FORMAT-FLAG      *
      *          VALUES: 1, 2 OR 3.  SEE 03 LEVEL DATE-FORMAT-FLAG.  *
      *      3.  IF USING THE MMDD-DATE-FORMAT (VALUE 2), THE YEAR   *
      *          YOU WISH TO USE TO DETERMINE IF IT IS A LEAP YEAR   *
      *          MUST BE FILLED IN.  MOVE THIS VALUE INTO THE        *
      *          MMDD-YEAR DATA ITEM.  DO THIS PRIOR TO PERFORMING   *
      *          THIS PROCEDURE.                                     *
      *                                                              *
      ****************************************************************
           MOVE ZERO TO DATE-FLAGS.
           IF  YYMMDD-DATE-FORMAT
               IF YYMMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  MMDD-DATE-FORMAT
               IF MMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  YYMM-DATE-FORMAT
               IF YYMM-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
               MOVE DATE-MISSING-FLAG TO
                          DATE-VALIDATION-FLAG.
           IF  DATE-NOT-NUMERIC
                 OR   DATE-MISSING
               NEXT SENTENCE
           ELSE
               PERFORM 1DVP-VALIDATE-DAY-MONTH-RTN.
      *
      *
       1DVP-VALIDATE-DAY-MONTH-RTN.
           IF  YYMMDD-DATE-FORMAT
               MOVE YYMMDD-YEAR
                       IN YYMMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE YYMMDD-MONTH
                       IN YYMMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE YYMMDD-DAY
                       IN YYMMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  MMDD-DATE-FORMAT
               MOVE MMDD-YEAR
                       IN MMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE MMDD-MONTH
                       IN MMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE MMDD-DAY
                       IN MMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  YYMM-DATE-FORMAT
               MOVE 1 TO DAY-FLAG
               MOVE YYMM-MONTH
                       IN YYMM-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA.
           PERFORM 2DVP-VALIDATE-MONTH-ROUTINE.
           IF  VALID-MONTH
                 AND   NOT YYMM-DATE-FORMAT
               PERFORM 3DVP-VALIDATE-DAY-ROUTINE.
           IF  VALID-DAY
                 AND   VALID-MONTH
               MOVE 1 TO DATE-VALIDATION-FLAG.
      *
      *
       2DVP-VALIDATE-MONTH-ROUTINE.
           IF  NOT VALID-MONTH-VALUE
               MOVE ZERO TO MONTH-FLAG
           ELSE
               MOVE 1 TO MONTH-FLAG.
      *
      *
       3DVP-VALIDATE-DAY-ROUTINE.
           DIVIDE CENTURY-FOR-COMPUTATION
             BY       DIVISOR-FOR-LEAP-YEAR
             GIVING       LEAP-YEAR-QUOTIENT
             REMAINDER       LEAP-YEAR-REMAINDER.
           IF  YYMMDD-YEAR EQUAL 00
               MOVE 01 TO LEAP-YEAR-REMAINDER
               IN LEAP-YEAR-WORK.
           MOVE MONTH-WORKAREA TO
                      MAXIMUM-DAY-FLAG.
           IF  THIRTY-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-30-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  THIRTY-ONE-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-31-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  FEBRUARY
                   IN DATE-VALIDATION-WORKAREA
               IF  LEAP-YEAR
                     AND   DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-29-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
               IF NOT LEAP-YEAR
                    AND    DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-28-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
                   MOVE 1 TO DAY-FLAG
           ELSE
               MOVE 1 TO DAY-FLAG.
           IF  DAY-WORKAREA
                   IS LESS THAN 1
               MOVE ZERO TO DAY-FLAG.


Clone Instance
5
Line Count
146
Source Line
3657
Source File
CCCC6.COB

      *
      *
       2361-VALIDATE-DATE.
      ****************************************************************
      *                                                              *
      *      D A T E  V A L I D A T I O N  P R O C E D U R E         *
      *                                                              *
      *      INSTRUCTIONS:                                           *
      *      1.  MOVE THE DATE TO BE VALIDATED TO THE FOLLOWING      *
      *          FIELDS FOR THE GIVEN FORMATS:                       *
      *          A.  YYMMDD FORMAT -- MOVE TO: YYMMDD-DATE-WORKAREA  *
      *          B.  MMDD FORMAT   -- MOVE TO: MMDD-DATE-WORK-FIELDS *
      *              (NOTE BELOW FOR DETERMINING LEAP YEAR FOR MMDD  *
      *              DATE FORMAT.)                                   *
      *          C.  YYMM FORMAT   -- MOVE TO: YYMM-DATE-WORKAREA    *
      *      2.  WHEN PERFORMING THE PROCEDURE THAT USES THIS WORK   *
      *          AREA, FILL IN THE APPROPRIATE DATE-FORMAT-FLAG      *
      *          VALUES: 1, 2 OR 3.  SEE 03 LEVEL DATE-FORMAT-FLAG.  *
      *      3.  IF USING THE MMDD-DATE-FORMAT (VALUE 2), THE YEAR   *
      *          YOU WISH TO USE TO DETERMINE IF IT IS A LEAP YEAR   *
      *          MUST BE FILLED IN.  MOVE THIS VALUE INTO THE        *
      *          MMDD-YEAR DATA ITEM.  DO THIS PRIOR TO PERFORMING   *
      *          THIS PROCEDURE.                                     *
      *                                                              *
      ****************************************************************
           MOVE ZERO TO DATE-FLAGS.
           IF  YYMMDD-DATE-FORMAT
               IF YYMMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  MMDD-DATE-FORMAT
               IF MMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  YYMM-DATE-FORMAT
               IF YYMM-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
               MOVE DATE-MISSING-FLAG TO
                          DATE-VALIDATION-FLAG.
           IF  DATE-NOT-NUMERIC
                 OR   DATE-MISSING
               NEXT SENTENCE
           ELSE
               PERFORM 1DVP-VALIDATE-DAY-MONTH-RTN.
      *
      *
       1DVP-VALIDATE-DAY-MONTH-RTN.
           IF  YYMMDD-DATE-FORMAT
               MOVE YYMMDD-YEAR
                       IN YYMMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE YYMMDD-MONTH
                       IN YYMMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE YYMMDD-DAY
                       IN YYMMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  MMDD-DATE-FORMAT
               MOVE MMDD-YEAR
                       IN MMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE MMDD-MONTH
                       IN MMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE MMDD-DAY
                       IN MMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  YYMM-DATE-FORMAT
               MOVE 1 TO DAY-FLAG
               MOVE YYMM-MONTH
                       IN YYMM-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA.
           PERFORM 2DVP-VALIDATE-MONTH-ROUTINE.
           IF  VALID-MONTH
                 AND   NOT YYMM-DATE-FORMAT
               PERFORM 3DVP-VALIDATE-DAY-ROUTINE.
           IF  VALID-DAY
                 AND   VALID-MONTH
               MOVE 1 TO DATE-VALIDATION-FLAG.
      *
      *
       2DVP-VALIDATE-MONTH-ROUTINE.
           IF  NOT VALID-MONTH-VALUE
               MOVE ZERO TO MONTH-FLAG
           ELSE
               MOVE 1 TO MONTH-FLAG.
      *
      *
       3DVP-VALIDATE-DAY-ROUTINE.
           DIVIDE CENTURY-FOR-COMPUTATION
             BY       DIVISOR-FOR-LEAP-YEAR
             GIVING       LEAP-YEAR-QUOTIENT
             REMAINDER       LEAP-YEAR-REMAINDER.
           IF  YYMMDD-YEAR EQUAL 00
               MOVE 01 TO LEAP-YEAR-REMAINDER
               IN LEAP-YEAR-WORK.
           MOVE MONTH-WORKAREA TO
                      MAXIMUM-DAY-FLAG.
           IF  THIRTY-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-30-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  THIRTY-ONE-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-31-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  FEBRUARY
                   IN DATE-VALIDATION-WORKAREA
               IF  LEAP-YEAR
                     AND   DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-29-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
               IF NOT LEAP-YEAR
                    AND    DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-28-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
                   MOVE 1 TO DAY-FLAG
           ELSE
               MOVE 1 TO DAY-FLAG.
           IF  DAY-WORKAREA
                   IS LESS THAN 1
               MOVE ZERO TO DAY-FLAG.


Clone Instance
6
Line Count
146
Source Line
4911
Source File
CCCC7.COB

      *
      *
       2800-DATE-VALIDATION-ROUTINE.
      ****************************************************************
      *                                                              *
      *      D A T E  V A L I D A T I O N  P R O C E D U R E         *
      *                                                              *
      *      INSTRUCTIONS:                                           *
      *      1.  MOVE THE DATE TO BE VALIDATED TO THE FOLLOWING      *
      *          FIELDS FOR THE GIVEN FORMATS:                       *
      *          A.  YYMMDD FORMAT -- MOVE TO: YYMMDD-DATE-WORKAREA  *
      *          B.  MMDD FORMAT   -- MOVE TO: MMDD-DATE-WORK-FIELDS *
      *              (NOTE BELOW FOR DETERMINING LEAP YEAR FOR MMDD  *
      *              DATE FORMAT.)                                   *
      *          C.  YYMM FORMAT   -- MOVE TO: YYMM-DATE-WORKAREA    *
      *      2.  WHEN PERFORMING THE PROCEDURE THAT USES THIS WORK   *
      *          AREA, FILL IN THE APPROPRIATE DATE-FORMAT-FLAG      *
      *          VALUES: 1, 2 OR 3.  SEE 03 LEVEL DATE-FORMAT-FLAG.  *
      *      3.  IF USING THE MMDD-DATE-FORMAT (VALUE 2), THE YEAR   *
      *          YOU WISH TO USE TO DETERMINE IF IT IS A LEAP YEAR   *
      *          MUST BE FILLED IN.  MOVE THIS VALUE INTO THE        *
      *          MMDD-YEAR DATA ITEM.  DO THIS PRIOR TO PERFORMING   *
      *          THIS PROCEDURE.                                     *
      *                                                              *
      ****************************************************************
           MOVE ZERO TO DATE-FLAGS.
           IF  YYMMDD-DATE-FORMAT
               IF YYMMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  MMDD-DATE-FORMAT
               IF MMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  YYMM-DATE-FORMAT
               IF YYMM-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
               MOVE DATE-MISSING-FLAG TO
                          DATE-VALIDATION-FLAG.
           IF  DATE-NOT-NUMERIC
                 OR   DATE-MISSING
               NEXT SENTENCE
           ELSE
               PERFORM 1DVP-VALIDATE-DAY-MONTH-RTN.
      *
      *
       1DVP-VALIDATE-DAY-MONTH-RTN.
           IF  YYMMDD-DATE-FORMAT
               MOVE YYMMDD-YEAR
                       IN YYMMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE YYMMDD-MONTH
                       IN YYMMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE YYMMDD-DAY
                       IN YYMMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  MMDD-DATE-FORMAT
               MOVE MMDD-YEAR
                       IN MMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE MMDD-MONTH
                       IN MMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE MMDD-DAY
                       IN MMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  YYMM-DATE-FORMAT
               MOVE 1 TO DAY-FLAG
               MOVE YYMM-MONTH
                       IN YYMM-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA.
           PERFORM 2DVP-VALIDATE-MONTH-ROUTINE.
           IF  VALID-MONTH
                 AND   NOT YYMM-DATE-FORMAT
               PERFORM 3DVP-VALIDATE-DAY-ROUTINE.
           IF  VALID-DAY
                 AND   VALID-MONTH
               MOVE 1 TO DATE-VALIDATION-FLAG.
      *
      *
       2DVP-VALIDATE-MONTH-ROUTINE.
           IF  NOT VALID-MONTH-VALUE
               MOVE ZERO TO MONTH-FLAG
           ELSE
               MOVE 1 TO MONTH-FLAG.
      *
      *
       3DVP-VALIDATE-DAY-ROUTINE.
           DIVIDE CENTURY-FOR-COMPUTATION
             BY       DIVISOR-FOR-LEAP-YEAR
             GIVING       LEAP-YEAR-QUOTIENT
             REMAINDER       LEAP-YEAR-REMAINDER.
           IF  YYMMDD-YEAR EQUAL 00
               MOVE 01 TO LEAP-YEAR-REMAINDER
               IN LEAP-YEAR-WORK.
           MOVE MONTH-WORKAREA TO
                      MAXIMUM-DAY-FLAG.
           IF  THIRTY-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-30-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  THIRTY-ONE-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-31-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  FEBRUARY
                   IN DATE-VALIDATION-WORKAREA
               IF  LEAP-YEAR
                     AND   DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-29-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
               IF NOT LEAP-YEAR
                    AND    DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-28-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
                   MOVE 1 TO DAY-FLAG
           ELSE
               MOVE 1 TO DAY-FLAG.
           IF  DAY-WORKAREA
                   IS LESS THAN 1
               MOVE ZERO TO DAY-FLAG.


Clone Instance
7
Line Count
146
Source Line
3784
Source File
CCCC9.COB

      *
      *
       2331-VALIDATE-DATE.
      ****************************************************************
      *                                                              *
      *      D A T E  V A L I D A T I O N  P R O C E D U R E         *
      *                                                              *
      *      INSTRUCTIONS:                                           *
      *      1.  MOVE THE DATE TO BE VALIDATED TO THE FOLLOWING      *
      *          FIELDS FOR THE GIVEN FORMATS:                       *
      *          A.  YYMMDD FORMAT -- MOVE TO: YYMMDD-DATE-WORKAREA  *
      *          B.  MMDD FORMAT   -- MOVE TO: MMDD-DATE-WORK-FIELDS *
      *              (NOTE BELOW FOR DETERMINING LEAP YEAR FOR MMDD  *
      *              DATE FORMAT.)                                   *
      *          C.  YYMM FORMAT   -- MOVE TO: YYMM-DATE-WORKAREA    *
      *      2.  WHEN PERFORMING THE PROCEDURE THAT USES THIS WORK   *
      *          AREA, FILL IN THE APPROPRIATE DATE-FORMAT-FLAG      *
      *          VALUES: 1, 2 OR 3.  SEE 03 LEVEL DATE-FORMAT-FLAG.  *
      *      3.  IF USING THE MMDD-DATE-FORMAT (VALUE 2), THE YEAR   *
      *          YOU WISH TO USE TO DETERMINE IF IT IS A LEAP YEAR   *
      *          MUST BE FILLED IN.  MOVE THIS VALUE INTO THE        *
      *          MMDD-YEAR DATA ITEM.  DO THIS PRIOR TO PERFORMING   *
      *          THIS PROCEDURE.                                     *
      *                                                              *
      ****************************************************************
           MOVE ZERO TO DATE-FLAGS.
           IF  YYMMDD-DATE-FORMAT
               IF YYMMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  MMDD-DATE-FORMAT
               IF MMDD-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
           IF  YYMM-DATE-FORMAT
               IF YYMM-DATE-WORKAREA
                      IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO
                              DATE-VALIDATION-FLAG
               ELSE
                   NEXT SENTENCE
           ELSE
               MOVE DATE-MISSING-FLAG TO
                          DATE-VALIDATION-FLAG.
           IF  DATE-NOT-NUMERIC
                 OR   DATE-MISSING
               NEXT SENTENCE
           ELSE
               PERFORM 1DVP-VALIDATE-DAY-MONTH-RTN.
      *
      *
       1DVP-VALIDATE-DAY-MONTH-RTN.
           IF  YYMMDD-DATE-FORMAT
               MOVE YYMMDD-YEAR
                       IN YYMMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE YYMMDD-MONTH
                       IN YYMMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE YYMMDD-DAY
                       IN YYMMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  MMDD-DATE-FORMAT
               MOVE MMDD-YEAR
                       IN MMDD-DATE-WORKAREA TO
                          YEAR
                       IN CENTURY-WORKAREA
               MOVE MMDD-MONTH
                       IN MMDD-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA
               MOVE MMDD-DAY
                       IN MMDD-DATE-WORKAREA TO
                          DAY-WORKAREA
                       IN MONTH-DAY-WORKAREA
           ELSE
           IF  YYMM-DATE-FORMAT
               MOVE 1 TO DAY-FLAG
               MOVE YYMM-MONTH
                       IN YYMM-DATE-WORKAREA TO
                          MONTH-WORKAREA
                       IN MONTH-DAY-WORKAREA.
           PERFORM 2DVP-VALIDATE-MONTH-ROUTINE.
           IF  VALID-MONTH
                 AND   NOT YYMM-DATE-FORMAT
               PERFORM 3DVP-VALIDATE-DAY-ROUTINE.
           IF  VALID-DAY
                 AND   VALID-MONTH
               MOVE 1 TO DATE-VALIDATION-FLAG.
      *
      *
       2DVP-VALIDATE-MONTH-ROUTINE.
           IF  NOT VALID-MONTH-VALUE
               MOVE ZERO TO MONTH-FLAG
           ELSE
               MOVE 1 TO MONTH-FLAG.
      *
      *
       3DVP-VALIDATE-DAY-ROUTINE.
           DIVIDE CENTURY-FOR-COMPUTATION
             BY       DIVISOR-FOR-LEAP-YEAR
             GIVING       LEAP-YEAR-QUOTIENT
             REMAINDER       LEAP-YEAR-REMAINDER.
           IF  YYMMDD-YEAR EQUAL 00
               MOVE 01 TO LEAP-YEAR-REMAINDER
               IN LEAP-YEAR-WORK.
           MOVE MONTH-WORKAREA TO
                      MAXIMUM-DAY-FLAG.
           IF  THIRTY-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-30-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  THIRTY-ONE-DAY-MONTH
                 AND   DAY-WORKAREA
                   IS GREATER THAN MONTH-OF-31-DAYS
               MOVE ZERO TO DAY-FLAG
           ELSE
           IF  FEBRUARY
                   IN DATE-VALIDATION-WORKAREA
               IF  LEAP-YEAR
                     AND   DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-29-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
               IF NOT LEAP-YEAR
                    AND    DAY-WORKAREA
                       IS GREATER THAN MONTH-OF-28-DAYS
                   MOVE ZERO TO DAY-FLAG
               ELSE
                   MOVE 1 TO DAY-FLAG
           ELSE
               MOVE 1 TO DAY-FLAG.
           IF  DAY-WORKAREA
                   IS LESS THAN 1
               MOVE ZERO TO DAY-FLAG.


Clone AbstractionParameter Count: 1Parameter Bindings

        [[#22a8f520]].
      ****************************************************************
      *                                                              *
      *      D A T E  V A L I D A T I O N  P R O C E D U R E         *
      *                                                              *
      *      INSTRUCTIONS:                                           *
      *      1.  MOVE THE DATE TO BE VALIDATED TO THE FOLLOWING      *
      *          FIELDS FOR THE GIVEN FORMATS:                       *
      *          A.  YYMMDD FORMAT -- MOVE TO: YYMMDD-DATE-WORKAREA  *
      *          B.  MMDD FORMAT   -- MOVE TO: MMDD-DATE-WORK-FIELDS *
      *              (NOTE BELOW FOR DETERMINING LEAP YEAR FOR MMDD  *
      *              DATE FORMAT.)                                   *
      *          C.  YYMM FORMAT   -- MOVE TO: YYMM-DATE-WORKAREA    *
      *      2.  WHEN PERFORMING THE PROCEDURE THAT USES THIS WORK   *
      *          AREA, FILL IN THE APPROPRIATE DATE-FORMAT-FLAG      *
      *          VALUES: 1, 2 OR 3.  SEE 03 LEVEL DATE-FORMAT-FLAG.  *
      *      3.  IF USING THE MMDD-DATE-FORMAT (VALUE 2), THE YEAR   *
      *          YOU WISH TO USE TO DETERMINE IF IT IS A LEAP YEAR   *
      *          MUST BE FILLED IN.  MOVE THIS VALUE INTO THE        *
      *          MMDD-YEAR DATA ITEM.  DO THIS PRIOR TO PERFORMING   *
      *          THIS PROCEDURE.                                     *
      *                                                              *
      ****************************************************************
           MOVE ZERO TO DATE-FLAGS.
           IF YYMMDD-DATE-FORMAT
             IF YYMMDD-DATE-WORKAREA IS NOT NUMERIC
               MOVE DATE-NOT-NUMERIC-FLAG TO DATE-VALIDATION-FLAG
             ELSE
               NEXT SENTENCE
           ELSE
             IF MMDD-DATE-FORMAT
               IF MMDD-DATE-WORKAREA IS NOT NUMERIC
                 MOVE DATE-NOT-NUMERIC-FLAG TO DATE-VALIDATION-FLAG
               ELSE
                 NEXT SENTENCE
             ELSE
               IF YYMM-DATE-FORMAT
                 IF YYMM-DATE-WORKAREA IS NOT NUMERIC
                   MOVE DATE-NOT-NUMERIC-FLAG TO DATE-VALIDATION-FLAG
                 ELSE
                   NEXT SENTENCE
               ELSE
                 MOVE DATE-MISSING-FLAG TO DATE-VALIDATION-FLAG.
           IF DATE-NOT-NUMERIC
                OR DATE-MISSING
             NEXT SENTENCE
           ELSE
             PERFORM 1DVP-VALIDATE-DAY-MONTH-RTN.
      *
      *
       1DVP-VALIDATE-DAY-MONTH-RTN.
           IF YYMMDD-DATE-FORMAT
             MOVE YYMMDD-YEAR
                    IN YYMMDD-DATE-WORKAREA TO YEAR
                                                 IN CENTURY-WORKAREA
             MOVE YYMMDD-MONTH
                    IN YYMMDD-DATE-WORKAREA TO MONTH-WORKAREA
                                                 IN MONTH-DAY-WORKAREA
             MOVE YYMMDD-DAY
                    IN YYMMDD-DATE-WORKAREA TO DAY-WORKAREA
                                                 IN MONTH-DAY-WORKAREA
           ELSE
             IF MMDD-DATE-FORMAT
               MOVE MMDD-YEAR
                      IN MMDD-DATE-WORKAREA TO YEAR
                                                 IN CENTURY-WORKAREA
               MOVE MMDD-MONTH
                      IN MMDD-DATE-WORKAREA TO MONTH-WORKAREA
                                                 IN MONTH-DAY-WORKAREA
               MOVE MMDD-DAY
                      IN MMDD-DATE-WORKAREA TO DAY-WORKAREA
                                                 IN MONTH-DAY-WORKAREA
             ELSE
               IF YYMM-DATE-FORMAT
                 MOVE 1 TO DAY-FLAG
                 MOVE YYMM-MONTH
                        IN YYMM-DATE-WORKAREA TO MONTH-WORKAREA
                                                   IN MONTH-DAY-WORKAREA
           .
           PERFORM 2DVP-VALIDATE-MONTH-ROUTINE.
           IF VALID-MONTH
                AND NOT YYMM-DATE-FORMAT
             PERFORM 3DVP-VALIDATE-DAY-ROUTINE.
           IF VALID-DAY
                AND VALID-MONTH
             MOVE 1 TO DATE-VALIDATION-FLAG.
      *
      *
       2DVP-VALIDATE-MONTH-ROUTINE.
           IF NOT VALID-MONTH-VALUE
             MOVE ZERO TO MONTH-FLAG
           ELSE
             MOVE 1 TO MONTH-FLAG.
      *
      *
       3DVP-VALIDATE-DAY-ROUTINE.
           DIVIDE CENTURY-FOR-COMPUTATION
             BY DIVISOR-FOR-LEAP-YEAR
             GIVING LEAP-YEAR-QUOTIENT
             REMAINDER LEAP-YEAR-REMAINDER.
           IF YYMMDD-YEAR EQUAL 00
             MOVE 01 TO LEAP-YEAR-REMAINDER
                          IN LEAP-YEAR-WORK.
           MOVE MONTH-WORKAREA TO MAXIMUM-DAY-FLAG.
           IF THIRTY-DAY-MONTH
                AND DAY-WORKAREA IS GREATER THAN MONTH-OF-30-DAYS
             MOVE ZERO TO DAY-FLAG
           ELSE
             IF THIRTY-ONE-DAY-MONTH
                  AND DAY-WORKAREA IS GREATER THAN MONTH-OF-31-DAYS
               MOVE ZERO TO DAY-FLAG
             ELSE
               IF FEBRUARY
                    IN DATE-VALIDATION-WORKAREA
                 IF LEAP-YEAR
                      AND DAY-WORKAREA IS GREATER THAN MONTH-OF-29-DAYS
                   MOVE ZERO TO DAY-FLAG
                 ELSE
                   IF NOT LEAP-YEAR
                        AND DAY-WORKAREA IS GREATER THAN
                            MONTH-OF-28-DAYS
                     MOVE ZERO TO DAY-FLAG
                   ELSE
                     MOVE 1 TO DAY-FLAG
               ELSE
                 MOVE 1 TO DAY-FLAG.
           IF DAY-WORKAREA IS LESS THAN 1
             MOVE ZERO TO DAY-FLAG.
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#22a8f520]]
      *
      *
       2500-DATE-VALIDATION-ROUTINE 
12[[#22a8f520]]
      *
      *
       2361-VALIDATE-DATE 
13[[#22a8f520]]
      *
      *
       2800-DATE-VALIDATION-ROUTINE 
14[[#22a8f520]]
      *
      *
       2331-VALIDATE-DATE 
15[[#22a8f520]]
      *
      *
       2431-VALIDATE-DATE 
16[[#22a8f520]]
      *
      *
       2311-VALIDATE-DATE 
17[[#22a8f520]]
      *
      *
       8200-VALIDATE-DATE