1                                          The SAS System              14:01 Monday, August 15, 2005

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.14 seconds
      cpu time            0.87 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:     metadata6.sas                                   						*
3          * Description: Verify the search results from search criteria with					*
4          *				 special characters. 														*
5          * Parameters:  source = source datasets													*		 		
6          *              metadb = metadata database library 										*
7          *              search = search criteria 													*
8          *              task = database management tasks   										*
9          *              output = output report	                                      	   	*					
10         * By:          Nam Phuong, 8/2/2005														*
11         *---------------------------------------------------------------------------------	*/
12         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
13         
14         %metadata (source = mylib.ae,
15                    metadb = mylib.metadb,
16                    search = !@#$%^&*(),
17                    task = update,
18                    output = );

19                  *** Remove the old metadata before updating ***;
20                  data metadb;
21                     set mylib.metadb;
22                    if compress(upcase(libname || '.' || memname)) = upcase("mylib.ae") then
22       ! delete;
23                  run;

NOTE: There were 33 observations read from the data set MYLIB.METADB.
NOTE: The data set WORK.METADB has 0 observations and 40 variables.
NOTE: DATA statement used (Total process time):
2                                          The SAS System              14:01 Monday, August 15, 2005

      real time           0.14 seconds
      cpu time            0.11 seconds
      

24                     *** Capture the meta data for mylib.ae ***;
25                     proc contents data = mylib.ae noprint
26                        out=curdat;
27                     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.06 seconds
      

28         
29                     *** Appply the updates to the destination for mylib.ae ***;
30                     data metadb;
31                        set mylib.metadb curdat;
32                     run;

NOTE: There were 33 observations read from the data set MYLIB.METADB.
NOTE: There were 33 observations read from the data set WORK.CURDAT.
NOTE: The data set WORK.METADB has 66 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 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 1 rows and 3 columns.

  
NOTE: [metadata] did not have an output specified.  It will default to: metadata_search.html. 
  
33                  *** Create a dataset to store the index of the datasets being created ***;
34                  data work.index (label="Data Set Index");
35                  attrib libname length=$20 label="Library Name";
36                  attrib memname length=$40 label="Data Transformation Name";
37                  attrib memlabel length=$80 label="Label";
38                  attrib link length=$100 label="Details";
39                     libname = "MYLIB";
40                     memname = "AE";
41                     memlabel = "%nrbquote()";
42                     link = '<a href="#PRINT MYLIB.AE">details...</a>';
43                     output;
44               run;

NOTE: The data set WORK.INDEX has 1 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
3                                          The SAS System              14:01 Monday, August 15, 2005

      

45         
46               ods listing close;
47         

48               ods html3 file="metadata_search.html";
NOTE: Writing HTML3 Body file: metadata_search.html
49                  proc report data = work.index nowd
50                     style(header)=[font_size=2]
51                     style(column)=[font_size=2];
52                     title1 "Index of Datasets";
53                  run;

NOTE: There were 1 observations read from the data set WORK.INDEX.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.10 seconds
      cpu time            0.07 seconds
      

