View previous topic :: View next topic
|
Author |
Message |
ppandey07
New User
Joined: 27 Nov 2008 Posts: 51 Location: Delhi, India
|
|
|
|
Hi there,
Can you please advise, can we pass two parameters from JCL to SAS code.? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
By reading the contents of the file(s) that contain such information.
As this is a SAS question, why did you post in the JCL forum ???
Also post the code that you have tried and the results received. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
On the JCL that you use the invoke SAS, i.e.JCL which has EXEC PGM=SAS
you could add DD statements which contain the parms that need to be passed to the SAS program & then use a %include statement on the DD statement.
Code: |
//STEP1 EXEC PGM=SAS
//PARM1 DD *
VALUE1 = 'Y';
/*
//PARM2 DD *
VALUE2 = 'N';
/*
//SYSIN DD *
DATA RAJNI;
%INCLUDE PARM1;
PUT 'THE VALUE READ FROM PARM1 IS ' VALUE1;
%INCLUDE PARM2;
PUT 'THE VALUE READ FROM PARM2 IS ' VALUE2;
RUN;
/* |
Hope it helps. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
JCL:
Code: |
//SAS EXEC SAS,PARM='SYSPARM="value"' |
SAS:
|
|
Back to top |
|
|
Charles Wolters
New User
Joined: 30 Mar 2011 Posts: 48 Location: United States
|
|
|
|
PPandey07,
Go to the URL www.caliberdt.com/tips/Jul2005.htm and you will find a discussion on how to pass parm data from JCL to SAS. You will need to know something about SAS macro variables to use this code. I just tested this link and it is active.
Charles Wolters |
|
Back to top |
|
|
|