' STOP RUN END-IF. 330099-SAIDA. EXIT. *----------------------------------------------------------------------* 400000-FECHAR-ARQUIVOS SECTION. *----------------------------------------------------------------------* CLOSE ARQALUNO RELALUNO. 400099-SAIDA. EXIT. *----------------------------------------------------------------------* 981000-GRAVAR-CABECALHO-ALUNO SECTION. *----------------------------------------------------------------------* MOVE K0003-NM-ALUNO TO K0004-NM-ALUNO. MOVE K0003-NR-MATRICULA(1:4) TO K0004-MAT-ANO. MOVE K0003-NR-MATRICULA(5:3) TO K0004-MAT-COD. WRITE FD-RELALUNO-REG FROM K0004-CABEC-01. WRITE FD-RELALUNO-REG FROM K0004-CABEC-02. WRITE FD-RELALUNO-REG FROM K0004-CABEC-03. WRITE FD-RELALUNO-REG FROM K0004-CABEC-04. WRITE FD-RELALUNO-REG FROM K0004-CABEC-05. WRITE FD-RELALUNO-REG FROM K0004-CABEC-06. WRITE FD-RELALUNO-REG FROM K0004-CABEC-04. WRITE FD-RELALUNO-REG FROM K0004-CABEC-07. WRITE FD-RELALUNO-REG FROM K0004-CABEC-04. ADD 1 TO WS-CNT-CAB-GRAVADOS. 981099-SAIDA. EXIT. *----------------------------------------------------------------------* 982000-GRAVAR-DETALHE-ALUNO SECTION. *----------------------------------------------------------------------* MOVE K0003-NM-MATERIA TO K0004-NM-MATERIA. MOVE K0003-VL-NOTA1 TO K0004-VL-NOTA1. MOVE K0003-VL-NOTA2 TO K0004-VL-NOTA2. MOVE K0003-VL-NOTA3 TO K0004-VL-NOTA3. MOVE K0003-VL-NOTA4 TO K0004-VL-NOTA4. MOVE WS-MEDIA TO K0004-VL-MEDIA. WRITE FD-RELALUNO-REG FROM K0004-DETALHE. ADD 1 TO WS-CNT-DET-GRAVADOS. 982099-SAIDA. EXIT. *----------------------------------------------------------------------* 983000-GRAVAR-RODAPE-ALUNO SECTION. *----------------------------------------------------------------------* IF K0004-QT-MAT-REP GREATER ZEROS MOVE 'REPROVADO' TO K0004-SITUACAO-FINAL ELSE MOVE 'APROVADO' TO K0004-SITUACAO-FINAL END-IF. WRITE FD-RELALUNO-REG FROM K0004-CABEC-04. WRITE FD-RELALUNO-REG FROM K0004-RODAPE-01. WRITE FD-RELALUNO-REG FROM K0004-RODAPE-02. WRITE FD-RELALUNO-REG FROM K0004-RODAPE-03. MOVE SPACES TO FD-RELALUNO-REG. WRITE FD-RELALUNO-REG. ADD 1 TO WS-CNT-ROD-GRAVADOS. 983099-SAIDA. EXIT.Abaixo Seguem os Layouts dos arquivos de ENTRADA e SAIDA: ***************************************************************** * BOOK....: CFPK0003 * * OBJETIVO: LAYOUT DO ARQUIVO DE ALUNOS. * * TAMANHO.: 064 BYTES. * ***************************************************************** 01 K0003-ARQUIVO. 03 K0003-TP-REGISTRO PIC 9(001). 03 K0003-REGISTRO PIC X(063). 03 K0003-HDR REDEFINES K0003-REGISTRO. 05 K0003-DATA-PROC PIC 9(008). 05 K0003-HORA-PROC PIC 9(006). 05 K0003-SIGLA-SIS PIC X(003). 05 FILLER PIC X(044). 03 K0003-DET REDEFINES K0003-REGISTRO. 05 K0003-NR-MATRICULA PIC 9(007). 05 K0003-NM-ALUNO PIC X(030). 05 K0003-NM-MATERIA PIC X(010). 05 K0003-VL-NOTA1 PIC 9(002)V99. 05 K0003-VL-NOTA2 PIC 9(002)V99. 05 K0003-VL-NOTA3 PIC 9(002)V99. 05 K0003-VL-NOTA4 PIC 9(002)V99. 03 K0003-TRL REDEFINES K0003-REGISTRO. 05 K0003-QTD-REGISTROS PIC 9(006). 05 FILLER PIC X(057). ***************************************************************** ***************************************************************** * BOOK....: CFPK0004. * * OBJETIVO: LAYOUT DO BOLETIM DE NOTAS. * * TAMANHO.: 80 BYTES. * ***************************************************************** 01 K0004-CABEC-01. 03 K0004-DATA-ATUAL. 05 K0004-DIA-ATUAL PIC 9(002) VALUE ZEROS. 05 FILLER PIC X(001) VALUE '/'. 05 K0004-MES-ATUAL PIC 9(002) VALUE ZEROS. 05 FILLER PIC X(003) VALUE '/20'. 05 K0004-ANO-ATUAL PIC 9(002) VALUE ZEROS. 03 FILLER PIC X(022) VALUE SPACES. 03 FILLER PIC X(007) VALUE 'WEBDOO '. 03 FILLER PIC X(011) VALUE 'INFORMATICA'. 03 FILLER PIC X(022) VALUE SPACES. 03 K0004-HORA-ATUAL. 05 K0004-HOR-ATUAL PIC 9(002) VALUE ZEROS. 05 FILLER PIC X(001) VALUE ':'. 05 K0004-MIN-ATUAL PIC 9(002) VALUE ZEROS. 05 FILLER PIC X(001) VALUE ':'. 05 K0004-SEG-ATUAL PIC 9(002) VALUE ZEROS. ***************************************************************** 01 K0004-CABEC-02. 03 FILLER PIC X(005) VALUE 'SICFP'. 03 FILLER PIC X(022) VALUE SPACES. 03 FILLER PIC X(009) VALUE 'CURSO DE '. 03 FILLER PIC X(009) VALUE 'FORMACAO '. 03 FILLER PIC X(012) VALUE 'PROFISSIONAL'. 03 FILLER PIC X(015) VALUE SPACES. 03 K0004-NM-PROGRAMA PIC X(008) VALUE SPACES. ***************************************************************** 01 K0004-CABEC-03. 03 FILLER PIC X(035) VALUE SPACES. 03 FILLER PIC X(008) VALUE 'BOLETIM '. 03 FILLER PIC X(005) VALUE 'ANUAL'. 03 FILLER PIC X(032) VALUE SPACES. ***************************************************************** 01 K0004-CABEC-04. 03 FILLER PIC X(080) VALUE ALL '-'. ***************************************************************** 01 K0004-CABEC-05. 03 FILLER PIC X(005) VALUE 'NOME '. 03 FILLER PIC X(008) VALUE 'DO ALUNO'. 03 FILLER PIC X(007) VALUE ' : '. 03 K0004-NM-ALUNO PIC X(030) VALUE SPACES. 03 FILLER PIC X(030) VALUE SPACES. ***************************************************************** 01 K0004-CABEC-06. 03 FILLER PIC X(010) VALUE 'MATRICULA '. 03 FILLER PIC X(009) VALUE 'DO ALUNO:'. 03 FILLER