BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
deleted_user
Not applicable
Thanks Scott, I learnt it now.... Message was edited by: sasdev

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 4114 views
  • 0 likes
  • 2 in conversation