Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to pass value from JCL to SAS code.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: How to pass value from JCL to SAS code.
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 09, 2011 12:40 pm    Post subject:
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: 1458
Location: Azeroth

PostPosted: Thu Jun 09, 2011 12:53 pm    Post subject:
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

Active Member


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

PostPosted: Thu Jun 09, 2011 5:17 pm    Post subject:
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    Post subject: Re: Passing Parm data from JCL to SAS
Reply with quote

PPandey07,

Go to the URL http://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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us