Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IDENTIFICATION DIVISION.
- PROGRAM-ID. CETAK-DATA.
- ENVIRONMENT DIVISION.
- INPUT-OUTPUT SECTION.
- FILE-CONTROL.
- SELECT MAHASISWA ASSIGN TO DISK
- ORGANIZATION IS SEQUENTIAL
- ACCESS MODE IS SEQUENTIAL.
- SELECT CETAK ASSIGN TO PRINTER.
- DATA DIVISION.
- FILE SECTION.
- FD MAHASISWA
- LABEL RECORD IS STANDARD
- VALUE OF FILE-ID IS ‘MHS.DAT’
- DATA RECORD IS REC-PEG.
- 01 REC-PEG.
- 02 NAMA PIC X(10).
- 02 NPM PIC X(20).
- 02 KELAS PIC 99.
- FD CETAK
- LABEL RECORD IS OMITTED
- DATA RECORD IS BARIS-CETAK.
- 01 BARIS-CETAK PIC X(80).
- WORKING-STORAGE SECTION.
- 01 JUDUL-1.
- 02 F PIC X(18) VALUE SPACES.
- 02 F PIC X(15) VALUE ‘ABSEN MAHASISWA’
- 01 JUDUL-2.
- 02 NAMA PIC X(10).
- 02 NPM PIC X(20).
- 02 KELAS PIC 99.
- 01 GARIS.
- 02 F PIC X(70) VALUE ALL ‘-‘.
- 01 DATA-PEG-O.
- 02 NAMA-O PIC X(10).
- 02 NPM-O PIC X(20).
- 02 KELAS-O PIC 99.
- PROCEDURE DIVISION.
- BUKA-FILE.
- OPEN INPUT MAHASISWA
- OUTPUT CETAK.
- MULAI.
- PERFORM CETAK-JUDUL
- PERFORM CETAK-ISI-TABEL
- PERFORM CETAK-GARIS.
- SELESAI.
- CLOSE MAHASISWA, CETAK
- STOP RUN.
- CETAK-JUDUL.
- WRITE BARIS-CETAK FROM JUDUL-1.
- 02 NAMA PIC X(10).
- 02 NPM PIC X(20).
- 02 KELAS PIC 99.
- CETAK-ISI-TABEL.
- READ MAHASISWA AT END GO TO SELESAI.
- MOVE NMS TO NAMA-O
- MOVE NPMS TO NPM -O
- MOVE KLS TO KELAS-O
- WRITE BARIS-CETAK FROM DATA-MHS-O.
- CETAK-GARIS.
- WRITE BARIS-CETAK FROM GARIS.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement