DB2/COBOL Compiler JCL



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

DB2/COBOL Compiler JCL

Postby GUI1504 » Wed Dec 01, 2010 5:10 pm

Hello guys, i need a COBOL/DB2 compiler JCL, so i search on the web and i've got these one, but i dont understand the points and what to put into them...

//DB2COMP (XXX,XXX),'COMPILE JCL',                           
//             CLASS=A,MSGCLASS=A,NOTIFY=&SYSUID                     
//********************************************************************
//* COMPILATION, LINK EDIT AND THE BIND STEP FOR A COBOL DB2 PROGRAM *
//* WILL BE DONE BY SUBMITTING THIS JOB.                             *
//* THE DB2 REGIONS AND CORRESPONDING PARAMETERS NEEDS TO BE CHANGED *
//* WITH RESPECT TO THE PROGRAM                                      *
//********************************************************************
//*                 PRECOMPILE DB2 PROGRAM                           *
//*--------------  LOCATION OF DBRM LIBRARY -------------------------*
//********************************************************************
//PC       EXEC PGM=DSNHPC,                                           
//             PARM='HOST(COB2),APOST,SOURCE',                       
//             REGION=4096K                                           
//DBRMLIB  DD  DISP=SHR,                                             
//             DSN=DEV.SURESH.DBRM(DB2PROG)    <------------------------ (1)                   
//STEPLIB  DD  DISP=SHR,                                             
//             DSN=SYSX.DB2.XXX.XXXXX 
//******************************************************************** 
//*SYSIN -----------INPUT COBOL DB2 PROGRAM LOCATION-----------------* 
//******************************************************************** 
//SYSIN    DD  DISP=SHR,                                               
//             DSN=DEV.SURESH.SRC(DB2PROG)     <----------------------  (2)                     
//SYSCIN   DD  DISP=(MOD,PASS),                                         
//             DSN=&&TEMP,                                           
//             SPACE=(800,(500,500)),                                   
//             UNIT=SYSDA                                               
//******************************************************************** 
//*                          DCLGEN MEMBER LOCATION                  * 
//*SYSLIB-----------------INPUT SOURCE LIBRARY FOR SQL---------------* 
//******************************************************************** 
//SYSLIB   DD  DISP=SHR,                                               
//             DSN=DEV.SURESH.DCL               <---------------------- (3)                         
//         DD  DISP=SHR,                                               
//             DSN=DEV.SURESH.CPY                             
//SYSPRINT DD  SYSOUT=T                                               
//SYSTERM  DD  SYSOUT=T                                               
//SYSUDUMP DD  SYSOUT=*                                               
//SYSUT1   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//SYSUT2   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//*                                                                   
//********************************************************************
//*                         COMPILATION                              *
//********************************************************************
//*                                                                   
//COB      EXEC PGM=IGYCRCTL,                                         
//             COND=(4,LT,PC),                                         
//             PARM=('SIZE(4000K),BUFSIZE(32760),LIST,LIB,MAP,OBJECT',
//             'DATA(31),XREF,RENT'),                                 
//             REGION=4M
//STEPLIB  DD  DISP=SHR,                                               
//             DSN=XXXX.XXXXXX                                       
//SYSIN    DD  DISP=(OLD,DELETE),                                     
//             DSN=&&TEMP                                           
//SYSLIN   DD  DISP=(MOD,PASS),                                       
//             DSN=&&LOADTMP,                                         
//             SPACE=(800,(500,500)),                                 
//             UNIT=SYSDA                                             
//********************************************************************
//*--------------SOURCE LIBRARIES FOR COBOL DB2 CODE (COPY LIBRARIES)*
//********************************************************************
//SYSLIB   DD  DISP=SHR,                                               
//             DSN=DEV.SURESH.DCL              <-----------------  (4)
//         DD  DSN=DEV.SURESH.CPY,DISP=SHR
//SYSPRINT DD  SYSOUT=*                                               
//SYSUDUMP DD  SYSOUT=*                                               
//SYSUT1   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//SYSUT2   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//SYSUT3   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//SYSUT4   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//SYSUT5   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//SYSUT6   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//SYSUT7   DD  SPACE=(800,(500,500),,,ROUND),                         
//             UNIT=SYSDA                                             
//*                                                                   
//*                                                                     
//******************************************************************** 
//*                         LINK EDIT                                * 
//******************************************************************** 
//*                                                                     
//LKED     EXEC PGM=IEWL,                                               
//             COND=((4,LT,COB),(4,LT,PC)),                             
//             PARM='XREF'                                             
//SYSLIB   DD  DISP=SHR,                                               
//             DSN=SXXX.SXXXXXXX                                       
//         DD  DISP=SHR,                                               
//             DSN=XXXX.DB2.XXX.XXXXLOAD                               
//         DD  DISP=SHR,                                               
//             DSN=SYS1.VSCLLIB                                         
//SYSLIN   DD  DISP=(OLD,DELETE),                                       
//             DSN=&&LOADTMP                                           
//*        DD  DDNAME=SYSIN                                             
//******************************************************************** 
//*----------------LOCATION OF LOAD LIBRARY--------------------------* 

//SYSLMOD  DD  DISP=SHR,                                               
//             DSN=DEV.SURESH.LOADLIB(DB2PROG)    <------------  (5)                   
//SYSPRINT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//SYSUT1   DD  SPACE=(1024,(50,50)),                                   
//             UNIT=SYSDA                                               
//*                                                                     
//******************************************************************** 
//*               BIND - BIND THE DB2 PACKAGE                        * 
//******************************************************************** 
//BIND     EXEC PGM=IKJEFT01,                                           
//             COND=(4,LT),                                             
//             REGION=4096K                                             
//STEPLIB  DD  DISP=SHR,                                               
//             DSN=XXX4.DB2.XXXX.XXXXLOAD                               
//DBRMLIB  DD  DISP=SHR,                                               
//             DSN=DEV.SURESH.DBRM(DB2PROG)    <---------------  (6)       
//SYSPRINT DD  SYSOUT=*                                                 
//SYSTSPRT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//SYSTSIN  DD  *                                                       
DSN SYSTEM (DEVDB   )                                                       
BIND  MEMBER    (DB2PROG) -                                             
      PACKAGE   (PACKG11) -                                           
      LIBRARY   ('DEV.SURESH.DBRM') -         <---------------- (7)                       
      ACTION    (REP) -                                                 
      ISOLATION (CS) -                                                 
      VALIDATE  (BIND)-                                                 
      RELEASE   (COMMIT) -     
      OWNER     (SURESH) -                                             
      QUALIFIER (DEVQUALI)                                               
END                                                                     
/*                                                                     
**************************** Bottom of Data ****************************



(1)  -  When we precompiled, precompiler will create the DBRM, it will
        be placed in the pds specified here.

(2)  -  Location of COBOL-DB2 program

(3)  -  Needs to speficiy DCLGEN member locations

(4)  -  Needs to specify DCLGEN and COPYBOOK locations here

(5)  -  Load module location, load module will be created here. this
        location needs to be given in run jcl.

(5) & (6) - specify the location of DBRM, ( same location used in step1 ).


I'm new at DB2 world and need some help, btw I have a Database, Table Space and a Table created.
GUI1504
 
Posts: 28
Joined: Fri Sep 03, 2010 10:40 pm
Location: Campinas, SP - Brazil
Has thanked: 0 time
Been thanked: 0 time

Re: DB2/COBOL Compiler JCL

Postby Robert Sample » Wed Dec 01, 2010 5:39 pm

Your first problem is that you are not following your site standards for DB2 compiles. You should contact your site support group and find out how to compile the program using your site's standard procedures. Using JCL you found on the web to do this may well cause you serious problems.
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: DB2/COBOL Compiler JCL

Postby GUI1504 » Wed Dec 01, 2010 5:50 pm

Robert Sample wrote:Your first problem is that you are not following your site standards for DB2 compiles. You should contact your site support group and find out how to compile the program using your site's standard procedures. Using JCL you found on the web to do this may well cause you serious problems.


I'm on a training, a 'non-oficial' program, but will be. I receive this task justo to improve my skills in COBOL/DB2. And, with my program already coded, I need a compiler
GUI1504
 
Posts: 28
Joined: Fri Sep 03, 2010 10:40 pm
Location: Campinas, SP - Brazil
Has thanked: 0 time
Been thanked: 0 time

Re: DB2/COBOL Compiler JCL

Postby Akatsukami » Wed Dec 01, 2010 6:42 pm

So, go to your site support group (unless, as seems to be distressingly common these days, you are the site support group) and get the procedures (submit JCL, run a script, choose an ISPF option, etc.) to perform a COBOL/DB2 compile, link-edit, and package bind.

What Mr. Sample hints at I will make explicit: if you are found using JCL downloaded from the Internet, whose true purpose you do not know and apparently cannot understand, there is a strong possibility that you will be fired and blacklisted, your career over before it begins.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: DB2/COBOL Compiler JCL

Postby GUI1504 » Wed Dec 01, 2010 6:48 pm

But i don't have any restriction by now. After I will, I'm a Test Mainframe, nothing oficial
GUI1504
 
Posts: 28
Joined: Fri Sep 03, 2010 10:40 pm
Location: Campinas, SP - Brazil
Has thanked: 0 time
Been thanked: 0 time

Re: DB2/COBOL Compiler JCL

Postby Akatsukami » Wed Dec 01, 2010 10:25 pm

And if I were evil enough to tell you to do something that proved destructive, what would your defense be? "Oh, I am only a student, it is not my fault that I took a tip from an anonymous poster on an Internet help forum and destroyed the production system in consequence"?

We don't seem to have a "disgusted" smilie, so assume that I have appended one or more.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: DB2/COBOL Compiler JCL

Postby prino » Wed Dec 01, 2010 10:37 pm

The guy is using the Fan DeZhi system, which does not have a site-support group. I'm not sure why he doesn't post in a more appropriate forum (i.e. the Dezhi Systems support site), although I guess because he is one of many people sharing one userid...
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: DB2/COBOL Compiler JCL

Postby NicC » Wed Dec 01, 2010 11:45 pm

Well, if he is on dezzi he can look at the forum there for info regarding his requirements and if he is a good, intelligent and thoughtful guy he would be able to find some id that has what he wants - mine does not!
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post