Thanks @Anand_V for quick reply. I went thru the article, didnt come of use. I'm using SAS 9.4 and SAS EG 7.1. I got my SAS Connect to Oracle reinstalled but not been able to configure. On the other hand i also have SAS Connect to Netezza which is working perfectly well.
... View more
I went thru many of the posts about Oracle database connect issues, i could not find a solution to my problem. Hence i am posting it here. I have SAS Connect to Oracle installed and licensed. Checked using Proc Product Status and Proc Setinit. I also have ODBC setup as "ORD" and its works fine querying data from SQL Developer tool. When i ran the following libname statement: LIBNAME ORD ORACLE SERVER=FIORDXP USER="A476622" PASSWORD="xxxxxxxx" DB=ORD_DOREP; RUN; I get the following error: LIBNAME ORD ORACLE SERVER=FIORDXP USER="A476622" PASSWORD=XXXXXXXXXXX DB=ORD_DOREP; ERROR: The SAS/ACCESS Interface to ORACLE cannot be loaded. ERROR: Image SASORA found but not loadable.. Please make sure Oracle environment is set correctly. Look in the install/Config doc for additional info for your platform. Other possible reasons - incomplete Oracle client install, 32/64-bit mismatch between Oracle client & SAS, incorrect Oracle client version(Oracle client must match the version picked during post-install process), incompatible sasora for your OS or its attribs don't permit SAS to load it. ERROR: Error in the LIBNAME statement. 27 RUN; Kindly help to resolve this problem? I'm not able to find the Path
... View more
I'm sorry it works now. The problem was in THEN statement, i had the incorrect column name. I apologize for silly mistake. Thank you Reeza.
... View more
Does "this doesn't work" mean "You get blank values"? - YES What does the log show? Can you provide sample data as text so we can run your code? - You can use the attached excel in my 1st post to see data & logic. SAS Log: NOTE: Variable NEW_GRP is uninitialized.
... View more
The columns C to G have values and when you reference this in excel, i get result. In SAS i get blank data. If I hard code the values i get a result. Logic with values hard coded for columns C to G - Works well in SAS IF CAT = 'CASH' AND VOL = 'Small' AND KPI <= 0.00177 THEN NEW_GRP = 'NIL' ELSE IF CAT = 'CASH' AND VOL = 'Medium' AND KPI > 0.00177 and KPI < 0.00578 THEN NEW_GRP = 'Low' ELSE IF CAT = 'CASH' AND VOL = 'Medium' AND KPI > 0.00578 and KPI < 0.01379 THEN NEW_GRP = 'High' ELSE IF CAT = 'CASH' AND VOL = 'Medium' AND KPI >= 0.01379 THEN NEW_GRP = 'Very High' This doesnt work in SAS: IF CAT = 'CASH' AND VOL = 'Small' AND KPI <= MEAN THEN NEW_GRP = 'NIL' ELSE IF CAT = 'CASH' AND VOL = 'Medium' AND KPI > MEAN and KPI < SD1 THEN NEW_GRP = 'Low' ELSE IF CAT = 'CASH' AND VOL = 'Medium' AND KPI > SD1 and KPI < SD2 THEN NEW_GRP = 'High' ELSE IF CAT = 'CASH' AND VOL = 'Medium' AND KPI >= SD2 THEN NEW_GRP = 'Very High' My problem is it take lot of time to hard code multiple values (columns C to G) for multiple sets within the logic. Hope this is clear now.
... View more
To provide more clarity, i need the output in column H to be this: =IF(C2<=D2,"Nil",IF(AND(C2>E2,C2<=F2),"Low", IF(AND(C2>E2,C2<=F2),"High","Very High"))) i can do this in excel with formula above, but i want to use the same logic in SAS using IF statement. Thanks, Arun
... View more
Hi, I want to use an IF statement to create output for column H using the logic I have written below. There would be a dynamic calculation while executing the IF statement. Please let me know if this can work dynamically & want a solution. NEW_GRP Logic for 1 set (i.e. Cash & vol set) - Refer Excel file attached. I have multiple records in my data set and the following condition would apply for all records. IF CAT = 'CASH' AND VOL = 'Small' AND (KPI <= MEAN) THEN NEW_GRP = 'NIL' IF CAT = 'CASH' AND VOL = 'Medium' AND (KPI > MEAN and KPI < SD1) THEN NEW_GRP = 'Low' IF CAT = 'CASH' AND VOL = 'Medium' AND (KPI > SD1 and KPI < SD2) THEN NEW_GRP = 'High' IF CAT = 'CASH' AND VOL = 'Medium' AND (KPI >= SD2) THEN NEW_GRP = 'Very High' I currently use SAS EG 7.1 64 bit (SAS 9.4 built in). Thanks, Arun
... View more