Required Arguments
call-routine
is a SAS or user-written CALL routine created with SAS/TOOLKIT software or a
routine created using “FCMP Procedure” in Base SAS Procedures Guide. All SAS
CALL routines are accessible with %SYSCALL except LABEL, VNAME,
SYMPUT, and EXECUTE.
call-routine-argument(s)
is one or more macro variable names (with no leading ampersands), separated by
commas. You can use a text expression to generate part or all of the CALL routine
arguments.
Details
When %SYSCALL invokes a CALL routine, the value of each macro variable argument
is retrieved and passed unresolved to the CALL routine. Upon completion of the CALL
routine, the value for each argument is written back to the respective macro variable. If
%SYSCALL encounters an error condition, the execution of the CALL routine
terminates without updating the macro variable values, an error message is written to the
log, and macro processing continues.
Note: The arguments to %SYSCALL are evaluated according to the rules of the SAS
macro language. This includes both the function name and the argument list to the
function. In particular, an empty argument position will not generate a NULL
argument, but a zero length argument.
CAUTION:
Do not use leading ampersands on macro variable names. The arguments in the
CALL routine invoked by the %SYSCALL macro are resolved before execution. If
you use leading ampersands, then the values of the macro variables are passed to the
CALL routine rather than the names of the macro variables.
CAUTION:
Macro variables contain only character data. When an argument to a function
might be either numeric data or character data, %SYSCALL attempts to convert the
supplied data to numeric data. This causes truncation of any trailing blanks if the
data was character data. %SYSCALL does not modify arguments that might be
character data. You can preserve the trailing blanks by using the %QUOTE function
when assigning the value to the macro variable that will be supplied as the argument
to the function. To determine whether it is necessary to preserve the trailing blanks
using the %QUOTE function, consult the documentation for the desired function to
see whether the arguments are numeric only, character only, or either numeric or
character. Use the %QUOTE function to quote the value supplied to arguments that
are documented to be either numeric or character.
%let j=1;
%let x=fax;
%let y=fedex;
%let z=phone;
%put j=&j x=&x y=&y z=&z
j=1 x=fax y=fedex z=phone
%syscall allperm(j,x,y,z);
%put j=&j x=&x y=&y z=&z
j=1 x=250 y=65246 z=phone
%SYSCALL Statement 337