Rahardyan

File Index COBOL_Rahardyan

Jan 13th, 2017
576
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.        IDENTIFICATION DIVISION.
  2.        PROGRAM-ID. INDEKS.
  3.        AUTHOR. Rahardyan.
  4.        ENVIRONMENT DIVISION.
  5.        INPUT-OUTPUT SECTION.
  6.        FILE-CONTROL.
  7.            SELECT BARANG ASSIGN TO DISK.
  8.            ORGANIZATION IS INDEXED.
  9.            ACCESS MODE IS SEQUENTIAL.
  10.            RECORD KEY IS KODE-BARANG.
  11.            FILE STATUS IS STATUS-SALAH.
  12.        DATA DIVISION.
  13.        FILE SECTION.
  14.        FD BARANG.
  15.            LABEL RECORD IS STANDARD.
  16.            VALUE OF FILE-ID IS 'BARANG2.DAT'.
  17.            DATA RECORD IS RECBARANG.
  18.        01 RECBARANG.
  19.            02 NAMA-BARANG PIC A(25).
  20.            02 KODE-BARANG PIC 9(3).
  21.            02 ALAMAT-BARANG PIC X(25).
  22.        WORKING-STORAGE SECTION.
  23.        77 STATUS-SALAH PIC 99.
  24.        01 SUDAH-BENAR PIC X.
  25.            88 BENAR VALUE 'Y', 'y'.
  26.            88 BELUM VALUE 'T', 't'.
  27.        01 TAMBAH-DATA PIC X.
  28.            88 YA VALUE 'Y', 'y'.
  29.            88 TIDAK VALUE 'T', 't'.
  30.        01 RECBARANG-MASUK.
  31.            02 NAMA-BARANG-MASUK PIC X(25).
  32.            02 KODE-BARANG-MASUK PIC 9(3).
  33.            02 ALAMAT-BARANG-MASUK PIC X(25).
  34.        SCREEN SECTION.
  35.        01 HAPUS-LAYAR.
  36.            02 BLANK SCREEN.
  37.        01 INPUT-DATA.
  38.            02 LINE 4 COLUMN 8 VALUE 'NAMA BARANG   : '.
  39.            02 COLUMN PLUS 2 PIC A(25) TO NAMA-BARANG-MASUK.
  40.            02 LINE 6 COLUMN 8 VALUE 'KODE BARANG   : '.
  41.            02 COLUMN PLUS 2 PIC 9(3) TO KODE-BARANG-MASUK REQUIRED.
  42.            02 LINE 8 COLUMN 8 VALUE 'ALAMAT TUJUAN : '.
  43.            02 COLUMN PLUS 2 PIC X(25) TO ALAMAT-BARANG-MASUK.
  44.        PROCEDURE DIVISION.
  45.        BUKA-FILE.
  46.            OPEN OUTPUT BARANG.
  47.        MULAI.
  48.            MOVE SPACE TO SUDAH-BENAR.
  49.            PERFORM MASUKAN-DATA UNTIL BENAR.
  50.            PERFORM REKAM-DATA.
  51.            PERFORM ADA-LAGI.
  52.        SELESAI.
  53.            CLOSE BARANG.
  54.            STOP RUN.
  55.        MASUKAN-DATA.
  56.            DISPLAY HAPUS-LAYAR.
  57.            DISPLAY (2, 16) '-----PENGIRIMAN BARANG-----'.
  58.            DISPLAY INPUT-DATA.
  59.            ACCEPT INPUT-DATA.
  60.            DISPLAY (13, 8) 'DATA SUDAH BENAR [Y/T] ?'.
  61.            ACCEPT SUDAH-BENAR.
  62.        REKAM-DATA.
  63.            WRITE BARANG.
  64.        ADA-LAGI.
  65.            DISPLAY (15, 8) 'TAMBAH DATA LAGI [Y/T] ?'.
  66.            ACCEPT TAMBAH-DATA.
  67.            IF YA GO TO MULAI.
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.

×