View previous topic :: View next topic
|
Author |
Message |
sukumar.pm
New User
Joined: 20 Dec 2007 Posts: 27 Location: chennai
|
|
|
|
I have a db2 program in my proc. That db2 program uses a file OLESON. I want to override that file OLESON from my JCL.
I've tried with the following.
Code: |
//A010087B EXEC A010087B,
// DCRDSNI=A.SD,
// DCRDSNO=A.SD,
// INTDSN1=A.SA.B5603.ECMINXS4.CLUSTER,
// ENDLIB=QUAL,
// CARDLIB=QUAL,
// DBLIB=QUAL,
// DBSUBSY=DBQ1
//SORT060.SYSUDUMP DD SYSOUT=*
//SORT062.SYSUDUMP DD SYSOUT=*
//SORT070.SYSUDUMP DD SYSOUT=*
//STEP080.SYSABOUT DD SYSOUT=*
//STEP080.B6505I4 DD DISP=SHR,DSN=Q00708.DATE.OLESON
|
here B6505 is the DB2 program.
I'm able to override file in non db2 programs.
Thanks
sukumar |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Your code looks correct.
//PROCSTEPNAME.DDNAME DD ....
is the correct way to code a DD override.
If STEP080 is the PROC STEPNAME and B6505I4 is the DD name, your override should be working properly. |
|
Back to top |
|
|
sukumar.pm
New User
Joined: 20 Dec 2007 Posts: 27 Location: chennai
|
|
|
|
thank you for your reply..
if the file is being used in the non db2 program,my jcl gently overrides the file.in my case, it is a DB2 program.so endup in a jcl error.the error is step080 is not found. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
can you show the proc or job output from failed job.
Gerry |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Hi All,
I am posting my problem in the same post instead of starting new one am also facing the same probelm.
I have also faced the same situation in case of DB2 program. I am using DSNUPROC utility in procedure and the DD name was used in proc was DSNUPROC.SYSREC00.
I wanted to override this step from JCL. Stepname in PROC for DSNUPROC utility was LOADSTEP.
I have provided following statement in JCL to override.
//LOADSTEP.DSNUPROC.SYSREC00 DD DSN=...., DISP=...
But this JOB was giving JCL error by stating INVALID LABELNAME.
PROC looks like below.
Code: |
//LOADSTEP EXEC DSNUPROC
//DSNUPROC.SYSREC00 DD DISP=(OLD,KEEP,KEEP),
// DSN=A.B.C.LOAD,
// SPACE=(CYL,(1000,1000),RLSE) |
JCL has been written as below.
Code: |
//LOADSTEP.DSNUPROC.SYSREC00 DD DISP=...,DSN=.... |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
as mentioned earlier, to over-ride a DDname in a procedure, you need to know the DDname and the step name in which it is used inside the procedure. When you code
//stepname.ddname DD ...
in your JCL, it causes JES to insert (add or over-ride) the DDname into
the specified step inside the PROC. The resulting merged JCL is placed
in the job queue and executed.
Gerry |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
ksk, you need to review the rules for Nested Procedures.
It's not possible to do what you're attempting to do. |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
Here is an example which i have tested and worked fine.
Code: |
PROC
//TEMP5 PROC (Proc is saved as TEMP5)
//STEP010 EXEC PGM=SORT
//*
//SORTIN DD DSN=XXXXX.XXXXX.ITM.MOVE.INPUT,
// DISP=SHR
//SORTOUT DD DSN=XXXXX.XXXXX.MOVE.ITEM.FILE9,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(30,5)),
// UNIT=SYSDA,
// DCB=(DSCB1,RECFM=FB,LRECL=129)
//*
Main JCL
//MAINJCL JOB (TDEV,TST),'XXXXX',MSGCLASS=9,
// CLASS=H,NOTIFY=A027104,TIME=1440
// JCLLIB ORDER=A027104.DI.FALL07.WIP.JCLS
//*
//STEP011 EXEC TEMP5 (Name of the PROC)
//STEP010.SORTIN DD DSN=XXXXX.XXXXX.ITM.MOVE.INPUT1
//*
//SYSIN DD *
SORT FIELDS=COPY
/*
//
XXXXX.XXXXX.ITM.MOVE.INPUT has been overridden by
XXXXX.XXXXX.ITM.MOVE.INPUT1
|
|
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Hi Kevin,
Thanks very much for your information.
If I want to override this already overrode dataset thru JCL, is there any other way to do it?
Because I don't want change the PROC whcih has DSNUPROC.SYSREC00 statement. I want to override this dataset with my own dataset in JCL and test it.
KSK |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Sri -
how does your jcl relate to the question? What you posted is rather "normal" and works many places. The "problem" is not like your solution. . .
KSK -
You might consider a test proc of the same name and put it in a different proclib for your testing. |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Dick,
Thanks for the solution.
Sri,
Your solution is for normal cases but my requirement is different and override is not possible in my case as explained by Kevin.
Thanks,
KSK |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
d |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
ksk wrote: |
Dick,
Thanks for the solution.
Sri,
Your solution is for normal cases but my requirement is different and override is not possible in my case as explained by Kevin.
Thanks,
KSK |
sorry dick n KSK i misunderstood the post |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Sri,
Not a problem
Misunderstandings do happen and we try to follow up.
d |
|
Back to top |
|
|
sukumar.pm
New User
Joined: 20 Dec 2007 Posts: 27 Location: chennai
|
|
|
|
hi all,
thanks for ur reply.
To override the file which is used in the non-db2 program in the PROC,
put this in JCL,
//PROCSTEPNAME.DDNAME DD DSN=<DATASET NAME>
it works fine.it overrides the file given in the PROC.
To override the file which is used in the db2 program in the PROC,
put this in JCL,
//PROCSTEPNAME.DB2BATCH.DDNAME DD DSN=<DATASET NAME>
try this..this might be working.
Thanks!
Sukumar |
|
Back to top |
|
|
sukumar.pm
New User
Joined: 20 Dec 2007 Posts: 27 Location: chennai
|
|
|
|
Hi KSk,
i think we should not directly use DSNUPROC.you take any job which ran successfully.after the run,you will be getting the expanded JCL in the spool.you try to get the stepname from corresponding utility you used to execute. that stepname should be used instead of DSNUPROC..
try this..
Sukumar |
|
Back to top |
|
|
|