Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Overriding a SAS DDname

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Fri May 20, 2005 4:21 am    Post subject: Overriding a SAS DDname
Reply with quote

Hi,

I wanted to override a dataset in the SAS step. I've a proc with STEP010 as the SAS program(STEP010 EXEC K9337SAS). Here there is a DDNAME DD1. In my test job I want to override this DDname with a test dataset name. But I'm not able to do this as we normally do for other steps. i.e, if I use
Quote:
STEP010.DD1 DD DSN=<new dataset name>,
it gives me a JCL error saying STEP010 not found. As a temporary solution, I've changed the proc directly. But I need to do this very often and hence would like to know if there is any solution for this.

Thanks & Regds,
Ramya
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri May 20, 2005 5:21 am    Post subject: Re: Overriding a SAS DDname
Reply with quote

Changing the proc the way you did IS the only solution. As has been pointed out time and again in other posts, you can't provide an override for a nested proc from the job. The override can only be provided by the caller of the nested proc (K9337SAS) , in your case your proc.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Fri May 20, 2005 2:32 pm    Post subject:
Reply with quote

If I well understand, the override you are doing is pointed to the name of the step in your jcl!(STEP010 EXEC K9337SAS)
For a well override you must specify the stepname of your proc and not that in your jcl!
Assume that proc K9337SAS has within one step:
Code:
//K9337SAS PROC
//SAS810 EXEC PGM=SASXA1
//DD01 DD DISP=SHR,DSN=DSNSTD

to override the name of your DD you must use this:
Code:
//STEP010 EXEC K9337SAS
//SAS810.DD01 DD DISP=SHR,DSN=DSNNEW
Back to top
View user's profile Send private message
David P

Active User


Joined: 11 Apr 2005
Posts: 106
Location: Cincinnati Ohio

PostPosted: Tue May 24, 2005 5:41 pm    Post subject:
Reply with quote

Hi Ramya,

I believe in your case the following override in your PROC should work...

//STEP10.K9337SAS.DD1 DD DSN=<new data set name >,DISP=.......

Please check this as now on my system SAS is not installed but I remember doing this long back.

regards,
David.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue May 24, 2005 8:56 pm    Post subject: Re: Overriding a SAS DDname
Reply with quote

By the way, in my opinion, I think it's a horribly bad JCL coding standard to use step names like "//STEPxxx" in a PROC. I would imagine that this would make production support of the job(s) more difficult down the road, instead of using a standard like "//STEPxxx" for the jobs and "//PROCxxx" for the proc's.
Back to top
View user's profile Send private message
Green_Star

New User


Joined: 13 Oct 2006
Posts: 7

PostPosted: Thu Aug 18, 2011 1:33 am    Post subject: Override a SAS DD name in JCL
Reply with quote

Hello,

I wanted to override a dataset in the SAS step. I've a proc with PPSCO20 as the SAS program(PPSCO20 EXEC SAS). Here I have a SYSIN DD DSN=DDname. In my test job I want to override this DDname with a test dataset name. But I'm not able to do this as we normally do for other steps. i.e, if I use
Quote:
//PPSCO20.SYSIN DD DSN=Datasetname

it doesn't work. The error I get is
Quote:
IEFC023I SYSIN OVERRIDE ERROR

The issues is similar to Ramya's.I tried using responses above but didn't work either. One of our senior designer has been trying to figure out to overide a SAS proc since long but could find one. So when I saw this post I got curious if anyone has solution for this.

Please advise if anyone has a solution.

Thanks,
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Aug 18, 2011 1:49 am    Post subject: Reply to: Overriding a SAS DDname
Reply with quote

Can you post the full JCL and the messages output?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8189
Location: East Dubuque, Illinois, USA

PostPosted: Thu Aug 18, 2011 3:01 am    Post subject:
Reply with quote

From APAR OA06500:
Quote:
Error description

The following procedure receives message IEFC023I...

//TESTPROC PROC
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//STEP2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// PEND
//*
//RUN EXEC TESTPROC
//STEP1.SYSIN DD *
LISTC ENT('SYS1.PARMLIB')
//STEP2.SYSIN DD *
LISTC ENT('SYS1.PARMLIB')
//*

Local fix

Either remove the SYSIN DD DUMMY or add it to all previous Job
Steps.
If this isn't your issue, you'll need to post the JCL expansion and full set of output messages as Bill said.
Back to top
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Thu Aug 18, 2011 8:14 pm    Post subject: Re: Overriding a SAS DD Name
Reply with quote

Ramya,

Take a look at the following 2007 NESUG paper
Passing PARM data from JCL to SAS
http://www.nesug.org/proceedings/nesug07/po/po13.pdf

