The %BEFORE wrapper macro:
created the macro variables needed for the memtype comparisons
created a data set in the ODS library for the contents of the source library before migration
created a data set in the ODS library describing the indexes and or integrity constraints before migration
used the source library data set to create macro variables that contain the total number of files for each memtype, as well as a macro variable that contains the name of each file in the source library.
The %AFTER macro compares the contents of the source library before PROC MIGRATE with the contents of the target library after PROC MIGRATE by comparing the contents of the data sets created in the ODS library and generating a report.
In the example report below, five members were present in the source library and were migrated successfully to the target library. The C_IND member was not migrated presumably because there was a problem during migration. The SQL_VIEW member is not migrated because it is not in the source library and exists only in the target library.
Obs | name | MemType | result |
---|---|---|---|
1 | FORMATS | CATALOG | OK |
2 | TESTCAT | CATALOG | OK |
3 | C_IND | DATA | not MIGRATED |
4 | DATA_SET | DATA | OK |
5 | ITEMSTORE | ITEMSTOR | OK |
6 | DATA_STEP_VIEW | VIEW | OK |
7 | SQL_VIEW | VIEW | not in source library |
The %AFTER wrapper macro also compares the contents of the source library before PROC MIGRATE with the contents of the source library after PROC MIGRATE and generating a report. By default, %AFTER produces output based on the default behavior of PROC MIGRATE.
The following example report shows that all the members in the source library before and after PROC MIGRATE are present. OK in the results column indicates the member was present in the source library before and after PROC MIGRATE.
Obs | name | MemType | result |
---|---|---|---|
1 | FORMATS | CATALOG | OK |
2 | TESTCAT | CATALOG | OK |
3 | C_IND | DATA | OK |
4 | DATA_SET | DATA | OK |
5 | ITEMSTORE | ITEMSTOR | OK |
6 | DATA_STEP_VIEW | VIEW | OK |
7 | SQL_VIEW | VIEW | OK |
The %CHECKEM macro produces memtype comparison output for only 3 memtypes:
catalogs (catalog attributes only)
SQL views
data files with indexes, integrity constraints, generations, and audit trails.
The %CHECKEM macro compares memtypes. It uses the macro variables created by the %BEFORE macro to output the following:
a side-by-side comparison of data set attributes between the source and target libraries
a side-by-side comparison of data set engine or host information
a PROC COMPARE of data set contents
The default behavior of the %CHECKEM macro is to output only those data set attributes and any engine or host data that are different in the source library and the target library.
The first %CHECKEM default output compares the data set attributes and includes the name of the data sets compared in each library.
DATA1 Number 2 of 12 data sets in source library Differences in PROC CONTENTS header information Note: all other header information was the same Number 1 of 3 reports for this data set (from checkdata macro) Obs attribute source target 1 Encoding Default wlatin1 Western (Windows) 2 Engine V8 V9
The second %CHECKEM default output compares the engine or host information. Note that the file name is excluded in this output.
DATA1 Number 2 of 12 data sets in source library Differences in PROC CONTENTS engine/host information Note: all other engine/host information was the same Number 2 of 3 reports for this data set (from checkdata macro) Obs attribute source target 1 Host Created WIN_PRO XP_PRO 2 Release Created 8.0202MO 9.0100A0
The third %CHECKEM default output uses PROC COMPARE to compare the data set contents.
DATA1 Number 2 of 12 data sets in source library PROC COMPARE of data Number 3 of 3 reports for this data set (from checkdata macro) The COMPARE Procedure Comparison of LIB1.C_IND with LIB2.C_IND (Method=EXACT) Note: No unequal values were found. All values compared are exactly equal.
The default of %CHECKEM is to output only the data set attributes and engine or host data that are different in the source library and the target library. To output a comparison of all data set attributes and engine or host data, submit the following:
%checkdata(showall=yes);
The first %CHECKEM output with ( showall=yes ) compares the data set attributes and includes the name of the data sets compared in each library.
DATA1 Number 2 of 12 data sets in source library Comparison of PROC CONTENTS header information Number 1 of 3 reports for this data set (from checkdata macro) Obs attribute source target 1 compressed No No 2 Data Representation WINDOWS WINDOWs 3 Data Set Type 4 Deleted Observations 0 0 5 Encoding Default wlatin1 Western (Windows) 6 Engine V8 V9 7 Indexes 1 1 8 Label 9 Member Type DATA DATA 10 Observation Length 32 32 11 Observations 1 1 12 Protection 13 Sorted No No 14 Variables 4 4
The second %CHECKEM output with ( showall=yes ) compares the engine or host information.
DATA1 Number 2 of 12 data sets in source library Comparison of PROC CONTENTS engine/host information Number 2 of 3 reports for this data set (from checkdata macro) Obs attribute source target 1 Data Set Page Size 4096 4096 2 First Data Page 1 1 3 Host Created WIN_PRO XP_PRO 4 Index File Page Size 4096 4096 5 Max Obs per Page 126 126 6 Number of Data Set Pages 2 2 7 Number of Data Set Repairs 0 0 8 Number of Index File Pages 2 2 9 Obs in First Data Page 1 1 10 Release Created 8.0202MO 9.0100A0
The third %CHECKEM output with ( showall=yes ) is exactly the same as the %CHECKEM default output:
DATA1 Number 2 of 12 data sets in source library PROC COMPARE of data Number 3 of 3 reports for this data set (from checkdata macro) The COMPARE Procedure Comparison of LIB1.C_IND with LIB2.C_IND (Method=EXACT) Note: No unequal values were found. All values compared are exactly equal.