0

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=*                           
mustaccio
  • 18,234
  • 16
  • 48
  • 57
paxtuik
  • 47
  • 1
  • 13
  • What is the error message ???? – Bruce Martin May 10 '16 at 07:08
  • 100-INITIALIZATION-RTN ERROR IN OPENING THE MASTER FILE FILE STATUS IS 35 – paxtuik May 10 '16 at 15:13
  • 2
    You want the DD to appear in the PROC you are executing, for step `RUN`. So you have to spell that out to the system in the JCL (general-purpose computers do not make good mindreaders): `//RUN.EMDATI DD DSN=KC02477.NEWEMP.WORKASGN.KSDS,DISP=SHR`. That assumes you have defined EMDATI in your SELECT statement for the file in the COBOL program. – Bill Woodger May 10 '16 at 16:13

1 Answers1

0

The DD statement would typically be :-

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

where ddname would be defined within the program.

MikeT
  • 51,415
  • 16
  • 49
  • 68
  • Thats what I ended up trying //EMDATI DD DSN=KC02477.NEWEMP.WORKASGN.KSDS,DISP=SHR //RUN.REPORT1 DD SYSOUT=* but it keeps giving me file status 35 – paxtuik May 10 '16 at 15:30
  • Did you try `//RUN.EMDATI DD DSN=KC02477.NEWEMP.WORKASGN.KSDS,DISP=SHR`? The `RUN.` is required because you are invoking procedure DSNHICOB (RUN being the step within the procedure that you want to override). – MikeT May 10 '16 at 20:20