How to link PROC in private library?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to link PROC in private library?

Postby chan » Tue Dec 25, 2012 5:27 am

What I'm trying to do is to link/compile/run a simple COBOL program using JCL. I posted a similar thread before but at that moment, I haven't learned about JCL; however this time I've been reading Murach's OS/390 and z/OS JCL.
During this Winter break, I couldn't contact administration people at Marist College, but luckily I found the PROC IGYWCLG under IGY420.SIGYPROC, so I guess the way they update these PROCs base on the number 340->420. What I found inside IGY420.SIGYPROC library was Image
Here is my COBOL program, very simple traditional "Hello World"
 IDENTIFICATION DIVISION.       
 PROGRAM-ID. PROG1.             
                               
 ENVIRONMENT DIVISION.         
                               
 DATA DIVISION.                 
 WORKING-STORAGE SECTION.       
                               
 PROCEDURE DIVISION.           
                               
     DISPLAY "HELLO WORLD".
     GOBACK.                   


And here is my JCL
//KC03G80 JOB MSGLEVEL=(1,1),REGIOM=0M,           
// MSGCLASS=A,CLASS=A,NOTIFY=&SYSUID             
//STEP1 EXEC PGM=IGYWCLG,REGION=250M             
//STEPLIB DD DSN=IGY420.SIGYPROC,DISP=SHR         
//SYSIN DD DISP=SHR,DSN=KC03G80.CHAN.COBOL(PROG1)


From my understanding, to run a private library PROG like IGYWCLG, I need to provide a STEPLIB DD data set which is IGY420.SIGYPROC. Reference:
http://publib.boulder.ibm.com/infocente ... search.htm

But it still failed, and here is the LOG from JES2
1                    J E S 2  J O B  L O G  --  S Y S T E M  S 0 W 1  --  N O
0                                                                             
 18.51.44 JOB08175 ---- MONDAY,    24 DEC 2012 ----                           
 18.51.44 JOB08175  IRR010I  USERID KC03G80  IS ASSIGNED TO THIS JOB.         
 18.51.44 JOB08175  ICH70001I KC03G80  LAST ACCESS AT 18:34:23 ON MONDAY, DECE
 18.51.44 JOB08175  $HASP373 KC03G80R STARTED - INIT 1    - CLASS A - SYS S0W1
 18.51.44 JOB08175  IEW4007I FIND FOR MODULE IGYWCLG  FAILED BECAUSE DIRECTORY ENTRY IS NOT VALID FOR A LOAD MODULE.
 18.51.44 JOB08175  CSV003I REQUESTED MODULE IGYWCLG  NOT FOUND               
 18.51.44 JOB08175  CSV028I ABEND806-04  JOBNAME=KC03G80R  STEPNAME=STEP1     
 18.51.44 JOB08175  IEA995I SYMPTOM DUMP OUTPUT  863                         
    863             SYSTEM COMPLETION CODE=806  REASON CODE=00000004         
    863              TIME=18.51.44  SEQ=47480  CPU=0000  ASID=001A           
    863              PSW AT TIME OF ERROR  070C1000   8142BE8E  ILC 2  INTC 0D
    863                NO ACTIVE MODULE FOUND                                 
    863                NAME=UNKNOWN                                           
    863                DATA AT PSW  0142BE88 - 8400181E  0A0D18FB  180C181D   
    863                AR/GR 0: 9FDCA47A/00001F00   1: 00000000/84806000     
    863                      2: 00000000/00000000   3: 00000000/00000000     
    863                      4: 00000000/00000000   5: 00000000/008E69F8     
    863                      6: 00000000/000000FF   7: 00000000/00000000     
    863                      8: 00000000/008C1150   9: 00000000/0142C390     
    863                      A: 00000000/00000000   B: 00000000/00000000     
    863                      C: 00000000/00000000   D: 00000000/008C1150     
    863                      E: 00000000/84806000   F: 00000000/00000004     
    863              END OF SYMPTOM DUMP                                     
 18.51.44 JOB08175  IEF450I KC03G80R STEP1 - ABEND=S806 U0000 REASON=00000004
 18.51.44 JOB08175  $HASP395 KC03G80R ENDED     
           IEFC653I SUBSTITUTION JCL - MSGLEVEL=(1,1),REGION=0M,MSGCLASS=A,CLASS
         2 //STEP1 EXEC PGM=IGYWCLG,REGION=250M                                 
         3 //STEPLIB DD DSN=IGY420.SIGYPROC,DISP=SHR                           
         4 //SYSIN DD DISP=SHR,DSN=KC03G80.CHAN.COBOL(PROG1)                   
 ICH70001I KC03G80  LAST ACCESS AT 18:34:23 ON MONDAY, DECEMBER 24, 2012       
 IEF236I ALLOC. FOR KC03G80R STEP1                                             
 IEF237I 185A ALLOCATED TO STEPLIB                                             
 IGD103I SMS ALLOCATED TO DDNAME SYSIN                                         
 IEW4007I FIND FOR MODULE IGYWCLG  FAILED BECAUSE DIRECTORY ENTRY IS NOT VALID F
 CSV003I REQUESTED MODULE IGYWCLG  NOT FOUND                                   
 CSV028I ABEND806-04  JOBNAME=KC03G80R  STEPNAME=STEP1                         
 IEA995I SYMPTOM DUMP OUTPUT                                                   
 SYSTEM COMPLETION CODE=806  REASON CODE=00000004                               
  TIME=18.51.44  SEQ=47480  CPU=0000  ASID=001A                                 
  PSW AT TIME OF ERROR  070C1000   8142BE8E  ILC 2  INTC 0D                     
    NO ACTIVE MODULE FOUND                                                     
    NAME=UNKNOWN                                                               
    DATA AT PSW  0142BE88 - 8400181E  0A0D18FB  180C181D                       
    AR/GR 0: 9FDCA47A/00001F00   1: 00000000/84806000                           
          2: 00000000/00000000   3: 00000000/00000000                           
          4: 00000000/00000000   5: 00000000/008E69F8                           
          6: 00000000/000000FF   7: 00000000/00000000                           
          8: 00000000/008C1150   9: 00000000/0142C390                           
          A: 00000000/00000000   B: 00000000/00000000                           
          C: 00000000/00000000   D: 00000000/008C1150                           
          E: 00000000/84806000   F: 00000000/00000004                           
  END OF SYMPTOM DUMP                                                           
 IEF472I KC03G80R STEP1 - COMPLETION CODE - SYSTEM=806 USER=0000 REASON=00000004
 IEF285I   IGY420.SIGYPROC                              KEPT                   
 IEF285I   VOL SER NOS= VTIGYG.                                                 
 IGD104I KC03G80.CHAN.COBOL                           RETAINED,  DDNAME=SYSIN   
 IEF373I STEP/STEP1   /START 2012359.1851                                       
 IEF032I STEP/STEP1   /STOP  2012359.1851                                       
         CPU:     0 HR  00 MIN  00.01 SEC    SRB:     0 HR  00 MIN  00.00 SEC   
         VIRT:     4K  SYS:   256K  EXT:        0K  SYS:    10252K             
 IEF375I  JOB/KC03G80R/START 2012359.1851                                       
 IEF033I  JOB/KC03G80R/STOP  2012359.1851                                                                   
