1                                                          The SAS System                           10:01 Wednesday, August 17, 2005

NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened instead.
NOTE: All registry changes will be lost at the end of the session.

WARNING: Unable to copy SASUSER registry to WORK registry. Because of this, you will not see registry customizations during this 
         session.
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) 9.1 (TS1M3)
      Licensed to META-XCEED INC, Site 0035729001.
NOTE: This session is executing on the XP_HOME  platform.



NOTE: SAS initialization used:
      real time           1.25 seconds
      cpu time            0.82 seconds
      

NOTE: AUTOEXEC processing beginning; file is C:\WorkRoom\Metadata\test 
      Macro\testing\saspgm\autoexec.sas.

NOTE: Libref COMDATA was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\WorkRoom\Metadata\test Macro\testing\saspgm

NOTE: AUTOEXEC processing completed.

1          /*--------------------------------------------------------------------------------	*
2          * program:     metadata8.sas                                   						*
3          * Description: Verify default behavior of all parameters.								*												*
4          * Parameters:  source = source datasets													*		 		
5          *              metadb = metadata database library 										*
6          *              search = search criteria 													*
7          *              task = database management tasks   										*
8          *              output = output report	                                      	   	*					
9          * By:          Nam Phuong, 8/2/2005														*
10         *---------------------------------------------------------------------------------	*/
11         libname mylib ".";
NOTE: Libname MYLIB refers to the same physical library as COMDATA.
NOTE: Libref MYLIB was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\WorkRoom\Metadata\test Macro\testing\saspgm
12         
13         %metadata (source = mylib,
14                    metadb = ,
15                    search = ptid,
16                    task = ,
17                    output = );

18                  data mylib.metadb;
19                     length libname $ 10 memname $200;
20                     if not missing(libname);
21                  run;
2                                          The SAS System           10:01 Wednesday, August 17, 2005


NOTE: Variable libname is uninitialized.
NOTE: Variable memname is uninitialized.
NOTE: The data set MYLIB.METADB has 0 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.10 seconds
      cpu time            0.04 seconds
      

22                  *** Remove the old metadata before updating ***;
23                  data metadb;
24                     set mylib.metadb;
25                    if compress(upcase(libname || '.' || memname)) = upcase("mylib.ae") then
25       ! delete;
26                    if compress(upcase(libname || '.' || memname)) = upcase("mylib.ae1") then
26       ! delete;
27                    if compress(upcase(libname || '.' || memname)) = upcase("mylib.elig") then
27       ! delete;
28                  run;

NOTE: There were 0 observations read from the data set MYLIB.METADB.
NOTE: The data set WORK.METADB has 0 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

29                     *** Capture the meta data for mylib.ae ***;
30                     proc contents data = mylib.ae noprint
31                        out=curdat;
32                     run;

NOTE: The data set WORK.CURDAT has 33 observations and 40 variables.
NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.10 seconds
      cpu time            0.04 seconds
      

33         
34                     *** Appply the updates to the destination for mylib.ae ***;
35                     data metadb;
36                        set metadb curdat;
37                     run;

NOTE: There were 0 observations read from the data set WORK.METADB.
NOTE: There were 33 observations read from the data set WORK.CURDAT.
NOTE: The data set WORK.METADB has 33 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds
      

38                     *** Capture the meta data for mylib.ae1 ***;
39                     proc contents data = mylib.ae1 noprint
3                                          The SAS System           10:01 Wednesday, August 17, 2005

40                        out=curdat;
41                     run;

NOTE: The data set WORK.CURDAT has 40 observations and 40 variables.
NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds
      

42         
43                     *** Appply the updates to the destination for mylib.ae1 ***;
44                     data metadb;
45                        set metadb curdat;
46                     run;

NOTE: There were 33 observations read from the data set WORK.METADB.
NOTE: There were 40 observations read from the data set WORK.CURDAT.
NOTE: The data set WORK.METADB has 73 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

