매크로 변수 &myfiles
에 4 개의 데이터 집합 이름 목록이 있습니다.매크로 변수 값을 기준으로 여러 sas 데이터 집합 복사/이름 바꾸기
%put &myfiles;
cpo.CDR_2016jun cpo.Cog_2016jun cpo.Mile_2016jun cpo.Path_2016jun
여기서 cpo
은 libname입니다.
data &New_Datasets;
set &myfiles;
run;
: 난 그냥 이런 데이터 단계를 사용하려
%put &New_Datasets;
CDR Cog Mile Path
:
은 내가 &New_Datasets
지명 한 다른 매크로 변수에서 이름을 가진 네 개의 새로운 데이터 세트를 만들려고 해요
이지만 &mylist
에 참조 된 네 개의 데이터 세트를 모두 합치고 &New_Datasets
에 참조 된 네 개의 데이터 세트에 넣고 로그에서 다음 출력을 얻습니다.
NOTE: There were 1482 observations read from the data set CPO.CDR_2016JUN.
NOTE: There were 1444 observations read from the data set CPO.COG_2016JUN.
NOTE: There were 255 observations read from the data set CPO.MILE_2016JUN.
NOTE: There were 7 observations read from the data set CPO.PATH_2016JUN.
NOTE: The data set WORK.CDR has 3188 observations and 1580 variables.
NOTE: The data set WORK.COG has 3188 observations and 1580 variables.
NOTE: The data set WORK.MILE has 3188 observations and 1580 variables.
NOTE: The data set WORK.PATH has 3188 observations and 1580 variables.
내가 달성하고자하는 데이터를 생성 cpo.cdr_2016jun
에서 1482 개 관찰을하는 것입니다 설정 1,482 관찰과와 work.cdr
등의에서 언급 한 것들의 조합이 아니라 새로운 데이터 세트의 각을하는 것보다 set 문. 어떤 도움이라도 대단히 감사하겠습니다.
매크로 변수가 없으면 원하는 데이터 세트를 만드는 데 사용할 SAS 코드는 무엇입니까? 일단 생성하고자하는 코드를 알게되면 매크로 로직을 사용하여 생성하는 것이 더 쉽습니다. – Tom