Pedr026

PROG005

Jun 19th, 2018
600
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.        IDENTIFICATION DIVISION.
  2.        PROGRAM-ID. PROG005.
  3.        AUTHOR.    PEDRO.
  4.       *
  5.        ENVIRONMENT DIVISION.
  6.        CONFIGURATION SECTION.
  7.        SPECIAL-NAMES.
  8.            DECIMAL-POINT IS COMMA.
  9.        INPUT-OUTPUT SECTION.
  10.        FILE-CONTROL.
  11.            SELECT ALTCLI ASSIGN TO DISK.
  12.       *
  13.        DATA DIVISION.
  14.        FILE SECTION.
  15.        FD ALTCLI
  16.           LABEL RECORD IS STANDARD
  17.           RECORD CONTAINS 76 CHARACTERS
  18.           DATA RECORD IS WS-REGISTRO-ALTCLI
  19.           VALUE OF FILE-ID "C:\IDECobol\altcli.txt".
  20.        01 WS-REGISTRO-ALTCLI.
  21.         05 WS-ALTCLI-AGENCIA PIC 9(05).
  22.         05 WS-ALTCLI-NUMERO-CONTA PIC 9(10).
  23.         05 WS-ALTCLI-NOME-CLIENTE PIC X(40).
  24.         05 WS-ALTCLI-TELEFONE PIC 9(08).
  25.         05 WS-ALTCLI-RENDA-MENSAL PIC S9(11)V99.
  26.        WORKING-STORAGE SECTION.
  27.        77 CONTINUA PIC X(01).
  28.        SCREEN SECTION.
  29.        01 TELA.
  30.         05 BLANK SCREEN.
  31.         05 LINE 01 COLUMN 29 VALUE "Unimonte - Santos".
  32.         05 LINE 02 COLUMN 27 VALUE "Movimento de clientes".
  33.         05 LINE 06 COLUMN 18 VALUE "Codigo da agencia..:".
  34.         05 LINE 08 COLUMN 18 VALUE "Numero da conta....:".
  35.         05 LINE 10 COLUMN 18 VALUE "Nome do cliente....:".
  36.         05 LINE 12 COLUMN 18 VALUE "Telefone...........:".
  37.         05 LINE 14 COLUMN 18 VALUE "Renda Mensal.......:".
  38.         05 LINE 17 COLUMN 18 VALUE "Continua...........:".
  39.         05 LINE 17 COLUMN 43 VALUE "S/N".
  40.         05 LINE 21 COLUMN 18 VALUE "Mensagem...........:".
  41.       *
  42.        PROCEDURE DIVISION.
  43.        010-INICIO.
  44.            OPEN EXTEND ALTCLI.
  45.        020-RECEBER.
  46.            DISPLAY TELA.
  47.            ACCEPT (06, 39) WS-ALTCLI-AGENCIA WITH PROMPT.
  48.            ACCEPT (08, 39) WS-ALTCLI-NUMERO-CONTA WITH PROMPT.
  49.            ACCEPT (10, 39) WS-ALTCLI-NOME-CLIENTE WITH PROMPT.
  50.            ACCEPT (12, 39) WS-ALTCLI-TELEFONE WITH PROMPT.
  51.            ACCEPT (14, 39) WS-ALTCLI-RENDA-MENSAL WITH PROMPT.
  52.            IF WS-ALTCLI-AGENCIA = ZEROS
  53.               DISPLAY (21, 39) "ERRO!!!"
  54.               GO TO 040-CONTINUA.
  55.            IF WS-ALTCLI-NUMERO-CONTA = ZEROS
  56.               DISPLAY (21, 39) "ERRO!!!"
  57.               GO TO 040-CONTINUA.
  58.            IF WS-ALTCLI-NOME-CLIENTE = SPACES
  59.               DISPLAY (21, 39) "ERRO!!!"
  60.               GO TO 040-CONTINUA.
  61.            IF WS-ALTCLI-TELEFONE = ZEROS
  62.               DISPLAY (21, 39) "ERRO!!!"
  63.               GO TO 040-CONTINUA.
  64.            IF WS-ALTCLI-RENDA-MENSAL = ZEROS
  65.               DISPLAY (21, 39) "ERRO!!!"
  66.               GO TO 040-CONTINUA.
  67.        030-GRAVA.
  68.            WRITE WS-REGISTRO-ALTCLI.
  69.        040-CONTINUA.
  70.            ACCEPT (17, 39) CONTINUA.
  71.            IF CONTINUA = 'S' OR 's'
  72.               GO TO 020-RECEBER.
  73.        090-FIM.
  74.            CLOSE ALTCLI.
  75.        STOPRUN.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×