Program sederhana Sequential.
0
000008 IDENTIFICATION DIVISION.
000008 PROGRAM-ID. BARANG.
000008 ENVIRONMENT DIVISION.
000008 INPUT-OUTPUT SECTION.
000008 FILE-CONTROL.
000008 DATA DIVISION.
000008 FILE SECTION.
000008 FD FILE-DATA
000012 LABEL RECORD IS STANDARD
000012 VALUE OF FILE-ID IS 'DATA.DAT'
000012 DATA RECORD IS RECORD-BRG.
000008 01 RECORD-BRG.
000012 02 KODE-BARANG PIC X(5).
000012 02 NAMA-BARANG PIC X(15).
000012 02 UNIT-BARANG PIC 999.
000012 02 HARGA-BARANG PIC 9(6).
000012 02 PASWORD PIC X(10).
000012 02 TGL PIC XX/XX/XXXX.
000008 WORKING-STORAGE SECTION.
000008 01 BENAR-SALAH PIC X VALUE SPACE.
000012 88 BENAR VALUE 'Y' , 'y'.
000012 88 SALAH VALUE 'T' , 't'.
000008 01 LAGI-SUDAH PIC X VALUE SPACE.
000012 88 LAGI VALUE 'Y' , 'y'.
000012 88 SUDAH VALUE 'T' , 't'.
000008 SCREEN SECTION.
000008 01 LAYAR-BETUL-SALAH.
000012 05 LINE 20 COLUMN 10 VALUE ' SUDAH BENAR (Y/T) ?'.
000012 05 COLUMN PLUS 1 PIC X USING BENAR-SALAH.
000008 01 LAYAR-LAGI-SUDAH.
000012 05 LINE 23 COLUMN 10 VALUE ' ADA LAGI (Y/T) ?'.
000012 05 COLUMN PLUS 1 PIC X USING LAGI-SUDAH.
000008 01 LAYAR-AWAL.
000012 05 BLANK SCREEN.
000012 05 LINE 8 COLUMN 10 VALUE ' ENTER PASSWORD : '.
000012 05 COLUMN PLUS 1 PIC X(10) TO PASWORD SECURE.
000008 01 LAYAR-MENAMBAH.
000012 05 BLANK SCREEN.
000012 05 LINE 8 COLUMN 10 VALUE ' NO BARANG : '.
000012 05 COLUMN PLUS 1 PIC X(5) TO KODE-BARANG FULL, REQUIRED.
000012 05 LINE 10 COLUMN 10 VALUE ' NAMA BARANG : '.
000012 05 COLUMN PLUS 1 PIC X(15) TO NAMA-BARANG REQUIRED.
000012 05 LINE 12 COLUMN 10 VALUE ' HARGA SATUAN : '.
000012 05 COLUMN PLUS 1 PIC 9(6) TO HARGA-BARANG REQUIRED.
000012 05 LINE 14 COLUMN 10 VALUE ' JUMLAH BARANG : '.
000012 05 COLUMN PLUS 1 PIC 999 TO UNIT-BARANG.
000012 05 LINE 16 COLUMN 10 VALUE ' TGL. TRANSAKSI : '.
000012 05 COLUMN PLUS 1 PIC XX/XX/XXXX TO TGL.
000008 PROCEDURE DIVISION.
000008 BUKA-FILE.
000012 OPEN OUTPUT FILE-DATA.
000008 TAMBAH-BARU.
000012 DISPLAY LAYAR-AWAL.
000012 ACCEPT LAYAR-AWAL.
000012 DISPLAY LAYAR-MENAMBAH.
000012 ACCEPT LAYAR-MENAMBAH.
000012 DISPLAY LAYAR-BETUL-SALAH.
000012 ACCEPT LAYAR-BETUL-SALAH.
000012 IF SALAH
000012 GO TO TAMBAH-BARU.
000012 WRITE RECORD-BRG.
000012 DISPLAY LAYAR-LAGI-SUDAH.
000012 ACCEPT LAYAR-LAGI-SUDAH.
000012 IF LAGI
000012 GO TO TAMBAH-BARU.
000012 CLOSE FILE-DATA.
000012 STOP RUN.
0 comments:
Post a Comment