Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1522
Location: Chennai

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: 965
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 Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us