Search code examples
db2cobolmainframezosjcl

JCL, What is the DD statement I would need to bring in my VSAM file for my cobol to use


VSAM file i need to use KC02477.NEWEMP.WORKASGN.KSDS my cobol is using imbedded sql, I am having trouble getting it to compile using the input file, what is the correct syntax for the dd statement

****** ***************************** Top of Data ******************************
 000001 //KC03AF5A JOB (12345678),'KC03AF5',MSGLEVEL=(1,1),                     
 000002 // NOTIFY=KC03AF5,MSGCLASS=H,CLASS=A,REGION=0M                          
 000003 //***********************************************************           
 000004 //FFFPROC JCLLIB ORDER=(KC02477.SHARED.PROCLIB)                         
 000005 //********************************************************************* 
 000006 //DSNHICOB EXEC DSNHICOB,MEMBER=COBOL04, << MEMBERNAME IN COBOL PDS     
 000007 //             SLIB='KC03AF5.BRAPAX'    << COBOL PDS LIB INFO           
 000008 //********************************************************************* 
 000009 //BIND.SYSTSIN   DD *                                                   
 000010  DSN SYSTEM (DBAG)                                                      
 000011  BIND PACKAGE(COL9G) MEMBER(COBOL04) ENCODING(EBCDIC) -                 
 000012  ACT(REP) ISO(CS) OWNER(KC03AF5)                                        
 000013  BIND PLAN(BP278031) PKLIST(COL9G.*) -                                  
 000014  ACT(REP) ISO(CS) ENCODING(EBCDIC) -                                    
 000015  OWNER(KC03AF5)                                                         
 000016  END                                                                    
 000017 //********************************************************************* 
 000018 //RUN.SYSTSIN DD *                                                      
 000019  DSN SYSTEM(DBAG)                                                       
 000020  RUN PROGRAM(COBOL04) PLAN(BP278031)                                    
 000021  END                                                                    
 000022 //RUN.REPORT1   DD SYSOUT=*                           

Solution

  • The DD statement would typically be :-

    //ddname DD DSN=KC02477.NEWEMP.WORKASGN.KSDS,DISP=SHR
    

    where ddname would be defined within the program.