MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Override in JCL to SAS step

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
saraswathi
Beginner


Joined: 08 Dec 2006
Posts: 14
Topics: 8

PostPosted: Fri Jun 29, 2007 6:24 am    Post subject: Override in JCL to SAS step Reply with quote

hi,

I need to override a sysin statement in the below JCL.DATA1 need to be overwritten as DATA2.

//FINAL EXEC SAS82LPS
.
.
.
//SYSIN DD DSN=DATA1(&MNAME1),DISP=SHR


Can anyone help me in this?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Jun 29, 2007 7:13 am    Post subject: Reply with quote

assuming that
Code:

//SYSIN DD DSN=DATA1(&MNAME1),DISP=SHR

resides in proc SAS82LPS.

you will need to read this link because as you will find when you read the manual, the STEP name within the PROC is part of the overriding DD statement. Since you did not bother to supply the STEP name, I am saved the trouble of giving you a direct answer; thus the link so that you can learn how to do it in the future.

Add a TYPRUN=SCAN parm to your JOBcard so that you can test your modifications and insure that your override is working without actually having any STEPs execute when you submit your JCL. After you have it right, remove or comment out the TYPRUN parm

have a good weekend.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
saraswathi
Beginner


Joined: 08 Dec 2006
Posts: 14
Topics: 8

PostPosted: Fri Jun 29, 2007 8:56 am    Post subject: Reply with quote

HI,
THANKS FOR YOUR COMMENTS.BUT IT IS NOT WORKING FOR SAS STEPS.
IT IS SHOWING A JCL ERROR OVERRIDDEN STEP NOT FOUND IN PROCEDURE.

THE SAME IS WORKING FOR OTHER UTILITIES!!!
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jun 29, 2007 9:10 am    Post subject: Reply with quote

Again, as dbzTHEdinosauer mentioned, you haven't told us what the PROCSTEP name is. If, for example, it's SAS:

Code:

//SASJOB JOB (...),CLASS=...
//*
// SET MNAME1=SOMEVALUE
//*
//FINAL EXEC SAS82LPS
//FINAL.SAS.SYSIN DD DSN=DATA2(&MNAME1),DISP=SHR


i.e. jobstepname.procstepname.ddname


Last edited by superk on Fri Jun 29, 2007 9:45 am; edited 1 time in total
Back to top
View user's profile Send private message
saraswathi
Beginner


Joined: 08 Dec 2006
Posts: 14
Topics: 8

PostPosted: Fri Jun 29, 2007 9:32 am    Post subject: Reply with quote

hi,
This is my JCL.
//SASJOB JOB (...),CLASS=...
//*
// SET &MNAME1=SOMEVALUE
//*
//PROC1 EXEC PROC1,
//FINAL.SAS.SYSIN DD DSN=DATA2(&MNAME1),DISP=SHR
THIS IS MY CORRESPONDING PROC..
//PROC1 PROC
//FINAL EXEC SAS82LPS
.
.
.
//SYSIN DD DSN=DATA1(&MNAME1),DISP=SHR


the error is INVALID LABEL.
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Fri Jun 29, 2007 9:42 am    Post subject: Reply with quote

If you use the link too the manual that dbz has so kindly given you, there is an example of how to do exactly what you want to do.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jun 29, 2007 9:59 am    Post subject: Reply with quote

With nested PROC's, this is probably how you should handle the override:

Job is unchanged.

PROC PROC1:
Code:

//PROC1 PROC
//FINAL EXEC SAS82LPS
//SAS.SYSIN DD DSN=DATA2(&MNAME1),DISP=SHR


PROC SAS82LPS is unchanged.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Jun 29, 2007 10:29 am    Post subject: Reply with quote

you can't modifiy nested below the invoking nest level.

If DATA2 is going to be modified often, you need to change data2 in PROC SAS82LPS to be a symbolic

or do as superk showed: modify PROC1

nested procs are cool, but rarely have I seen them designed well.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group