SAS question: I have 50 fils a1,a2,...,a50. the primary key
is upc. then if i want to merge all 50 files, the code is
as follows,
data test;
merge a1 ... a50;
by upc;
run;
we know that writing all 50 files name is time consuming,
is there any standard format of this code?
Answer / Mohd Asif
In SAS, you can use the `SAS autocall macro` to automate the process of merging multiple files. Instead of listing all the files in the `merge` statement, you can create a list of file names and then pass it to the `proc sort` procedure. Here's an example:
nndata filenames;n call symput("file", catx('a', 'a', $repeat(", a", 48)));
nrun;
nndata test;n set mersort(of test out=work upc) / drop=_merge_;n merge @(&filenames);n by upc;nrun;
| Is This Answer Correct ? | 0 Yes | 0 No |
Tag for turning an image into a hyperlink is
can any method return type may be constructor , or that method name allow
kindly send interview materials
in IBM PC -AT.WAT AT REFERS TO?
9.Difference between even and odd signals?explain with the diagram?
how to convert infix expression to prefix expression?
what is the use of check point
swap two number wthout using third variable
To sorting array of 10 elements which sorting is best a)selection b)bubble c)tree sort
a characteristic of a multiprogramming is? a.simultaneous exe of pgm instr 4m 2 appli b.concurrent processing of 2 r more prgms c.multiple cpu s d.all the abov
what is dynamic polymorphism?
What is the difference between COM and CORBA?