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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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