Showing posts with label cobol code accept and display. Show all posts
Showing posts with label cobol code accept and display. Show all posts

Thursday, March 1, 2012

COBOL code to accept data and Display it


       IDENTIFICATION DIVISION.                               
       PROGRAM-ID.    ACPTDISP.                               
       AUTHOR.        KK.                                      
       DATE-WRITTEN.  11-11-1111.                             
       SECURITY.                                              
                      A SAMPLE PROGRAM TO ACCEPT AND DISPLAY. 
       DATA DIVISION.                                          
       WORKING-STORAGE SECTION.                               
       01  STRNG     PIC       A(30).                         
       PROCEDURE DIVISION.                                    
       0000-MAIN SECTION.                                      
       1000-ACCEPT-PARA.                                      
                ACCEPT STRNG                                  
                DISPLAY "STRING IS " STRNG.                   
       2000-EXIT-PARA.                                         
                STOP RUN. STOP RUN.    


//* Run the program using JCL

//usernm  JOB  'Training','KK',NOTIFY=&SYSUID                
//JOBLIB    DD  DSN=usernm.JAN.COBOLPGM.LOADLIB,DISP=SHR     
//STEP1     EXEC  PGM=ACPTDISP                                  
//SYSIN     DD *                                                
  HELLO WORLD EVERYONE                                           
/*                                                              
//