forked from alura-cursos/cursoopencobol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variavel-nivel-88.cbl
38 lines (32 loc) · 1.04 KB
/
variavel-nivel-88.cbl
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
IDENTIFICATION DIVISION.
PROGRAM-ID. PRGCOB05.
******************************************************
*** AREA DE COMENTARIOS - REMARKS
*** OBJETIVO DO PROGRAMA = OPERACOES ARITMETICAS
*** AUTOR: IVAN
*** DATA : XX/XX/20XX
******************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
DECIMAL-POINT IS COMMA.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 WRK-USUARIO PIC X(20) VALUE SPACES.
77 WRK-NIVEL PIC 9(02) VALUE ZEROS.
88 ADM VALUE 01.
88 USER VALUE 02.
PROCEDURE DIVISION.
DISPLAY 'USUARIO ..... : '
ACCEPT WRK-USUARIO
DISPLAY 'NIVEL..... : '
ACCEPT WRK-NIVEL
IF ADM
DISPLAY 'NIVEL - ADMINISTRADOR '
ELSE
IF USER
DISPLAY 'NIVEL - USUARIO'
END-IF
END-IF
STOP RUN
.