Page 1 of 1

JCL Compile-Link Issue.

PostPosted: Wed Jul 29, 2020 5:08 am
by jrcox
Hello All,

I am a beginner to JCL and I am requesting guidance on how to correct an error when I try to compile and link a COBOL sample program from an MVS JCL book that I purchased to learn from. I have installed and using the Hercules-TK4/MVS 3.8J mainframe emulator to learn with and it has been good so far.

I have referenced the Internet for examples, tips, possible solutions, etc. I'm doing everything I can to read all the books I have to learn how to correct the JCL issue but I'm stumped. Listed is the JCL, COBOL source code, and Job output for reference. It has a MAX COND CODE 0012 in the LINK1 step of the JCL. From what I understand, the COBOL version with this emulator has PROC's to make it easier to compile, link, and execute COBOL code. Being a beginner, I'm not up to speed with using the COBUC or COBUCL PROC to create an executable which is what I would like to do so I can follow along with tutorials in some books I have if anyone has experience with using these procedures. The version of COBOL used with this emulator is CB545 V2 LVL78 01MAY72 IBM OS AMERICAN NATIONAL STANDARD COBOL that is shown in the job output (JES 2 JOB LOG). There are a couple of errors shown at the bottom of the Job output listing.

21.26.08 JOB  691  $HASP373 HERC01CO STARTED - INIT  1 - CLASS A - SYS TK4-    
21.26.08 JOB  691  IEF403I HERC01CO - STARTED - TIME=21.26.08                  
21.26.08 JOB  691  IEFACTRT - Stepname  Procstep  Program   Retcode            
21.26.08 JOB  691  HERC01CO   STEP1               IKFCBL00  RC= 0000            
21.26.08 JOB  691  HERC01CO   LINK1               IEWL      RC= 0012            
21.26.08 JOB  691  IEF404I HERC01CO - ENDED - TIME=21.26.08                    
21.26.08 JOB  691  $HASP395 HERC01CO ENDED                                      
    1     //HERC01CO JOB 1,'COMPILE COBOL',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),  
          //         NOTIFY=HERC01,                                            
          //            USER=HERC01,PASSWORD=            GENERATED BY GDL      
          ****************************************************************      
          ***                                                            *      
          ***               COMPILE SOURCE JCL                           *      
          ***                                                            *      
          ****************************************************************      
    2     //STEP1    EXEC  PGM=IKFCBL00,REGION=4096K,                          
          //   PARM=('DECK,NOLOAD,SUPMAP,BUF=1024K,SIZE=2048K')                
    3     //COB.SYSIN DD   DSN=HERC01.TEST.COBOL(COPYCAT),DISP=SHR              
    4     //STEPLIB   DD    DSN=SYSC.LINKLIB,DISP=SHR                          
    5     //SYSPUNCH  DD    DUMMY                                              
    6     //SYSPRINT  DD    SYSOUT=A                                            
    7     //SYSLIB    DD    DSN=HERC01.TEST.LOADLIB,DISP=SHR                    
    8     //SYSLIN    DD    DSN=&&LOADFILE,DISP=(NEW,PASS,DELETE),              
          //  UNIT=SYSDA,                                                      
          //  SPACE=(CYL,(1,1))                                                
    9     //SYSUT1    DD    UNIT=SYSDA,SPACE=(460,(700,100))                    
   10     //SYSUT2    DD    UNIT=SYSDA,SPACE=(460,(700,100))                    
   11     //SYSUT3    DD    UNIT=SYSDA,SPACE=(460,(700,100))                    
   12     //SYSUT4    DD    UNIT=SYSDA,SPACE=(460,(700,100))                    
          ****************************************************************      
          ***                                                            *      
          ***               LINKAGE EDITOR JCL                           *      
          ***                                                            *      
          ****************************************************************      
   13     //LINK1    EXEC   PGM=IEWL,                                          
          //  PARM=('LIST,XREF,MAP'),REGION=96K,                                
          //  COND=(5,LT,STEP1)
   14     //SYSPRINT  DD    SYSOUT=A                                            
   15     //SYSLIB    DD    DSN=SYSC.COBLIB,DISP=SHR                            
   16     //SYSLIN    DD    DSN=&&LOADFILE,DISP=(OLD,DELETE)                    
   17     //SYSLMOD   DD    DSN=HERC01.TEST.LOADLIB(COPYCAT),DISP=SHR          
   18     //SYSUT1    DD    UNIT=SYSDA,SPACE=(1024,(50,20))                    
