An Idea Exchange for SAS software and services

by Respected Advisor
on ‎01-24-2013 03:37 PM
The Forum is mishehaving. No activity is shown. Is it just with me?
by Super User
on ‎05-06-2014 11:28 AM

Well, it would be good to have *in addition to* the call execute.  The reason is that I use call execute in a wider range than just some parameters.  There may be pages of code in the call execute, inserts, updates, loops, conditions etc. where parameterization would not be effective.

One thought if you wanted something like the above, why not try out the FCMP procedure (compiled functions).  It could be an option.

by Super Contributor
on ‎05-06-2014 05:52 PM

I'm not suggesting replacing Call Execute.  That would be very bad.

FCMP was the first place I looked and Call Execute (which is a component of a potential solution) is one of the few exclusions from code that can be used, so that won't work.  I guess that a macro function could be created to do the job.  Otherwise the closest you could get with FCMP would be a function macroparms() as in    Call Execute (macroparms (parm1, ..., parmn)) ;


by Super User
on ‎07-14-2014 10:38 AM

Was just coming back to this after looking at some old c++ programs.  I could see this being useful to follow the parameterized functionality there.  E.g.

call execute ('proc sql; insert into TMP set A="'||strip(some_text)||' something '||strip(some_more_text)||'"; quit;');

Could be written as:

call execute('proc sql;  insert into TMP set A="#1 something #2";quit;',some_text,some_more_text);

So to have the syntax:

call execute(free-text,param#1 <,param#n>);

Where #1 in the free-text would be replaced by positional parameter 1, #2 by positional parameter 2 etc.

Idea Statuses
Top Liked Authors