1.

Write a macro that compares the creation date of all the datasets in two libraries and report in RTF format the libname, dataset name, created date and action for a user for both libraries the sasuser and the work?

Answer»

The MONOTONIC function is quite similar to the INTERNAL variable _N_ in the DATA STEP. We can use it to select the records according to their row number. For example, we choose the SSNs from the 501st LINE to the 888th line in the SSN dataset.

 proc sql;

 select * from ssn_data where monotonic() between 501 and 800 ;

quit;

you can also the monotonic() to subset the dataset in the where clause to limit the number of records read/outputted to the FINAL dataset…

view source

print?

proc sql; create table class2 as select monotonic() as rowno, * from sashelp.class where 10 le monotonic() le 20; quit;


Discussion

No Comment Found