IEF236I ALLOC. FOR HERC01CO STEP1                                              
IEF237I 240  ALLOCATED TO SYSIN                                                
IEF237I 240  ALLOCATED TO SYS00166                                              
IEF237I 24F  ALLOCATED TO STEPLIB                                              
IEF237I 24F  ALLOCATED TO SYS00168                                              
IEF237I DMY  ALLOCATED TO SYSPUNCH                                              
IEF237I JES2 ALLOCATED TO SYSPRINT                                              
IEF237I 241  ALLOCATED TO SYSLIB                                                
IEF237I 190  ALLOCATED TO SYSLIN                                                
IEF237I 140  ALLOCATED TO SYSUT1                                                
IEF237I 170  ALLOCATED TO SYSUT2                                                
IEF237I 180  ALLOCATED TO SYSUT3                                                
IEF237I 140  ALLOCATED TO SYSUT4                                                
IEF142I HERC01CO STEP1 - STEP WAS EXECUTED - COND CODE 0000                    
IEF285I   HERC01.TEST.COBOL                            KEPT          *--------5
IEF285I   VOL SER NOS= PUB000.                                                  
IEF285I   SYS1.UCAT.TSO                                KEPT          *--------0
IEF285I   VOL SER NOS= PUB000.                                                  
IEF285I   SYSC.LINKLIB                                 KEPT          *--------0
IEF285I   VOL SER NOS= SYSCPK.                                                  
IEF285I   UCSYSCPK                                     KEPT          *--------0
IEF285I   VOL SER NOS= SYSCPK.                                                  
IEF285I   JES2.JOB00691.SO0101                         SYSOUT                  
IEF285I   HERC01.TEST.LOADLIB                          KEPT          *--------0
IEF285I   VOL SER NOS= PUB010.                                                  
IEF285I   SYS20210.T212608.RA000.HERC01CO.LOADFILE     PASSED        *--------0
IEF285I   VOL SER NOS= WORK03.                                                  
IEF285I   SYS20210.T212608.RA000.HERC01CO.R0000001     DELETED       *--------6
IEF285I   VOL SER NOS= WORK03.                                                  
IEF285I   SYS20210.T212608.RA000.HERC01CO.R0000001     DELETED       *--------6
IEF285I   VOL SER NOS= WORK00.                                                  
IEF285I   SYS20210.T212608.RA000.HERC01CO.R0000002     DELETED       *--------6
IEF285I   VOL SER NOS= WORK01.                                                  
IEF285I   SYS20210.T212608.RA000.HERC01CO.R0000003     DELETED       *--------9
IEF285I   VOL SER NOS= WORK02.                                                  
IEF285I   SYS20210.T212608.RA000.HERC01CO.R0000004     DELETED       *--------3
IEF285I   VOL SER NOS= WORK00.                                                  
IEF373I STEP /STEP1   / START 20210.2126                                        
IEF374I STEP /STEP1   / STOP  20210.2126 CPU    0MIN 00.08SEC SRB    0MIN 00.04S
********************************************************************************
*     1. Jobstep of job: HERC01CO    Stepname: STEP1       Program name: IKFCBL0
*         elapsed time  00:00:00,22                      CPU-Identifier:  TK4-  
*             CPU time  00:00:00,12               Virtual Storage used:   2076K
*           corr. CPU:  00:00:00,12   CPU time has been corrected by  1 / 1,0  m
*                                                                              
*     I/O Operation                                                            
*     Number of records read via DD * or DD DATA:      0                        
*     240.......5 240.......0 24F.......0 24F.......0 DMY.......0 DMY.......0 24
*     180.......9 140.......3                                                  
*                                                                              
*                                          Charge for step (w/o SYSOUT):        
********************************************************************************
IEF236I ALLOC. FOR HERC01CO LINK1                                              
IEF237I JES2 ALLOCATED TO SYSPRINT                                              
IEF237I 24F  ALLOCATED TO SYSLIB                                                
IEF237I 24F  ALLOCATED TO SYS00170                                              
IEF237I 190  ALLOCATED TO SYSLIN                                                
IEF237I 241  ALLOCATED TO SYSLMOD                                              
IEF237I 240  ALLOCATED TO SYS00172                                              
IEF237I 180  ALLOCATED TO SYSUT1                                                
IEF142I HERC01CO LINK1 - STEP WAS EXECUTED - COND CODE 0012                    
IEF285I   JES2.JOB00691.SO0102                         SYSOUT                  
IEF285I   SYSC.COBLIB                                  KEPT          *--------0
IEF285I   VOL SER NOS= SYSCPK.                                                  I
IEF285I   UCSYSCPK                                     KEPT          *--------0 I
IEF285I   VOL SER NOS= SYSCPK.                                                  I
IEF285I   SYS20210.T212608.RA000.HERC01CO.LOADFILE     DELETED       *--------1 I
IEF285I   VOL SER NOS= WORK03.                                                  I
IEF285I   HERC01.TEST.LOADLIB                          KEPT          *--------0 I
IEF285I   VOL SER NOS= PUB010.                                                  I
IEF285I   SYS1.UCAT.TSO                                KEPT          *--------0 I
IEF285I   VOL SER NOS= PUB000.                                                  I
IEF285I   SYS20210.T212608.RA000.HERC01CO.R0000005     DELETED       *--------0 I
IEF285I   VOL SER NOS= WORK02.                                                  I
IEF373I STEP /LINK1   / START 20210.2126                                        I
IEF374I STEP /LINK1   / STOP  20210.2126 CPU    0MIN 00.02SEC SRB    0MIN 00.00S*
*********************************************************************************
*     2. Jobstep of job: HERC01CO    Stepname: LINK1       Program name: IEWL   *
*         elapsed time  00:00:00,07                      CPU-Identifier:  TK4-  *
*             CPU time  00:00:00,02               Virtual Storage used:     96K *
*           corr. CPU:  00:00:00,02   CPU time has been corrected by  1 / 1,0  m*
*                                                                               *
*     I/O Operation                                                             *
*     Number of records read via DD * or DD DATA:      0                        *
*     DMY.......0 24F.......0 24F.......0 190.......1 241.......0 240.......0 18*
*                                                                               *
*                                          Charge for step (w/o SYSOUT):        *
********************************************************************************I
IEF375I  JOB /HERC01CO/ START 20210.2126                                        I
IEF376I  JOB /HERC01CO/ STOP  20210.2126 CPU    0MIN 00.10SEC SRB    0MIN 00.04S
  CB545 V2 LVL78 01MAY72                 IBM OS AMERICAN NATIONAL STANDARD COBOL
                                                                                 
   1                                                                            0
