IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Overriding a SAS DDname


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Fri May 20, 2005 5:21 am
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
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
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

Global Moderator


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

PostPosted: Tue May 24, 2005 8:56 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 18, 2011 1:49 am
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 18, 2011 3:01 am
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
Reply with quote

Ramya,

Take a look at the following 2007 NESUG paper
Passing PARM data from JCL to SAS
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
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: 1788
Location: Bloomington, IL

PostPosted: Fri Aug 19, 2011 12:15 am
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
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: 1788
Location: Bloomington, IL

PostPosted: Fri Aug 19, 2011 1:30 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How can I find the DDname of a file u... CICS 10
No new posts ADR324E-VOL/DATASET SPECIFIED BY DDNA... JCL & VSAM 6
No new posts AN OVERRIDE MAY NOT TARGET OVERRIDING... JCL & VSAM 1
No new posts Read a file dynamically without the d... COBOL Programming 4
No new posts INVALID RECFM FOR DDNAME SYSLIN AND C... All Other Mainframe Topics 7
Search our Forums:

Back to Top