I am getting below error while trying to split a dataset.
MPRINT(DIVIDE_EXTRACTION): data interim."mbr_rally_9"n;
SYMBOLGEN: Macro variable DNAME resolves to mar rally
MPRINT(DIVIDE_EXTRACTION): set mar rally;
SYMBOLGEN: Macro variable DCNT resolves to 1.1279E8
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was:
1.1279E8+1
SYMBOLGEN: Macro variable DIV resolves to 14098500
I have attached the code for the reference
Please let me know if anybody needs any more information on this.
Hello @Abhinav26,
The default format for numeric values assigned by the INTO clause is BEST8. (see last bullet point in section "Details" of the documentation), which is not sufficient for 9-digit integers such as 1.1279E8. Specify an appropriate format like 9. or (to be on the safe side) 16. to avoid the issue with the scientific notation:
select max(sno) format=16. into :dcnt ...
Hello @Abhinav26,
The default format for numeric values assigned by the INTO clause is BEST8. (see last bullet point in section "Details" of the documentation), which is not sufficient for 9-digit integers such as 1.1279E8. Specify an appropriate format like 9. or (to be on the safe side) 16. to avoid the issue with the scientific notation:
select max(sno) format=16. into :dcnt ...
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.