BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RAMESH_KUMAR
Fluorite | Level 6

%MACRO util_RESULTS();

%let EDERV= RAND.ABCD 
%let Var=input(ABCD,$20.);
%let Var2=%SYSFUNC(SCAn(&EDERV.,4,'.|'));

%put &EDERV. &VAR1. &var. &VAR2.;

/*: ABCD is the Numeric variable with character values, EFGCH is character variable with character values, but both of them are populated with Numeric values in backend
which is not know in front end,Now i want to give the front value or backend value to derive a new variable on condition stated as below;

Log ERROR: The INPUT function referenced in the %SYSFUNC or %QSYSFUNC macro function is not found....?
how to resolve this issue..! */

data TWO;
set RAND;
ATTRIB &ENAME. Label="&label." Length=&length.;
If & Var. = "ABNORMAL" and &Var2. ne '' then NEW = &Var2.;
else If & Var. = "ABNORMAL" and &Var2. eq '' then NEW = "ABNORMAL";
else if & Var. in ('NOT DONE' , 'ND') then &ENAME. ='';
else NEW = & Var.;
run;

%MEND util_RESULTS;

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

The INPUT function is one of a short list of functions that cannot be used with %SYSFUNC.  You can use either INPUTN or INPUTC, whichever is appropriate.

 

Looking at what might be appropriate, however, it is possible you don't need a function at all.  Could you not use:

 

%let var = &var1;

 

It's not at all clear what you hope to accomplish when processing &VAR1 to get &VAR.

View solution in original post

2 REPLIES 2
Astounding
PROC Star

The INPUT function is one of a short list of functions that cannot be used with %SYSFUNC.  You can use either INPUTN or INPUTC, whichever is appropriate.

 

Looking at what might be appropriate, however, it is possible you don't need a function at all.  Could you not use:

 

%let var = &var1;

 

It's not at all clear what you hope to accomplish when processing &VAR1 to get &VAR.

RAMESH_KUMAR
Fluorite | Level 6

Thank you,  I have cleared the issue after referring SAS Community Blog

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 2 replies
  • 7348 views
  • 0 likes
  • 2 in conversation