700 Options mprint symbolgen; 701 %macro tname(table=,var1=group_test); 702 %do; 703 data temp; 704 set &table; 705 length val_fmt $10.; 706 val_fmt = put(&group_test,$test_group.);/*group_test is the common variable to all datasets 706! that I want to assign the format */ 707 run; 708 %end; 709 %mend tname; 710 711 %tname(table=a,var1=group_test); MPRINT(TNAME): data temp; SYMBOLGEN: Macro variable TABLE resolves to a MPRINT(TNAME): set a; MPRINT(TNAME): length val_fmt $10.; NOTE 137-205: Line generated by the invoked macro "TNAME". 1 data temp; set &table; length val_fmt $10.; val_fmt = put(&group_test,$test_group.); - 22 1 ! run; ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, INPUT, PUT. WARNING: Apparent symbolic reference GROUP_TEST not resolved. NOTE 137-205: Line generated by the invoked macro "TNAME". 1 data temp; set &table; length val_fmt $10.; val_fmt = put(&group_test,$test_group.); ------------ 48 1 ! run; ERROR 48-59: The format TEST_GROUP was not found or could not be loaded. MPRINT(TNAME): val_fmt = put(&group_test, $test_group.); WARNING: Character format specified for the result of a numeric expression. MPRINT(TNAME): run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 1:65 NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.TEMP may be incomplete. When this step was stopped there were 0 observations and 3 variables. WARNING: Data set WORK.TEMP was not replaced because this step was stopped. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
... View more