Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
146 | 7 | 1 | 0.998 | paragraph_list[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 146 | 3500 | CCCC12.COB |
2 | 146 | 4088 | CCCC14.COB |
3 | 146 | 5953 | CCCC15.COB |
4 | 146 | 2932 | CCCC3.COB |
5 | 146 | 3657 | CCCC6.COB |
6 | 146 | 4911 | CCCC7.COB |
7 | 146 | 3784 | CCCC9.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. |
| ||||
* * 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. |
| ||||
* * 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. |
| ||||
* * 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. |
| ||||
* * 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. |
| ||||
* * 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. |
| ||||
* * 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. |
| |||
[[#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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#22a8f520]] | * * 2500-DATE-VALIDATION-ROUTINE |
1 | 2 | [[#22a8f520]] | * * 2361-VALIDATE-DATE |
1 | 3 | [[#22a8f520]] | * * 2800-DATE-VALIDATION-ROUTINE |
1 | 4 | [[#22a8f520]] | * * 2331-VALIDATE-DATE |
1 | 5 | [[#22a8f520]] | * * 2431-VALIDATE-DATE |
1 | 6 | [[#22a8f520]] | * * 2311-VALIDATE-DATE |
1 | 7 | [[#22a8f520]] | * * 8200-VALIDATE-DATE |