View previous topic :: View next topic |
Author |
Message |
saraswathi Beginner
Joined: 08 Dec 2006 Posts: 14 Topics: 8
|
Posted: Fri Jun 29, 2007 6:24 am Post subject: Override in JCL to SAS step |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Jun 29, 2007 7:13 am Post subject: |
|
|
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 |
|
 |
saraswathi Beginner
Joined: 08 Dec 2006 Posts: 14 Topics: 8
|
Posted: Fri Jun 29, 2007 8:56 am Post subject: |
|
|
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 |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Jun 29, 2007 9:10 am Post subject: |
|
|
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 |
|
 |
saraswathi Beginner
Joined: 08 Dec 2006 Posts: 14 Topics: 8
|
Posted: Fri Jun 29, 2007 9:32 am Post subject: |
|
|
hi,
This is my JCL.
//SASJOB JOB (...),CLASS=...
//*
// SET &MNAME1=SOMEVALUE
//*
//PROC1 EXEC PROC1,
//FINAL.SAS.SYSIN DD DSN=DATA2(&MNAME1),DISP=SHRTHIS IS MY CORRESPONDING PROC..
//PROC1 PROC
//FINAL EXEC SAS82LPS
.
.
.
//SYSIN DD DSN=DATA1(&MNAME1),DISP=SHR
the error is INVALID LABEL. |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Fri Jun 29, 2007 9:42 am Post subject: |
|
|
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 |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Jun 29, 2007 9:59 am Post subject: |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Jun 29, 2007 10:29 am Post subject: |
|
|
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 |
|
 |
|
|