00001          IDENTIFICATION DIVISION.                                         0
00002          PROGRAM-ID. COPYCAT.                                             0
00003          ENVIRONMENT DIVISION.
00004          CONFIGURATION SECTION.                                          
00005          INPUT-OUTPUT SECTION.                                            
00006          FILE-CONTROL.                                                    
00007              SELECT INFILE ASSIGN TO UT-S-INFILE.                        
00008              SELECT OUTFILE ASSIGN TO UT-S-OUTFILE.                      
00009          DATA DIVISION.                                                  
00010          FILE SECTION.                                                    
00011          FD  INFILE LABEL RECORDS ARE OMITTED.                            
00012          01  INPUT-RECORD.                                                
00013              05  INPUT-LINE           PIC X(80).                          
00014          FD  OUTFILE LABEL RECORDS ARE OMITTED.                          
00015          01  OUTPUT-RECORD.                                              
00016              05  OUTPUT-LINE          PIC X(80).                          
00017          WORKING-STORAGE SECTION.                                        
00018          77  WS-FS                    PIC 9(2).                          
00019          01  WORKING-RECORD.                                              
00020              05  WORKING-LINE         PIC X(80).                          
00021          PROCEDURE DIVISION.                                              
00022          OPEN-FILES.                                                      
00023              OPEN INPUT INFILE.                                          
00024              OPEN OUTPUT OUTFILE.                                        
00025          READ-A-LINE.                                                    
00026              READ INFILE AT END                                          
00027                GO TO END-OF-PROGRAM.                                      
00028              MOVE INPUT-RECORD TO OUTPUT-RECORD.                          
00029              WRITE OUTPUT-RECORD.                                        
00030              GO TO READ-A-LINE.                                          
00031          END-OF-PROGRAM.                                                  
00032              CLOSE INFILE.                                                
00033              CLOSE OUTFILE.                                              
00034              STOP RUN.                                                    
   2                                                                            

                                                                               
