proc datasets lib= mine nolist;modify petitTEST1 ;rename 'A0:' = &renlist. ; run;quit; Message of error was : ERROR 22-322: Expecting un nom. 0 Likes 1 ACCEPTED SOLUTION Kurt_Bremser Super User Re: rename all variable then compute Posted 07-23-2019 07:03 AM (1787 views)...
%macro xport (lib,tbl,rename) ; proc export data = &lib..&tbl. %if rename NE '' %then outfile = "/sasuser/bailkx4/sasdata/export/&rename..txt"; %Else outfile = "/sasuser/bailkx4/sasdata/export/&tbl..txt"; dbms = tab replace ; run ; %mend xport ; ...but when I tried...
I would like to rename them by keeping in the initial name the numbers from 2 to 5. I would then like to create variables adding all the columns with the same name. I don't know if better to do two steps (rename then create new variable with SUM) or do directly a procedure to cr...
Error message when rename all variable Posted 03-23-2018 11:50 AM (983 views) Hi Everyone, It is so weird that the code below, which is posted in SAS support website, return error when I apply to my data. Can you help me with that? Thank you. HHCFX Original code data one; ...
PROC SQL would automatically increase the length of character variables to avoid truncation (e.g., if variable DEF in dataset HAVE2 had length 11). If you have an existing template dataset, you can use that instead: proc sql; create table want as select * from sashelp.class(...
Data one; A=0; ID_U=1; ID_V=2; Run; /* Running the renaming macro */ options macrogen mprint mlogic; %macro rename(lib,dsn,prefixtarget); /*ADD*/ proc sql noprint; select nvar into :num_vars from dictionary.tables where libname="&LIB" and memname="&DSN" ; select dist...