I'm just starting COBOL, and ran into this with JCL... How do I compile a basic cobol program from my PDS, I know through instream it would just be
//SYSIN DD * code code code /*
I tried something like
//SYSIN DD DSN=the.pds.location(file),DISP=SHR
but all that shot back was garbage and a return code of 12 I think.
If anyone could help, I would be grateful.
Based on the information you have posted, your JCL should work. Maybe you are missing something else. The following JCL provides the full job step to do a COBOL compile:
Note: You might have to change the STEPLIB to match the version of COBOL running at your site.
If your JCL looks pretty close to the above, the next thing to check out is your COBOL program. Go into the ISPF editor (I presume you have access to it) and type PROFILE on the command line. You should see something like:
Now have a look for PACK ON (note the above shows PACK OFF). If you find PACK ON this is your problem. You need to issue the PACK OFF command and save your dataset. Try the compile again.
BTW... you get rid of the profile display by typing RESET on the command line.
If neither one of these fix your problem you need to provide a more information as to what the exact nature of the problem is.