*STATISTICS*     SOURCE RECORDS =    34     DATA DIVISION STATEMENTS =     9    
*OPTIONS IN EFFECT*     SIZE = 2097152  BUF = 1048576  LINECNT = 57  SPACE1, FLA
*OPTIONS IN EFFECT*     NODMAP, NOPMAP, NOCLIST,   SUPMAP, NOXREF, NOLOAD,   DEC
*OPTIONS IN EFFECT*       ZWB                                                  
                                                                               
 F64-LEVEL LINKAGE EDITOR OPTIONS SPECIFIED LIST,XREF,MAP                      
          DEFAULT OPTION(S) USED -  SIZE=(65536,38912)                          
IEW0123                                                                        
IEW0143                                                                        
                                                                               
                                             DIAGNOSTIC MESSAGE DIRECTORY      
   IEW0123 ERROR - NO ESD ENTRIES, EXECUTION IMPOSSIBLE.                        
   IEW0143 ERROR - NO TEXT.                                                    
                                                                               
******EOF-TTR=000301************ BOTTOM OF DATA *************16591-BYTES********



I believe these errors are the reason for the COND CODE 0012 when submitting the JCL. If anyone has experience with these type of JCL errors and/or experience with using the emulator, I would greatly appreciate any advice so I can hope move forward learning things related to using mainframe languages and other things as well.

Thanks,
James

Attachments deleted. Job output placed inline.
Do not post attachments - a simple cut and paste will do - using the code tags.

Re: JCL Compile-Link Issue.

PostPosted: Wed Jul 29, 2020 8:36 am
by steve-myers
jrcox wrote:...
DIAGNOSTIC MESSAGE DIRECTORY
IEW0123 ERROR - NO ESD ENTRIES, EXECUTION IMPOSSIBLE.
IEW0143 ERROR - NO TEXT.

First of all, these are NOT JCL related messages. They are messages from the Linkage Editor. They indicate there is no useful input, so it cannot create useful output. As to why there is no input to the Linkage Editor, you most likely have to go back to the Cobol compile step.

I think you will find there was nothing in the Cobol compiler's input data set, though other than that I will not speculate. We do not know what Cobol compiler you tried to use, or the JCL statements in your job - both the job itself AND the cataloged procedure.

Now how do I know these are Linkage Editor messages? Linkage Editor messages are always IEWnnn. JCL messages are usually IEFnnn message codes.

Re: JCL Compile-Link Issue.

PostPosted: Wed Jul 29, 2020 6:53 pm
by Robert Sample
While I haven't used that version of COBOL compiler in a lot of years, the parameters haven't really changed over the years (IBM has added a batch but the old ones don't get changed too much). And DECK,NOLOAD tells COBOL that you want to generate an object deck on the SYSPUNCH DD statement -- which you have DUMMY for -- and NOLOAD tells COBOL that you do NOT want an object deck produced. Based on the error messages in the linkage editor, I suspect NOLOAD took precedence but it doesn't really matter since SYSPUNCH is DUMMY.

Re: JCL Compile-Link Issue.

PostPosted: Wed Jul 29, 2020 7:52 pm
by jrcox
Steve and Robert,

I appreciate the input. I'll go back and work at it some more. Thanks.