Page 1 of 1

COBOL compile JCL

PostPosted: Wed Aug 24, 2016 5:31 pm
by gowthamgyaa
Hi All,

I hope you are good.

Actually, learned manframes 3 years ago and as soon as I moved to production support, I lost my touch in developing code. Hence, I am in need of your kind assistance on the below,

1) Please be informed that, I am facing difficulties in Compile, Link-edit a program. Please find the below JCL,



//* JOB STATEMENT
//STEP001 EXEC IGYWCL
//SYSIN DD DSN=MTPLB22.PGM.SOURCE(WRTFL),DISP=SHR
//SYSLMOD DD DSN=MTPLB22.PGM.LOADLIB(LWRTFL),DISP=(,CATLG,DELETE),
//               SPACE=(TRK,(10,5,15)),
//               DCB=(RECFM=U,DSORG=PO)

 


I kindly request you to please advise on the way to create load library.
PS: It would be great, if I have your assistance on this, as I have my exams tomorrow.

Kind Regards,
Gowtham

Re: COBOL compile JCL

PostPosted: Wed Aug 24, 2016 6:12 pm
by Robert Sample
I kindly request you to please advise on the way to create load library.
PS: It would be great, if I have your assistance on this, as I have my exams tomorrow.
You did not explain what you are having trouble with.
You did not provide any error messages.
You did not provide any output from your job.
You have an exam tomorrow -- why does that matter to us?
In other words, you have done nothing to help yourself by telling us what your issue(s) is(are).

As a wild guess, IGYWCL is a two-step procedure, and your //SYSIN should be //COBOL.SYSIN (assuming your site did not change the step name) and SYSLMOD should be //LKED.SYSLMOD (again assuming your site did not change the step name).

Re: COBOL compile JCL

PostPosted: Wed Aug 24, 2016 6:26 pm
by steve-myers
You have several problems here.
  • The data in JCL continuation statements as in your SYSLMOD DD statement cannot start after column 16; your statements start in column 18.
  • The SYSLMOD DD statement belongs in the step that does the link edit. As written your SYSLMOD DD statement is assigned to the first step in the compile/link procedure. You must indicate the step in the DD statement as

    //LKED.SYSLMOD DD ...

    LKED is commonly used, but it might not be correct in your shop, so check it.
  • DCB=(RECFM=U,DSORG=PO) is entirely unnecessary. It's not an error, you don't need it. The Linkage Editor or Binder forces RECFM=U, so that's not required. The Linkage Editor or Binder might be smart enough to detect RECFM=F or RECFM=V are specified and write a diagnostic, so if you don't have to specify a RECFM, don't specify it! SPACE=(TRK,(10,5,15)) elsewhere in your DD statement specifies 15 directory blocks, which implies DSORG=PO, so DCB=(DSORG=PO) is also not necessary.

Re: COBOL compile JCL

PostPosted: Wed Aug 24, 2016 7:16 pm
by gowthamgyaa
Hi Steve, Robert,

Thanks a lot for scheduling your time to assist me on this. I was able to compile and run successfully.

Regards,
Gowtham