BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Abhinav26
Obsidian | Level 7

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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 ...

View solution in original post

2 REPLIES 2
Abhinav26
Obsidian | Level 7
used mar rally instead of mbr_rally as autocorrect was highlighting it as error and disabling me to post that question.
FreelanceReinh
Jade | Level 19

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 ...

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 595 views
  • 0 likes
  • 2 in conversation