54               *** Create the data that includes the search criteria ***;
55               data results (Label="Search Results" drop=tempvar);
56                  set work.metadb;
57                  length tempvar $200;
58                  if index(upcase(libname),upcase('!@#$%^&*()')) > 0 then output;
59                  if index(upcase(memname),upcase('!@#$%^&*()')) > 0 then output;
60                  if index(upcase(MEMLABEL),upcase('!@#$%^&*()')) > 0 then output;
61                  if index(upcase(TYPEMEM),upcase('!@#$%^&*()')) > 0 then output;
62                  if index(upcase(NAME),upcase('!@#$%^&*()')) > 0 then output;
63                  if index(upcase(LABEL),upcase('!@#$%^&*()')) > 0 then output;
64                  if index(upcase(FORMAT),upcase('!@#$%^&*()')) > 0 then output;
65                  if index(upcase(INFORMAT),upcase('!@#$%^&*()')) > 0 then output;
66                  if index(upcase(ENGINE),upcase('!@#$%^&*()')) > 0 then output;
67                  if index(upcase(IDXUSAGE),upcase('!@#$%^&*()')) > 0 then output;
68                  if index(upcase(MEMTYPE),upcase('!@#$%^&*()')) > 0 then output;
69                  if index(upcase(PROTECT),upcase('!@#$%^&*()')) > 0 then output;
70                  if index(upcase(FLAGS),upcase('!@#$%^&*()')) > 0 then output;
71                  if index(upcase(COMPRESS),upcase('!@#$%^&*()')) > 0 then output;
72                  if index(upcase(REUSE),upcase('!@#$%^&*()')) > 0 then output;
73                  if index(upcase(CHARSET),upcase('!@#$%^&*()')) > 0 then output;
74                  if index(upcase(COLLATE),upcase('!@#$%^&*()')) > 0 then output;
75                  if index(upcase(NODUPKEY),upcase('!@#$%^&*()')) > 0 then output;
76                  if index(upcase(NODUPREC),upcase('!@#$%^&*()')) > 0 then output;
77                  if index(upcase(ENCRYPT),upcase('!@#$%^&*()')) > 0 then output;
78                  if index(upcase(POINTOBS),upcase('!@#$%^&*()')) > 0 then output;
79                     tempvar = put(TYPE,best.);
80                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
81                     tempvar = put(LENGTH,best.);
82                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
83                     tempvar = put(VARNUM,best.);
84                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
85                     tempvar = put(FORMATL,best.);
86                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
87                     tempvar = put(FORMATD,best.);
4                                          The SAS System              14:01 Monday, August 15, 2005

88                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
89                     tempvar = put(INFORML,best.);
90                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
91                     tempvar = put(INFORMD,best.);
92                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
93                     tempvar = put(JUST,best.);
94                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
95                     tempvar = put(NPOS,best.);
96                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
97                     tempvar = put(NOBS,best.);
98                     if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
99                     tempvar = put(CRDATE,best.);
100                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
101                    tempvar = put(MODATE,best.);
102                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
103                    tempvar = put(DELOBS,best.);
104                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
105                    tempvar = put(IDXCOUNT,best.);
106                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
107                    tempvar = put(SORTED,best.);
108                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
109                    tempvar = put(SORTEDBY,best.);
110                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
111                    tempvar = put(GENMAX,best.);
112                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
113                    tempvar = put(GENNUM,best.);
114                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
115                    tempvar = put(GENNEXT,best.);
116                    if index(upcase(tempvar),upcase('!@#$%^&*()')) > 0 then output;
117                 run;

NOTE: There were 66 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.04 seconds
      cpu time            0.01 seconds
      

NOTE: Table WORK.TMP1 created, with 2 rows and 40 columns.

118                    proc report data = tmp1 nowd
119                       style(header)=[font_size=2]
120                       style(column)=[font_size=2];
121                       title1 '<a name="PRINT MYLIB.AE">--- Meta Data Database mylib.metadb ---
121      ! </a>';
122                       title2 "--- Search Criteria: !@#$%^&*() ---";
123                       title3 "Library name: MYLIB Member name= AE";
124                       footnote1 height=2 "Generated on: 08/15/2005,  2:02:12 pm, Nnguyen";
125                       footnote2 height=2 "Located at: C:\WorkRoom\Metadata\test
125      ! Macro\testing\saspgm";
126                    run;

NOTE: There were 2 observations read from the data set WORK.TMP1.
NOTE: PROCEDURE REPORT used (Total process time):
5                                          The SAS System              14:01 Monday, August 15, 2005

      real time           0.06 seconds
      cpu time            0.01 seconds
      

127                    ods html3 close;
128                 ods listing;
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           22.56 seconds
      cpu time            0.64 seconds
      

129        

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           23.82 seconds
      cpu time            1.56 seconds
      