47                     *** Capture the meta data for mylib.elig ***;
48                     proc contents data = mylib.elig noprint
49                        out=curdat;
50                     run;

NOTE: The data set WORK.CURDAT has 29 observations and 40 variables.
NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds
      

51         
52                     *** Appply the updates to the destination for mylib.elig ***;
53                     data metadb;
54                        set metadb curdat;
55                     run;

NOTE: There were 73 observations read from the data set WORK.METADB.
NOTE: There were 29 observations read from the data set WORK.CURDAT.
NOTE: The data set WORK.METADB has 102 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

WARNING: This CREATE TABLE statement recursively references the target table. A consequence of this 
         is a possible data integrity problem.
NOTE: Table WORK.METADB created, with 102 rows and 40 columns.

56               *** Create the data that includes the search criteria ***;
57               data results (Label="Search Results" drop=tempvar);
4                                          The SAS System           10:01 Wednesday, August 17, 2005

58                  set work.metadb;
59                  length tempvar $200;
60                     if index(upcase(libname),upcase('ptid')) > 0 then output;
61                     if index(upcase(memname),upcase('ptid')) > 0 then output;
62                     if index(upcase(MEMLABEL),upcase('ptid')) > 0 then output;
63                     if index(upcase(TYPEMEM),upcase('ptid')) > 0 then output;
64                     if index(upcase(NAME),upcase('ptid')) > 0 then output;
65                     if index(upcase(LABEL),upcase('ptid')) > 0 then output;
66                     if index(upcase(FORMAT),upcase('ptid')) > 0 then output;
67                     if index(upcase(INFORMAT),upcase('ptid')) > 0 then output;
68                     if index(upcase(ENGINE),upcase('ptid')) > 0 then output;
69                     if index(upcase(IDXUSAGE),upcase('ptid')) > 0 then output;
70                     if index(upcase(MEMTYPE),upcase('ptid')) > 0 then output;
71                     if index(upcase(PROTECT),upcase('ptid')) > 0 then output;
72                     if index(upcase(FLAGS),upcase('ptid')) > 0 then output;
73                     if index(upcase(COMPRESS),upcase('ptid')) > 0 then output;
74                     if index(upcase(REUSE),upcase('ptid')) > 0 then output;
75                     if index(upcase(CHARSET),upcase('ptid')) > 0 then output;
76                     if index(upcase(COLLATE),upcase('ptid')) > 0 then output;
77                     if index(upcase(NODUPKEY),upcase('ptid')) > 0 then output;
78                     if index(upcase(NODUPREC),upcase('ptid')) > 0 then output;
79                     if index(upcase(ENCRYPT),upcase('ptid')) > 0 then output;
80                     if index(upcase(POINTOBS),upcase('ptid')) > 0 then output;
81                     tempvar = put(TYPE,best.);
82                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
83                     tempvar = put(LENGTH,best.);
84                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
85                     tempvar = put(VARNUM,best.);
86                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
87                     tempvar = put(FORMATL,best.);
88                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
89                     tempvar = put(FORMATD,best.);
90                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
91                     tempvar = put(INFORML,best.);
92                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
93                     tempvar = put(INFORMD,best.);
94                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
95                     tempvar = put(JUST,best.);
96                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
97                     tempvar = put(NPOS,best.);
98                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
99                     tempvar = put(NOBS,best.);
100                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
101                    tempvar = put(CRDATE,best.);
102                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
103                    tempvar = put(MODATE,best.);
104                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
105                    tempvar = put(DELOBS,best.);
106                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
107                    tempvar = put(IDXCOUNT,best.);
108                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
109                    tempvar = put(SORTED,best.);
110                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
111                    tempvar = put(SORTEDBY,best.);
5                                          The SAS System           10:01 Wednesday, August 17, 2005

112                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
113                    tempvar = put(GENMAX,best.);
114                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
115                    tempvar = put(GENNUM,best.);
116                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
117                    tempvar = put(GENNEXT,best.);
118                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
119                 run;

