-
Notifications
You must be signed in to change notification settings - Fork 10
/
Comando COPY
40 lines (37 loc) · 1.39 KB
/
Comando COPY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
IDENTIFICATION DIVISION.
PROGRAM-ID. PRGCOB18.
******************************************************
*** AREA DE COMENTARIOS - REMARKS
*** OBJETIVO DO PROGRAMA = PERFORM COM REPETICOES CONTROLADAS
*** POR SAIDA FORCADA (UNTIL)
*** USANDO BOOK
*** AUTOR: IVAN
*** DATA : XX/XX/20XX
******************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
DECIMAL-POINT IS COMMA.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY 'BOOK.COB'.
PROCEDURE DIVISION.
0001-PRINCIPAL.
PERFORM 0100-INICIALIZAR.
IF WRK-VENDAS GREATER 0
PERFORM 0200-PROCESSAR UNTIL WRK-VENDAS = 0
END-IF.
PERFORM 0300-FINALIZAR.
STOP RUN.
0100-INICIALIZAR.
DISPLAY 'DIGITE O NUMERO..... : '.
ACCEPT WRK-VENDAS.
0200-PROCESSAR.
ADD 1 TO WRK-QT.
ADD WRK-VENDAS TO WRK-ACUM.
PERFORM 0100-INICIALIZAR.
0300-FINALIZAR.
DISPLAY '---------------------'.
DISPLAY 'TOTAL DAS VENDAS ' WRK-ACUM.
DISPLAY 'QUANTIDADE DE VENDAS ' WRK-QT.
DISPLAY ' FIM DE PROCESSAMENTO '.