0------ JES2 JOB STATISTICS ------                                           
-  24 DEC 2012 JOB EXECUTION DATE                                             
-            5 CARDS READ                                                     
-           74 SYSOUT PRINT RECORDS                                           
-            0 SYSOUT PUNCH RECORDS                                           
-            4 SYSOUT SPOOL KBYTES                                           
-         0.00 MINUTES EXECUTION TIME                                         
         1 //KC03G80R JOB MSGLEVEL=(1,1),REGION=0M,                           
           // MSGCLASS=A,CLASS=A,NOTIFY=&SYSUID                               


What I noticed was this line
IWEW4007I FIND FOR MODULE IGYWCLG FAILED BECAUSE DIRECTORY ENTRY
IS NOT VALID FOR A LOAD MODULE

But IGYWCLG should be a standard PROC across most z/OS configuration, so what could cause this error? I think I might understand it wrongly about how to use private load library, so could anyone shed me some lights? Thanks in advance.
chan
 
Posts: 10
Joined: Wed Dec 19, 2012 3:00 pm
Has thanked: 1 time
Been thanked: 0 time

Re: How to link PROC in private library?

Postby Robert Sample » Tue Dec 25, 2012 6:40 am

You specified EXEC PGM= which is reserved for use with programs and only with programs. You should have coded either EXEC PROC=IGYWCLG or EXEC IGYWCLG (since the PROC= will be assumed if not present). And a PROCLIB cannot be used as a STEPLIB.

You need to spend a LOT more time reading -- a PROC is a group of JCL statements that execute one -- or more -- programs to achieve some goal. A program is compiled into an object module and then linked into a load module; the program can then be executed through JCL in batch or interactively through TSO. The title of your post is nonsensical -- a PROC cannot be compiled or linked since it represents nothing but JCL. Only programs can be linked.

IGY420 indicates your site is most likely running the V4R2 (version 4 release 2) of the IBM COBOL compiler.

Note that IGYWCLG may not be a usable procedure at this point. Depending upon the site, it may have been customized to site standards and thus be usable, but it may have been installed as delivered by IBM, in which case it is quite possible that the procedure has references to data sets that do not even exist on the site. If you change your JCL and the job fails with a data set error, be aware that only someone working at that site -- which probably does NOT include anyone on this forum -- could possibly help you further.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How to link PROC in private library?

Postby chan » Tue Dec 25, 2012 7:39 am

@Robert: Thanks a lot. I think I need more reading...! It was in fact a PROC which must be specified either PROC= or (blank).
chan
 
Posts: 10
Joined: Wed Dec 19, 2012 3:00 pm
Has thanked: 1 time
Been thanked: 0 time

Re: How to link PROC in private library?

Postby steve-myers » Tue Dec 25, 2012 9:59 am

A cataloged procedure, as Mr. Sample says, is just a collection of JCL statements that are - this is important - a member in a PDS. There are three ways to use the procedure
  • It can be in a PDS known to JES as a system PROCLIB.
  • You can specify the PDS in a JCLLIB control statement.
    //jobname  JOB ....
    //label JCLLIB ORDER=(A PDS)
    //label   EXEC xxx
  • You can define the procedure in your job.
    //jobname  JOB ....
    //XXX     PROC
    //STEP1   EXEC PGM=xxx
    //add      DD  ...
    //        PEND
    //RUN     EXEC XXX
Most likely, the Cobol procedures are in a system PROCLIB. It's quite easy to obtain the actual PDS. Just run a job like this.
//jobname  JOB ....,TYPRUN=SCAN
//label   EXEC xxx
In the JES output for the job is a message telling you the library containing the PROCLIB data set where the procedure was found. You cannot alter this library, but you usually can view it at your leisure.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post