NOTE: There were 102 observations read from the data set WORK.METADB.
NOTE: The data set WORK.RESULTS has 2 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.06 seconds
      cpu time            0.00 seconds
      

WARNING: A GROUP BY clause has been transformed into an ORDER BY clause because neither the SELECT 
         clause nor the optional HAVING clause of the associated table-expression referenced a 
         summary function.
NOTE: Table WORK.LSTDAT created, with 2 rows and 3 columns.

  
NOTE: [metadata] did not have an output specified.  It will default to: metadata_search.html. 
  
120                 *** Create a dataset to store the index of the datasets being created ***;
121                 data work.index (label="Data Set Index");
122                 attrib libname length=$20 label="Library Name";
123                 attrib memname length=$40 label="Data Transformation Name";
124                 attrib memlabel length=$80 label="Label";
125                 attrib link length=$100 label="Details";
126                    libname = "MYLIB";
127                    memname = "AE";
128                    memlabel = "%nrbquote()";
129                    link = '<a href="#PRINT MYLIB.AE">details...</a>';
130                    output;
131                    libname = "MYLIB";
132                    memname = "ELIG";
133                    memlabel = "%nrbquote()";
134                    link = '<a href="#PRINT MYLIB.ELIG">details...</a>';
135                    output;
136              run;

NOTE: The data set WORK.INDEX has 2 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

137        
138              ods listing close;
139        

140              ods html3 file="metadata_search.html";
NOTE: Writing HTML3 Body file: metadata_search.html
6                                          The SAS System           10:01 Wednesday, August 17, 2005

141                 proc report data = work.index nowd
142                    style(header)=[font_size=2]
143                    style(column)=[font_size=2];
144                    title1 "Index of Datasets";
145                 run;

NOTE: There were 2 observations read from the data set WORK.INDEX.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.37 seconds
      cpu time            0.04 seconds
      

NOTE: Table WORK.TMP1 created, with 1 rows and 40 columns.

146                    proc report data = tmp1 nowd
147                       style(header)=[font_size=2]
148                       style(column)=[font_size=2];
149                       title1 '<a name="PRINT MYLIB.AE">--- Meta Data Database mylib.metadb ---
149      ! </a>';
150                       title2 "--- Search Criteria: ptid ---";
151                       title3 "Library name: MYLIB Member name= AE";
152                       footnote1 height=2 "Generated on: 08/17/2005, 10:01:47 am, Nnguyen";
153                       footnote2 height=2 "Located at: C:\WorkRoom\Metadata\test
153      ! Macro\testing\saspgm";
154                    run;

NOTE: There were 1 observations read from the data set WORK.TMP1.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.09 seconds
      cpu time            0.03 seconds
      

NOTE: Table WORK.TMP2 created, with 1 rows and 40 columns.

155                    proc report data = tmp2 nowd
156                       style(header)=[font_size=2]
157                       style(column)=[font_size=2];
158                       title1 '<a name="PRINT MYLIB.ELIG">--- Meta Data Database mylib.metadb ---
158      !  </a>';
159                       title2 "--- Search Criteria: ptid ---";
160                       title3 "Library name: MYLIB Member name= ELIG";
161                       footnote1 height=2 "Generated on: 08/17/2005, 10:01:47 am, Nnguyen";
162                       footnote2 height=2 "Located at: C:\WorkRoom\Metadata\test
162      ! Macro\testing\saspgm";
163                    run;

NOTE: There were 1 observations read from the data set WORK.TMP2.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.06 seconds
      cpu time            0.01 seconds
      

164                    ods html3 close;
165                 ods listing;
7                                          The SAS System           10:01 Wednesday, August 17, 2005

NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.

NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           2.07 seconds
      cpu time            0.68 seconds
      


NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           3.42 seconds
      cpu time            1.54 seconds
      
