In these calls, NULL is passed
as the parameter to the DB2 stored procedure.
-
Null string literals in the call
call proc('');
call proc("")
-
Literal period or literal NULL
in the call
call proc(.)
call proc(NULL)
-
SAS macro variable set to NULL
string
%let charparm=;
call proc(:charparm)
-
SAS macro variable set to period
(SAS numeric value is missing)
%let numparm=.;
call proc(:numparm)
Only the literal period
and the literal NULL work generically for both DB2 character parameters
and DB2 numeric parameters. For example, a DB2 numeric parameter
would reject "" and
%let numparm=.;
would
not pass a DB2 NULL for a DB2 character parameter. As a literal,
a period passes NULL for both numeric and character parameters. However,
when it is in a SAS macro variable, it constitutes a NULL only for
a DB2 numeric parameter.
You cannot pass NULL
parameters by omitting the argument. For example, you cannot use
this call to pass three NULL parameters.
call proc(,,)
You could use this call
instead.
call proc(NULL,NULL,NULL)