Page 2 of 2

Re: Help with a JCL error

PostPosted: Sun Apr 28, 2019 12:10 pm
by cwseay
I know how to use HILITE, but how do I put in in a post they way it was done?

Re: Help with a JCL error

PostPosted: Sun Apr 28, 2019 12:38 pm
by cwseay
//CALC1000 JOB 1,'A. STUDENT',NOTIFY=&SYSUID                            00010102
//*SCHOLIB JCLLIB ORDER=(ZPROF.PROCLIB)                                 00010201
//**************************************************                    00010300
//* C ZUSER## TO YOURID                                                 00010400
//* C ZPROF PROFUID ALL                                                 00010500
//*   ==> IF YOU USE NOT ZPROF AS INSTRUCTORID                          00010600
//* DELETE ZSCHOLIB STATEMENT IF YOU WANT TO USE                        00010700
//*       THE DEFAULT PROC LIBRARY                                      00010800
//* ORIGINAL COPIED FROM  GMULLER.LANG.CNTL                             00011000
//**************************************************                    00011100
//* COMPILE COBOL PROGRAM                                               00012000
//**************************************************                    00021000
//STEP1 EXEC IGYWCLG,LNGPRFX=IGY420                                     00030001
//SYSIN        DD DSN=KC03MA9.LANG.SOURCE(CALC1000),DISP=SHR            00040002
//LKED.SYSLMOD DD DSN=KC03MA9.LANG.LOAD(CACL1000),DISP=SHR              00050002


Re: Help with a JCL error

PostPosted: Sun Apr 28, 2019 12:48 pm
by cwseay
1
 _________________________________
 TO END PROGRAM ENTER 0.
 TO CALCULATE SALES TAX, ENTER THE SALES AMOUNT.
 IGZ0017S The open of DISPLAY or ACCEPT file with environment name SYSIN was unsuccessful.
 CEE3201S The system detected an operation exception (System Completion Code=0C1).
          From compile unit CALC1000 at entry point CALC1000 at compile unit offset +000002DC at entry offset +000002DC
           at address 1ED002DC.


Re: Help with a JCL error

PostPosted: Sun Apr 28, 2019 3:25 pm
by NicC
I have edited your posts to remove unnecessary sections, e.g. the COBOL compile step as that executed successfully, and to use the code tags. Now we can see the wood from the trees as everything lines up. Please use the code tags - as I mentioned before you can easily work out how to use them if you use the "Full Editor" for creating your post and not the "Quick Reply" editor. Also, don't XDC the whole job - just the parts that are required - and even then edit out bits that are irrelevant.

Re: Help with a JCL error

PostPosted: Sun Apr 28, 2019 3:30 pm
by NicC
To fix your problem you need to supply a dataset with your input. As you can see from the error message,
IGZ0017S The open of DISPLAY or ACCEPT file with environment name SYSIN was unsuccessful.
the program was trying to access SYSIN and if you look at your JCL you did not supply a SYSIN DD statement to that step (GO).

Re: Help with a JCL error

PostPosted: Mon Apr 29, 2019 1:36 am
by cwseay
Was this not correct?
//SYSIN DD DSN=KC03MA9.LANG.SOURCE(CALC1000),DISP=SHR

Re: Help with a JCL error

PostPosted: Mon Apr 29, 2019 1:53 am
by NicC
That was the COBOL source code input to the compiler. Your program needs input via SYSIN in it execution step (GO) so something like
//GO.SYSIN DD DSN=your.input.dataset,DISP=SHR

or
//GO.SYSIN DD *
your first 80 byte input record
your second 80 byte input record
:
your last 80 byte input record
/*

Re: Help with a JCL error

PostPosted: Mon Apr 29, 2019 6:32 pm
by Robert Sample
And using ACCEPT is generally a poor way to provide input into a COBOL program. For proper processing, you'll need to provide left-zero-filled 7-digit numbers WITHOUT a decimal point (so 35.73 would be 0003573 and 1091 would be 0109100). If you don't provide numbers in the correct format, you may not get the results you expect.

Re: Help with a JCL error

PostPosted: Tue Apr 30, 2019 2:47 am
by Robert Sample
IGYWCLG is a system procedure that contains three separate steps. Each step may (or may not) have a SYSIN DD statement. You are confusing the COBOL source (COBOL.SYSIN) with the REQUIRED runtime SYSIN (GO.SYSIN). Furthermore, looking at your original JCL as posted 20 posts ago, you have a
//SYSIN     DD *               GENERATED STATEMENT
which indicates, at a minimum, that you do not have your JCL coded correctly and this may be causing your problem. Your JCL should look something like
// EXEC IGYWCLG
//COBOL.SYSIN DD .... (whatever your COBOL source is called)
//COBOL.SYSLIB DD .... (if required -- it may not be)
//GO.SYSIN DD *
<input data, one field per line in the first 7 bytes>
/*
//
If you had a subprogram being called by your COBOL program, you would need
//LKED.SYSLIB DD …. <subprogram library>
//LKED.SYSIN DD *
<linkage editor / binder commands to bring your subprogram into your main COBOL program>
/*
and these statements would belong between your //COBOL.SYSLIB and your //GO.SYSIN statements above. The SYSIN DD names have the procedure step name before the SYSIN to indicate which of the three steps that particular SYSIN is associated with. If you just placed the data in the JCL without any //SYSIN statement, you would get the GENERATED STATEMENT message shown above -- and this is definitely wrong.