x cd /pub/data/system/Tools; %let pgm=migrate_datalib; filename pgm "&pgm..sas"; *--Test run: use proc migrate to migrate a complete SAS data lib. (bankdeps) Nov, 2004---*; *libname source '/pub/data/bankdeps'; *libname target '/pub/data/temp/v9'; *libname bankdeps '/pub/data/bankdeps' server=mcdc; /* =======================Begin comment================ %let mcdc=mcdc.missouri.edu; signon mcdc; rsubmit; *---Create 2 views to make sure we test the ability to automatically migrate such views---*; libname bankdeps '/pub/data/bankdeps'; proc sql; create view bankdeps.test_sqlview as select libname, memname, memtype, memlabel, engine from datasets where memtype='DATA'; *---This data step view causeed the program to fail and so had to be deleted !!!!!! ---; data bankdeps.test_datastepview/view=bankdeps.test_datastepview; set bankdeps.datasets; where memtype='DATA'; keep libname--keyvars; run cancel; endrsubmit; ======================End comment================== */ /*-------------------------------------------------------------- * * SAS TEST LIBRARY * * NAME: migrate_template.sas * TITLE: template for MIGRATE validation programs * LEVEL: 1 * SUPPORT: David Wiehle david.wiehle@sas.com * INPUT: * OUTPUT: migrate_template.log * migrate_template.lst * SPEC.REQ: see below *--------------------------------------------------------------*/ %include '/pub/sasmacro/migrate_macros.sas'; *--downloaded from SAS web site, same as the template; options nocenter formdlim='-'; libname lib1 '/pub/data/bankdeps' ; libname bankdeps (lib1); *<---alias required in order for the sql view to work--; libname lib2 '/pub/data/bankdeps/v9'; libname ods '/pub/data/temp/v9'; title1 'Test Migrgation of bankdeps to V9'; options nonotes; %before; options notes; proc migrate in=lib1 out=lib2; run; options nonotes; %after; *------------------------------------------------------* * produce validation output for all the data sets which * only prints a listing of those attributes which * differ between the source and target libraries *------------------------------------------------------*; %checkdata; *------------------------------------------------------* * produce validation output for all the data sets which * prints a listing of all data set attributes in the * source and target libraries. *------------------------------------------------------*; ***%checkdata(showall=yes); *------------------------------------------------------* * produce validation output for all the audit files *------------------------------------------------------*; %checkaudit; ***%checkaudit(showall=yes); **print all Audit file information; *------------------------------------------------------* * produce validation output for all the catalogs *------------------------------------------------------*; %checkcatalog; *------------------------------------------------------* * produce validation output for data step views and * SQL views. WARNING: not yet tested on libraries * which contain SAS/ACCESS views. Use on these * libraries at your own risk. *------------------------------------------------------*; %***checkview; %checkview(printview=yes); ***print the first 10 obs in a view; ***%checkview(printview=yes, obs=7); **print a flexible number of obs ; *------------------------------------------------------* * OPTIONAL: * compare index and Integrity constraint information. *------------------------------------------------------*; %checkindex; ***checkindex(showall=yes); **print the indexes and Integrity Constraints ; *------------------------------------------------------* * produce all of the above validation output *------------------------------------------------------*; ***%checkem; ***%checkem(showall=yes); options notes;