Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IDENTIFICATION DIVISION.
- PROGRAM-ID. INDEKS.
- AUTHOR. Rahardyan.
- ENVIRONMENT DIVISION.
- INPUT-OUTPUT SECTION.
- FILE-CONTROL.
- SELECT BARANG ASSIGN TO DISK.
- ORGANIZATION IS INDEXED.
- ACCESS MODE IS SEQUENTIAL.
- RECORD KEY IS KODE-BARANG.
- FILE STATUS IS STATUS-SALAH.
- DATA DIVISION.
- FILE SECTION.
- FD BARANG.
- LABEL RECORD IS STANDARD.
- VALUE OF FILE-ID IS 'BARANG2.DAT'.
- DATA RECORD IS RECBARANG.
- 01 RECBARANG.
- 02 NAMA-BARANG PIC A(25).
- 02 KODE-BARANG PIC 9(3).
- 02 ALAMAT-BARANG PIC X(25).
- WORKING-STORAGE SECTION.
- 77 STATUS-SALAH PIC 99.
- 01 SUDAH-BENAR PIC X.
- 88 BENAR VALUE 'Y', 'y'.
- 88 BELUM VALUE 'T', 't'.
- 01 TAMBAH-DATA PIC X.
- 88 YA VALUE 'Y', 'y'.
- 88 TIDAK VALUE 'T', 't'.
- 01 RECBARANG-MASUK.
- 02 NAMA-BARANG-MASUK PIC X(25).
- 02 KODE-BARANG-MASUK PIC 9(3).
- 02 ALAMAT-BARANG-MASUK PIC X(25).
- SCREEN SECTION.
- 01 HAPUS-LAYAR.
- 02 BLANK SCREEN.
- 01 INPUT-DATA.
- 02 LINE 4 COLUMN 8 VALUE 'NAMA BARANG : '.
- 02 COLUMN PLUS 2 PIC A(25) TO NAMA-BARANG-MASUK.
- 02 LINE 6 COLUMN 8 VALUE 'KODE BARANG : '.
- 02 COLUMN PLUS 2 PIC 9(3) TO KODE-BARANG-MASUK REQUIRED.
- 02 LINE 8 COLUMN 8 VALUE 'ALAMAT TUJUAN : '.
- 02 COLUMN PLUS 2 PIC X(25) TO ALAMAT-BARANG-MASUK.
- PROCEDURE DIVISION.
- BUKA-FILE.
- OPEN OUTPUT BARANG.
- MULAI.
- MOVE SPACE TO SUDAH-BENAR.
- PERFORM MASUKAN-DATA UNTIL BENAR.
- PERFORM REKAM-DATA.
- PERFORM ADA-LAGI.
- SELESAI.
- CLOSE BARANG.
- STOP RUN.
- MASUKAN-DATA.
- DISPLAY HAPUS-LAYAR.
- DISPLAY (2, 16) '-----PENGIRIMAN BARANG-----'.
- DISPLAY INPUT-DATA.
- ACCEPT INPUT-DATA.
- DISPLAY (13, 8) 'DATA SUDAH BENAR [Y/T] ?'.
- ACCEPT SUDAH-BENAR.
- REKAM-DATA.
- WRITE BARANG.
- ADA-LAGI.
- DISPLAY (15, 8) 'TAMBAH DATA LAGI [Y/T] ?'.
- ACCEPT TAMBAH-DATA.
- IF YA GO TO MULAI.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement