Passing parms to a cobol-db2 program



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

Passing parms to a cobol-db2 program

Postby ansh_4702 » Tue Sep 08, 2009 5:55 pm

Hello,

I was just thinking if there is any way to pass the parms to a cobol-db2 program in the jcl itself (i.e. not through a outside member/ctlcard). Currently i am using utility IKJEFT01 and passing the parms through a ctlcard where I have given the PLAN and other things...

I want to know if we can pass the parms in the same jcl sothat I would not have to do chages in the ctlcard. Is there any utility for that ?
Please help.
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Passing parms to a cobol-db2 program

 

Re: Passing parms to a cobol-db2 program

Postby dick scherrer » Wed Sep 09, 2009 3:17 am

Hello,

Something like this help?
PROFILE    PREFIX(ANV)           
DSN SYSTEM(DB2P) RETRY(0) TEST(0)   
RUN PROGRAM(MYPGM) PLAN(MYPLAN) -
  PARMS('0001,/NOSTAE,NOSPIE') -   
  LIB('ANV.PROD.LOAD') -       
                                   
END


For more complete info, look here:
http://publibz.boulder.ibm.com/cgi-bin/ ... /5.1.3.4.3
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Passing parms to a cobol-db2 program

Postby ansh_4702 » Wed Sep 09, 2009 10:55 am

Hi Dick,

Thanks so much for your quick response, but I am already having the code you mentioned in my ctlcard...what I meant to say earlier that currently this job has been setup as per the IDMS....now we have converted IDMS to DB2...so the subsequent changes needs to be done in the jobs as well. We were using the same IDMS program in multiple jobs with diffrent Parms. Now since that program has been converted to DB2, I have modified all the jobs which are using this program in following way:
//LCI60GAB EXEC PGM=IKJEFT01,REGION=0M
----------steplib/I-O dataset details--------
//*
//SYSTSIN  DD DSN=IDMSDB2.CTLCARD(60PAA),DISP=SHR 
//*


Ctlcard is having following content:
DSN SYSTEM(DB2)                                                       
RUN PROGRAM(LCI60PAA) PLAN(LCIBT0D) PARM('PROD,TXNSLIMIT=15000,GNB=Y')
END                                                                   


But the problem is all the jobs are using the same program LCI60PAA, but the parms are diffrent. I dont want to put the ctlcard code in the JCL itself (since not a std way of coding). So I was thinking if there is any way where i can use the same ctlcard for all the jobs and pass the parms thru JCL only ? This will reduce the no of ctlcards that i wud have to move in to production.

Please help.
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Passing parms to a cobol-db2 program

Postby dick scherrer » Thu Sep 10, 2009 1:28 am

Hello,

No, i'm not aware of any way to "customize" ctlcard info "on the fly" via a parm.

You might consider breaking up the ctlcard into 3 parts. The "second" part would be a unique member for each execution and the 1st/3rd parts common. It owuld probably be just as much "extra" work to set this up as to promote the needed ctlcards. . . 8-)
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Passing parms to a cobol-db2 program

Postby ansh_4702 » Thu Sep 10, 2009 11:25 am

Thanks Dick.....
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post