Cobol Program Password [ Source Code ]

0


Source Code :
000008 IDENTIFICATION DIVISION.
000008 PROGRAM-ID. LAST.
000008 Author. Fikri.
000008 ENVIRONMENT DIVISION.

000008 Configuration Section.
000008 Source-Computer. FikriMujahid-Pc.
000008 Object-Computer. FikriMujahid-Pc.
000008 Input-Output Section.
000008 File-Control.
000008 Select Penjualan Assign To Disk
000015        Organization Is Sequential
000012        File Status Is Status-Salah.
000008 DATA DIVISION.
000008 File Section.
000008 Fd Penjualan
000012     Label Record Is Standard
000012     Value Of File-Id Is 'Data.dat'
000012     Data Record Is Penjualan-Dat.
000008 01 Penjualan-Dat.
000012     02 Nobar                           Pic 9(6).
000012     02 Nambar       Pic A(12).
000012     02 Harsa                            Pic 9(6).
000012     02 Jumbar        Pic 9(5).
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 77 Pasword                          Pic X(6).
000008 77 Status-Salah Pic XX.
000008 Screen Section.
000008 01 HAPUS-LAYAR.
000012     02 BLANK SCREEN.
000008 01 layar-Home.
000012     05 LINE 24 COLUMN 16 VALUE ' '.
000012     05 COLUMN PLUS 1 PIC X(6) TO Pasword SECURE.
000008 01 LAYAR-BETUL-SALAH.
000012     05 LINE 13 COLUMN 2 VALUE 'SUDAH BENAR (Y/T) ?'.
000012     05 COLUMN PLUS 1 PIC X USING BENAR-SALAH.
000008 01 LAYAR-LAGI-SUDAH.
000012     05 LINE 15 COLUMN 2 VALUE 'ADA LAGI (Y/T) ?'.
000012     05 COLUMN PLUS 1 PIC X USING LAGI-SUDAH.
000008 01 LAYAR-MENAMBAH.
000012     05 BLANK SCREEN.
000012     05 LINE 2 COLUMN 2 VALUE 'NO BARANG       : '.
000012     05 COLUMN PLUS 1 PIC X(5) TO Nobar FULL, REQUIRED, AUTO.
000012     05 LINE 4 COLUMN 2 VALUE 'NAMA BARANG     : '.
000012     05 COLUMN PLUS 1 PIC X(15) TO Nambar REQUIRED.
000012     05 LINE 6 COLUMN 2 VALUE 'HARGA SATUAN    : '.
000012     05 COLUMN PLUS 1 PIC 9(6) TO Harsa REQUIRED.
000012     05 LINE 8 COLUMN 2 VALUE 'JUMLAH BARANG   : '.
000012     05 COLUMN PLUS 1 PIC 999 TO Jumbar.
000012     05 LINE 10 COLUMN 2 VALUE 'TGL. TRANSAKSI  : '.
000012     05 COLUMN PLUS 1 PIC XX/XX/XXXX TO Tgl.
000008 PROCEDURE DIVISION.
000008 Home.
000012     display HAPUS-LAYAR.
000012     DISPLAY '$$$$$$$$$$$*"           ^""**$$$$$$$$$$$$$$$$$$$$'.
000012     DISPLAY '$$$$$$$$$$e$$$$$$$$beee,       "*$$$$$$$$$$$$$$$$'.
000012     DISPLAY '$$$$$$$$$$P""     "*$$$$""$b.       "$$$$$$$$$$$$'.
000012     DISPLAY '$$$$$$$$"            "$F   *$$$c      ^*$$$$$$$$$'.
000012     DISPLAY '$$$$$$P              dP     ^$$$$c      ^*$$$$$$$'.
000012     DISPLAY '$$$$$"              J$      $$$$$$b       "$$$$$$'.
000012     DISPLAY '$$$$P       .eeee.  4$      $$$$$$$$b       ^$$$$'.
000012     DISPLAY '$$$F      .d$$$$$$$b$"     d$$$$$$$$$r       ^$$$'.
000012     DISPLAY '$$P      d$$$$$$$$$$%     J$$$$$$$$$$$        3$$'.
000012     DISPLAY '$$      $$$$$$$$$$$F     4$" "$$$$$$$$         $$'.
000012     DISPLAY '$F     $$$$$$$$$$$P     .$%   ^*$$$$$$         $$'.
000012     DISPLAY '$F    4$$$$$$$$$$$eeeeee$$.     ^$c            $$'.
000012     DISPLAY '$F    $$$$               "$b      "$c          J$'.
000012     DISPLAY '$$    $$$%                 *$c      *$.       .d$'.
000012     DISPLAY '$$b    $P                   ^$$.     ^$$$$$$$$$*$'.
000012     DISPLAY '$$$$.  *$$$$$$$$"""""""$$$$$$$$$b      "$$$$$$$"4'.
000012     DISPLAY '$$$$$e  $$$$$$$%       $$$$$$$$$$$c      *$$$P" $'.
000012     DISPLAY '$$$$$$$b.*$$$$$        ^$$$$$$$$$$$$$$$$$$$P"  4$'.
000012     DISPLAY '$$$$$$$$$$$$$$$.         "**$$$$$$$$$$$*""    4$$'.
000012     DISPLAY '$$$$$$$$$$$$$$$$.                            d$$$'.
000012     DISPLAY '$$$$$$$$$$$$$$$$$c                        .d$$$$$'.
000012     DISPLAY '$$$$$$$$$$$$$$$$$$$$c.              ,ee$$$$$$$$$$'.
000012     DISPLAY '-Welcome master, good to see you again!'.
000012     display 'Enter Password : '.
000012     Accept layar-Home.
000008 SELEKSI.
000012     IF Pasword = 123456 GO TO Buka-File ELSE GO TO Home.
000008 Buka-File.
000012     OPEN Output Penjualan.
000008 Awal.
000012     Perform Mulai.
000012     Perform Status1.
000012     Perform Kondisi.
000008 Selesai.
000008     CLOSE Penjualan
000008     STOP RUN.
000008 Mulai.
000012     Write Penjualan-Dat.
000012     DISPLAY LAYAR-MENAMBAH.
000012     ACCEPT LAYAR-MENAMBAH.
000008 Status1.
000012     If Status-Salah = '34'
000012        Display (17, 2) 'Tidak Terkam, Disk Penuh'.
000012     If Status-Salah = '91'
000012        Display (17, 2) 'Struktur File Rusak'.
000008 Kondisi.
000012     DISPLAY LAYAR-BETUL-SALAH.
000012     ACCEPT LAYAR-BETUL-SALAH.
000012     IF SALAH
000012        GO TO Mulai.
000012     DISPLAY LAYAR-LAGI-SUDAH.
000012     ACCEPT LAYAR-LAGI-SUDAH.
000012     IF LAGI
000012        GO TO Mulai.

0 comments:

Post a Comment

 
Design by ThemeShift | Bloggerized by Lasantha - Free Blogger Templates | Best Web Hosting