• Image 1
  • Image 2
  • Image 3
  • Image 4
  • Image 5
  • Image 6
  • Image 7




Tuesday, September 11, 2012

SAMPLE LIABRARY PROGRAM USING COBOL

Hi IT knowledge lovers you are on my blog at “We Are Knowledge”.. in here you will getting many IT knowledge, from desktop programming until web programming.. I was provided you it.. and you will take FREE..

Now.. I want giving you tutorial about “COBOL” and discussof “making library program”. This is sample eazy making library program at program language cobol… you will know ?? let’s do read my article… have fun friend to read my article…

Previosly you must having the cobol program likely “cobol software”. And for more easely you can copy this coding to your notepad.


Example : :

       IDENTIFICATION DIVISION.
       PROGRAM-ID. LIBRARY PROGRAM.
       AUTHOR. MY KNOWLEDGE.
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 INPUTING.
              02 X PIC 999.
              02 NM PIC A(20).
              02 JB PIC A(20).
              02 PB PIC 9(4).
              02 LP PIC 9(4).
              02 TB PIC 9(6).
       SCREEN SECTION.
       01 CLEANING.
              02 BLANK SCREEN.
       PROCEDURE DIVISION.
       GOING.
              DISPLAY CLEANING.
              DISPLAY " ".
              DISPLAY "        WELCOME TO MY PROGRAM".
              DISPLAY "       THIS IS LIBRARY PROGRAM".
              DISPLAY "THIS IS PROGRAM FOR CALCULATING PAYMENTS".
              DISPLAY "              BY - WAK".
              DISPLAY "INPUT NAME                                                       : ".
              ACCEPT NM.
              DISPLAY "INPUT TITLES             : ".
              ACCEPT JB.
              DISPLAY "INPUT COUNT OF BOOKS     : ".
              ACCEPT PB.
             DISPLAY "INPUT OLD BOOK BORROWING : ".
             ACCEPT LP.
             COMPUTE TB = LP * 500.
             DISPLAY "YOU MUST PAY             : Rp. ".
             DISPLAY TB.
       STOPING.
           STOP RUN.


Note ::

If you using copy and paste, please for change all quotes (‘ ‘) or this to (“ “)
You must change save type become “.cob” ex : library.cob.
You must follow line, 8(eight), 12(twelve).
Command alt  + F9 for compile the program
Command ctrl + F9 for running the program


Logic ::

Identification division
>> to fill author for name of programmers and program id for name of program

Environment division
>> for mechine

Working-storage division
>> for declaration variables

Procedure division
>> place for making program coding


Ok.. just it..
I hope you likely..
See you later friends…

No comments:

Post a Comment