Hi all,
I have variable that gets Numeric value most of the time but in certain conditions it can have character value. So I assigned Character to the variable while reading in the data from input file.
I used put function to this variable before I load data into Teradata table it works perfectly if I don't have any character value....if I have any character value that it gives me error.
Let say variable called Customer_name
Customer_name
3456
5678
9800
New
while mapping data in before step of teradata loader I used Put function as follows
put(Customer_name, 12.)
This put function works perfectly if I don't have New in column. If I have New the following error occurs.
ERROR: Numeric format F in PUT function requires a numeric argument.... ERROR: Numeric format F in PUT function requires a numeric argument.... ERROR: Numeric format F in PUT function requires a numeric argument.
If change put function to
put(Customer_name, $12.)
it works perfect for along with New in column Customer_name but doesn't work without New in column.
Can some one help me with this
Try this:
cat(Customer_name)
Don't forget to set the length.
Try this:
cat(Customer_name)
Don't forget to set the length.
I tried to implement your suggestion,
case when anyalpha(customer_acct) then "." else customer_acct end
It works perfectly if I have New as value in customer_acct variable.
But if I don't have New as value in customer_acct variable it gives me following error
ERROR: Function ANYALPHA requires a character expression as argument 1.... ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.
How to e-solve this?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.