(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!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.