Page 1 of 1

Passing parms to a cobol-db2 program

PostPosted: Tue Sep 08, 2009 5:55 pm
by ansh_4702
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.

Re: Passing parms to a cobol-db2 program

PostPosted: Wed Sep 09, 2009 3:17 am
by dick scherrer
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

Re: Passing parms to a cobol-db2 program

PostPosted: Wed Sep 09, 2009 10:55 am
by ansh_4702
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.

Re: Passing parms to a cobol-db2 program

PostPosted: Thu Sep 10, 2009 1:28 am
by dick scherrer
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-)

Re: Passing parms to a cobol-db2 program

PostPosted: Thu Sep 10, 2009 11:25 am
by ansh_4702
Thanks Dick.....