(New DI Studio Developer)
Good Morning, All.
I've got some character column in the input table that I need to output as numerics. In the output mapping, I'm attempting: INPUT([ColumnName],8.) but with no success.
I think it _might_ be because some of the input character columns have dollar values with dollar signs ('$'). So, I suppose my expression would need to pull those dollar signs out as well as it converts the character to numeric.
So...does anyone see anything wrong with my initial expression and how could I also pull out dollar signs when necessary?
Thanks!
-Jeff
I presume that you mean by no success that you are getting missing values?
If you have a columns that "always" has dollar signs, try to use the dollar informat.
Otherwise, try to compress() or substr() the column to get rid of unwanted chars before input() it to numeric.
I presume that you mean by no success that you are getting missing values?
If you have a columns that "always" has dollar signs, try to use the dollar informat.
Otherwise, try to compress() or substr() the column to get rid of unwanted chars before input() it to numeric.
I'm sorry. To clarify...'no success' means that the extraction node runs successfully, but when I go to open the workfile I get the following error message:
Here's my attempt to use the INPUT():
COMPRESS(INPUT(Fall_State_Salary,8.),'$') wasn't successful either. I received an error message upon trying to open the workfile.
Thanks for your help,
-Jeff
Ok, it looks like I resolved the above error message issue, and am now able to view the workfile.
However, I am getting empty columns for those that would have dollar signs and using the COMMAw.d format is solving that issue.
So, the following expression works for my purpose: INPUT([column_name],comma8.)
I'm considering this resolved.
Thanks!
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.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.