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

How to pass value from JCL to SAS code.


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Thu Jun 09, 2011 12:39 pm
Reply with quote

Hi there,
Can you please advise, can we pass two parameters from JCL to SAS code.?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 09, 2011 12:40 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Jun 09, 2011 12:53 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Jun 09, 2011 5:17 pm
Reply with quote

JCL:
Code:
//SAS      EXEC SAS,PARM='SYSPARM="value"'


SAS:
Code:
p = sysparm();
Back to top
View user's profile Send private message
Charles Wolters

New User


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

PostPosted: Sat Jun 11, 2011 2:35 am
Reply with quote

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
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top