COBOL VALIDAR DATA
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*----------------------------------------------------------------- IDENTIFICATION DIVISION. *----------------------------------------------------------------- PROGRAM-ID. CADVALDA. AUTHOR. CARLOS ALBERTO DORNELLES. * BRASILIA, 17 DE MAIO DE 2006 * VERIFICAR SE A DATA EH VALIDA SEM USAR O BANCO DE DADOS * Anos entre 1901 e 2099 *----------------------------------------------------------------- DATA DIVISION. *----------------------------------------------------------------- WORKING-STORAGE SECTION. *----------------------------------------------------------------- 01 WS-AUXILIARES. 05 WS-CALCULO-BISEXTO. 10 WS-QUOCIENTE PIC 9(004). 10 WS-RESTO PIC 9(004). 88 RESTO-ZERO VALUE 0000. 88 RESTO-DIFE VALUE 0001 THRU 9999. 05 WS-DATA PIC X(010). 05 WS-DATA-R REDEFINES WS-DATA. 10 WS-DIA PIC 9(002). 88 WS-DIA-29 VALUE 01 THRU 29. 88 WS-DIA-28 VALUE 01 THRU 28. 88 WS-DIA-30 VALUE 01 THRU 30. 88 WS-DIA-31 VALUE 01 THRU 31. 10 PONTO-001 PIC X(001). 10 WS-MES PIC 9(002). 88