You are not using traditional JCL override method but instead you are using macro variables. On the EXEC card you would supply the name of your data set to the macro variable. I hope this helps.

Charles Wolters
Back to top
View user's profile Send private message
Green_Star

New User


Joined: 13 Oct 2006
Posts: 7

PostPosted: Thu Aug 18, 2011 11:56 pm    Post subject: Overriding a SAS DDname
Reply with quote

Hi,

My JCL is as follows. Our company standards are to define all required steps in a proc rather than JCL. Each jcl calls one or many procs.
Quote:

//JOBNAME JOB (SP-AP93),AP,CLASS=P,MSGCLASS=A
/*JOBPARM R=XM04X,PROCLIB=PROC63
//*LOGONID XXX

//XXXXSCO EXEC XXXXSCO,
// CNTLDSN='XXX.XXX.XXXXX.CTLCARDS',
// FTPPARM='SERVER',
// FTPRCHK='XXXX',
// GEN1='(+1)',
// ILVL1='PAP',
// ILVL2='XXXXXX',
// MODL=PAP.MODEL,
// OLVL1='PAP',
// OLVL2='XXXXXX',
// XXSCO20='XXSCO20',
// SASDSN='XXX.XXX.XXXXX.SAS',
// UNIT10A='PROD,SPACE=(TRK,(5,1),RLSE)',

My proc is as follows, I have included only the required part instead of copying the proc.
Quote:
//XXSCO20 EXEC SAS,
// COND=(0,NE)
//SYSIN DD DSN=&SASDSN(XXXXDSN),
// DISP=SHR
//FTPCRDI DD DSN=&CNTLDSN(&XXSCO20),
// DISP=SHR
//FTPCRDO DD DSN=out dd name,
// DISP=(NEW,CATLG,DELETE),
// UNIT=&UNIT20A,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//ABORTMSG DD SYSOUT=*

I would like to run the JCL will the following overrides in test before implementing
Quote:

//XXSCO20.FTPCRDI DD *
cd xyzzzz
put 'XXX.XXXXXX.XXX.REPORT(0)' test_file@.csv
quit
/*
//XXSCO20.SYSIN DD DSN=YYYY.YYYY.YYYY(XXXDSN)


Please let me know of any of you have ideas regarding this issue.
Thanks in advance
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1782
Location: Bloomington, IL

PostPosted: Fri Aug 19, 2011 12:15 am    Post subject: Re: Overriding a SAS DDname
Reply with quote

Green_Star wrote:
Hi,

My JCL is as follows. Our company standards are to define all required steps in a proc rather than JCL. Each jcl calls one or many procs[...]I would like to run the JCL will the following overrides in test before implementing

You can't. You are not supposed to do so. Either your company's standards are badly written, or you are misinterpreting them (note that, in your example, SAS is a proc), or both.
Back to top
View user's profile Send private message
Green_Star

New User


Joined: 13 Oct 2006
Posts: 7

PostPosted: Fri Aug 19, 2011 12:28 am    Post subject:
Reply with quote

Hi Akatsukami,

I know SAS is a proc. I wanted to know it a SAS proc step can be overridden in a JCL. If it can't be done that's fine. If there is a way to do that then it I would like to know.

Thanks,
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1782
Location: Bloomington, IL

PostPosted: Fri Aug 19, 2011 1:30 am    Post subject:
Reply with quote

The examples in z/OS V1R12.0 MVS JCL Reference seem fairly clear that what you want to do cannot be done.

As I said, SAS is itself a proc. If your shop's standards require you to encapsulate SAS in another proc, then those standards do not conform to reality (feel free to tell them that I said so). Otherwise, do not attempt to do so.
Back to top
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Fri Aug 19, 2011 2:17 am    Post subject: Re: Overriding a SAS DD Name
Reply with quote

GREEN STAR:

Looking at your code I initially did not realize that your DD name that you want to override refers to your SAS source code. That being the case I think you can use the SASPGM symbolic parameter along with the PARM statement.

First replace &SASDSN(XXXXDSN) with the SAS symbolic parameter &SASPGM

Second, add the following to your EXEC SAS statement
PARM=('SYSPARM="YYYY.YYYY.YYYY(XXXDSN)" ')

You can then delete your
//XXSCO20.SYSIN DD DSN=YYYY.YYYY.YYYY(XXXDSN) statement

The PARM statement will provide the SASPGM parameter value to SAS.

Charles Wolters
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts output DDname JESMSGLG job during exe... italo_pm TSO/ISPF 16 Tue Jun 21, 2016 11:13 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us