DATA Step, Macro, Functions and more

Override ddname in a proc from a jcl

Reply
N/A
Posts: 0

Override ddname in a proc from a jcl

Hi all,

We have a scenario, wherein it is required to override the DDname in a proc from the JCL. Sample jcl and proc is as given below. I have tried three different ways to override the ddname, but none of them are working.

I cannot use symbolics as there are some other constraints with it. This problem is only with the step executing SAS program, for any other proc I will be able to override the DDname. Please let me if there is any way to overcome this issue.

JCL:

------------------------------
//STEPA EXEC PROC=RAPROC
//PSTEPC1.OUT1 DD DSN=HLQ1.TEST.FILE=(,CATLG) ---> Not working
//OUT1 DD DSN=HLQ1.TEST.FILE,DISP=(,CATLG) ---> Not working
//RAPROC.PSTEPC1.OUT1 DD DSN=HLQ1.TEST.FILE,DISP=(,CATLG) ---> Not working
------------------------------
------------------------------

PROC:RAPROC

//PSTEPC1 EXEC SAS, /* This step executes a sas program */
// PARM='SYSPARM=''&RPTNAME'''
//OMLIST DD DSN=&&RESULTS,DISP=(OLD,DELETE)
//OUT1 DD DUMMY
//SYSIN DD DSN=ABC.DEF.GHI(AAAAA),DISP=SHR
Super Contributor
Super Contributor
Posts: 3,174

Re: Override ddname in a proc from a jcl

Posted in reply to deleted_user
Yes, this is a "feature" (pronounced limitation) of nested JCL PROCs, especially worse when you have multiple job-steps within a PROC. Check your JCL manual for specifics on job-step overrides. Unfortunately, what you are attempting to accomplish is not possible with nested JCL PROCs.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Override ddname in a proc from a jcl

Thanks Scott, I learnt it now.... Message was edited by: sasdev
Ask a Question
Discussion stats
  • 2 replies
  • 1362 views
  • 0 likes
  • 2 in conversation