Category: | DBCS |
Type: | NLS macro function |
%macro makefref(fileref,file); %if %klength(&fileref) gt 8 %then %let fileref = %ksubstr(&fileref,1,8); filename &fileref "&file"; %mend makefref; %makefref(humanresource,/dept/humanresource/report96)
%macro sepmsg(msg); %let i=1; %let start=1; %if %length(&msg)>40 %then %do; %do %until(%klength(&&msg&i)<40); %let msg&i=%qksubstr(&msg,&start,40); %put Message &i is: &&msg&i; %let i=%eval(&i+1); %let start=%eval(&start+40); %let msg&i=%qksubstr(&msg,&start); %end; %put Message &i is: &&msg&i; %end; %else %put No subdivision was needed.; %mend sepmsg; %sepmsg(%nrstr(A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. A character operand was found in the %EVAL function or %IF condition where a numeric operand is required.));
Message 1 is: A character operand was found in the %EV Message 2 is: AL function or %IF condition where a nu Message 3 is: meric operand is required. A character Message 4 is: operand was found in the %EVAL function Message 5 is: or %IF condition where a numeric operan Message 6 is: d is required.