Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IDENTIFICATION DIVISION.
- PROGRAM-ID. PROG005.
- AUTHOR. PEDRO.
- *
- ENVIRONMENT DIVISION.
- CONFIGURATION SECTION.
- SPECIAL-NAMES.
- DECIMAL-POINT IS COMMA.
- INPUT-OUTPUT SECTION.
- FILE-CONTROL.
- SELECT ALTCLI ASSIGN TO DISK.
- *
- DATA DIVISION.
- FILE SECTION.
- FD ALTCLI
- LABEL RECORD IS STANDARD
- RECORD CONTAINS 76 CHARACTERS
- DATA RECORD IS WS-REGISTRO-ALTCLI
- VALUE OF FILE-ID "C:\IDECobol\altcli.txt".
- 01 WS-REGISTRO-ALTCLI.
- 05 WS-ALTCLI-AGENCIA PIC 9(05).
- 05 WS-ALTCLI-NUMERO-CONTA PIC 9(10).
- 05 WS-ALTCLI-NOME-CLIENTE PIC X(40).
- 05 WS-ALTCLI-TELEFONE PIC 9(08).
- 05 WS-ALTCLI-RENDA-MENSAL PIC S9(11)V99.
- WORKING-STORAGE SECTION.
- 77 CONTINUA PIC X(01).
- SCREEN SECTION.
- 01 TELA.
- 05 BLANK SCREEN.
- 05 LINE 01 COLUMN 29 VALUE "Unimonte - Santos".
- 05 LINE 02 COLUMN 27 VALUE "Movimento de clientes".
- 05 LINE 06 COLUMN 18 VALUE "Codigo da agencia..:".
- 05 LINE 08 COLUMN 18 VALUE "Numero da conta....:".
- 05 LINE 10 COLUMN 18 VALUE "Nome do cliente....:".
- 05 LINE 12 COLUMN 18 VALUE "Telefone...........:".
- 05 LINE 14 COLUMN 18 VALUE "Renda Mensal.......:".
- 05 LINE 17 COLUMN 18 VALUE "Continua...........:".
- 05 LINE 17 COLUMN 43 VALUE "S/N".
- 05 LINE 21 COLUMN 18 VALUE "Mensagem...........:".
- *
- PROCEDURE DIVISION.
- 010-INICIO.
- OPEN EXTEND ALTCLI.
- 020-RECEBER.
- DISPLAY TELA.
- ACCEPT (06, 39) WS-ALTCLI-AGENCIA WITH PROMPT.
- ACCEPT (08, 39) WS-ALTCLI-NUMERO-CONTA WITH PROMPT.
- ACCEPT (10, 39) WS-ALTCLI-NOME-CLIENTE WITH PROMPT.
- ACCEPT (12, 39) WS-ALTCLI-TELEFONE WITH PROMPT.
- ACCEPT (14, 39) WS-ALTCLI-RENDA-MENSAL WITH PROMPT.
- IF WS-ALTCLI-AGENCIA = ZEROS
- DISPLAY (21, 39) "ERRO!!!"
- GO TO 040-CONTINUA.
- IF WS-ALTCLI-NUMERO-CONTA = ZEROS
- DISPLAY (21, 39) "ERRO!!!"
- GO TO 040-CONTINUA.
- IF WS-ALTCLI-NOME-CLIENTE = SPACES
- DISPLAY (21, 39) "ERRO!!!"
- GO TO 040-CONTINUA.
- IF WS-ALTCLI-TELEFONE = ZEROS
- DISPLAY (21, 39) "ERRO!!!"
- GO TO 040-CONTINUA.
- IF WS-ALTCLI-RENDA-MENSAL = ZEROS
- DISPLAY (21, 39) "ERRO!!!"
- GO TO 040-CONTINUA.
- 030-GRAVA.
- WRITE WS-REGISTRO-ALTCLI.
- 040-CONTINUA.
- ACCEPT (17, 39) CONTINUA.
- IF CONTINUA = 'S' OR 's'
- GO TO 020-RECEBER.
- 090-FIM.
- CLOSE ALTCLI.
- STOPRUN.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement