Hi, We're using SAS 9.xxxx. I'm on a Linux SYSTEM calling a SAS program from a cronfile. That SAS program is passing arguments to a SAS program it's calling. I having a hard time passing values from one SAS program to another in this method. Here are the line from each program. In the cronfile the line looks like this: 17 * 18 10 * /usr/bin/bash;. ~/.bash_profile; cd /sasdata/mids_output02/rjs;sas -noterminal -rsasuser -batch -log cron_rpts.log -print cron_rpts.lst -sysparm "param1=2500,param2=2"
cron_rpts.sas Here are the effective lines from the program its calling. %macro set_constants;
%global param1 param2;
%* Get param1 and param2 from sysparm. sysparmpairs does not deal well with quotes, so quote the dates appropriately;
%sysparmpairs();
%let param1 = %bquote(')¶m1.%bquote(');
%let param2 = %bquote(')¶m2.%bquote(');
%mend;
%set_constants; /* Set macro variables for environment */
%put dates=¶m1. ¶m2.;
/****************************************************************************************************************************************/
/** Fetch raw pulls of data--transactions (10 min), dnb (33 min), FDIC **/
/****************************************************************************************************************************************/
systask command 'sas -noterminal -rsasuser -batch -log simple_run_2.log -print simple_run_2.lst -sysparm "param1=¶m1.,param2=¶m2. simple_run_2.sas' taskname = sim
ple_run_2; When I look at the log afterwards I see the following: WARNING: Apparent symbolic reference PARAM1 not resolved.
^L2 The SAS System 20:06 Thursday, October 18, 2018
WARNING: Apparent symbolic reference PARAM2 not resolved.
WARNING: Apparent symbolic reference PARAM1 not resolved.
WARNING: Apparent symbolic reference PARAM2 not resolved.
WARNING: Apparent symbolic reference PARAM1 not resolved. How do I pass param1 and param2 in that first call to the simple_run_2.sas program so the parameters will pass their values?
... View more