1                                                          The SAS System                              15:35 Monday, August 15, 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.29 seconds
      cpu time            0.79 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:     metadata7.sas                                   						*
3          * Description: Verify the output report contains all the attributes including		*
4          *				 hyperlinks from data to detail variable attributes.					*
5          *				 special characters. 														*
6          * Parameters:  source = source datasets													*		 		
7          *              metadb = metadata database library 										*
8          *              search = search criteria 													*
9          *              task = database management tasks   										*
10         *              output = output report	                                      	   	*					
11         * By:          Nam Phuong, 8/2/2005														*
12         *---------------------------------------------------------------------------------	*/
13         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
14         
15         %metadata (source = mylib.ae,
16                    metadb = mylib.metadb,
17                    search = ptid,
18                    task = update,
19                    output = );

20                  *** Remove the old metadata before updating ***;
21                  data metadb;
2                                          The SAS System              15:35 Monday, August 15, 2005

22                     set mylib.metadb;
23                    if compress(upcase(libname || '.' || memname)) = upcase("mylib.ae") then
23       ! delete;
24                  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):
      real time           0.12 seconds
      cpu time            0.06 seconds
      

25                     *** Capture the meta data for mylib.ae ***;
26                     proc contents data = mylib.ae noprint
27                        out=curdat;
28                     run;

NOTE: The data set WORK.CURDAT has 33 observations and 40 variables.
NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.09 seconds
      cpu time            0.03 seconds
      

29         
30                     *** Appply the updates to the destination for mylib.ae ***;
31                     data metadb;
32                        set mylib.metadb curdat;
33                     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: 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 33 rows and 40 columns.

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. 
  
34                  *** Create a dataset to store the index of the datasets being created ***;
35                  data work.index (label="Data Set Index");
36                  attrib libname length=$20 label="Library Name";
37                  attrib memname length=$40 label="Data Transformation Name";
38                  attrib memlabel length=$80 label="Label";
3                                          The SAS System              15:35 Monday, August 15, 2005

39                  attrib link length=$100 label="Details";
40                     libname = "MYLIB";
41                     memname = "AE";
42                     memlabel = "%nrbquote()";
43                     link = '<a href="#PRINT MYLIB.AE">details...</a>';
44                     output;
45               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
      

46         
47               ods listing close;
48         

49               ods html3 file="metadata_search.html";
NOTE: Writing HTML3 Body file: metadata_search.html
50                  proc report data = work.index nowd
51                     style(header)=[font_size=2]
52                     style(column)=[font_size=2];
53                     title1 "Index of Datasets";
54                  run;

NOTE: There were 1 observations read from the data set WORK.INDEX.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.09 seconds
      cpu time            0.01 seconds
      

55               *** Create the data that includes the search criteria ***;
56               data results (Label="Search Results" drop=tempvar);
57                  set work.metadb;
58                  length tempvar $200;
59                  if index(upcase(libname),upcase('ptid')) > 0 then output;
60                  if index(upcase(memname),upcase('ptid')) > 0 then output;
61                  if index(upcase(MEMLABEL),upcase('ptid')) > 0 then output;
62                  if index(upcase(TYPEMEM),upcase('ptid')) > 0 then output;
63                  if index(upcase(NAME),upcase('ptid')) > 0 then output;
64                  if index(upcase(LABEL),upcase('ptid')) > 0 then output;
65                  if index(upcase(FORMAT),upcase('ptid')) > 0 then output;
66                  if index(upcase(INFORMAT),upcase('ptid')) > 0 then output;
67                  if index(upcase(ENGINE),upcase('ptid')) > 0 then output;
68                  if index(upcase(IDXUSAGE),upcase('ptid')) > 0 then output;
69                  if index(upcase(MEMTYPE),upcase('ptid')) > 0 then output;
70                  if index(upcase(PROTECT),upcase('ptid')) > 0 then output;
71                  if index(upcase(FLAGS),upcase('ptid')) > 0 then output;
72                  if index(upcase(COMPRESS),upcase('ptid')) > 0 then output;
73                  if index(upcase(REUSE),upcase('ptid')) > 0 then output;
74                  if index(upcase(CHARSET),upcase('ptid')) > 0 then output;
75                  if index(upcase(COLLATE),upcase('ptid')) > 0 then output;
76                  if index(upcase(NODUPKEY),upcase('ptid')) > 0 then output;
4                                          The SAS System              15:35 Monday, August 15, 2005

77                  if index(upcase(NODUPREC),upcase('ptid')) > 0 then output;
78                  if index(upcase(ENCRYPT),upcase('ptid')) > 0 then output;
79                  if index(upcase(POINTOBS),upcase('ptid')) > 0 then output;
80                     tempvar = put(TYPE,best.);
81                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
82                     tempvar = put(LENGTH,best.);
83                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
84                     tempvar = put(VARNUM,best.);
85                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
86                     tempvar = put(FORMATL,best.);
87                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
88                     tempvar = put(FORMATD,best.);
89                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
90                     tempvar = put(INFORML,best.);
91                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
92                     tempvar = put(INFORMD,best.);
93                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
94                     tempvar = put(JUST,best.);
95                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
96                     tempvar = put(NPOS,best.);
97                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
98                     tempvar = put(NOBS,best.);
99                     if index(upcase(tempvar),upcase('ptid')) > 0 then output;
100                    tempvar = put(CRDATE,best.);
101                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
102                    tempvar = put(MODATE,best.);
103                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
104                    tempvar = put(DELOBS,best.);
105                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
106                    tempvar = put(IDXCOUNT,best.);
107                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
108                    tempvar = put(SORTED,best.);
109                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
110                    tempvar = put(SORTEDBY,best.);
111                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
112                    tempvar = put(GENMAX,best.);
113                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
114                    tempvar = put(GENNUM,best.);
115                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
116                    tempvar = put(GENNEXT,best.);
117                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
118                 run;

NOTE: There were 33 observations read from the data set WORK.METADB.
NOTE: The data set WORK.RESULTS has 1 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.03 seconds
      

NOTE: Table WORK.TMP1 created, with 1 rows and 40 columns.

119                    proc report data = tmp1 nowd
120                       style(header)=[font_size=2]
5                                          The SAS System              15:35 Monday, August 15, 2005

121                       style(column)=[font_size=2];
122                       title1 '<a name="PRINT MYLIB.AE">--- Meta Data Database mylib.metadb ---
122      ! </a>';
123                       title2 "--- Search Criteria: ptid ---";
124                       title3 "Library name: MYLIB Member name= AE";
125                       footnote1 height=2 "Generated on: 08/15/2005,  3:35:22 pm, Nnguyen";
126                       footnote2 height=2 "Located at: C:\WorkRoom\Metadata\test
126      ! Macro\testing\saspgm";
127                    run;

NOTE: There were 1 observations read from the data set WORK.TMP1.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.07 seconds
      cpu time            0.01 seconds
      

128                    ods html3 close;
129                 ods listing;
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           1.64 seconds
      cpu time            0.48 seconds
      

130        
131        %metadata (source = mylib.elig,
132                   metadb = mylib.metadb,
133                   search = ptid,
134                   task = update,
135                   output = );

136                 *** Remove the old metadata before updating ***;
137                 data metadb;
138                    set mylib.metadb;
139                   if compress(upcase(libname || '.' || memname)) = upcase("mylib.elig") then
139      ! delete;
140                 run;

NOTE: There were 33 observations read from the data set MYLIB.METADB.
NOTE: The data set WORK.METADB has 33 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

141                    *** Capture the meta data for mylib.elig ***;
142                    proc contents data = mylib.elig noprint
143                       out=curdat;
144                    run;

NOTE: The data set WORK.CURDAT has 29 observations and 40 variables.
NOTE: PROCEDURE CONTENTS used (Total process time):
6                                          The SAS System              15:35 Monday, August 15, 2005

      real time           0.03 seconds
      cpu time            0.00 seconds
      

145        
146                    *** Appply the updates to the destination for mylib.elig ***;
147                    data metadb;
148                       set mylib.metadb curdat;
149                    run;

NOTE: There were 33 observations read from the data set MYLIB.METADB.
NOTE: There were 29 observations read from the data set WORK.CURDAT.
NOTE: The data set WORK.METADB has 62 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 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 62 rows and 40 columns.

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. 
  
150                 *** Create a dataset to store the index of the datasets being created ***;
151                 data work.index (label="Data Set Index");
152                 attrib libname length=$20 label="Library Name";
153                 attrib memname length=$40 label="Data Transformation Name";
154                 attrib memlabel length=$80 label="Label";
155                 attrib link length=$100 label="Details";
156                    libname = "MYLIB";
157                    memname = "AE";
158                    memlabel = "%nrbquote()";
159                    link = '<a href="#PRINT MYLIB.AE">details...</a>';
160                    output;
161                    libname = "MYLIB";
162                    memname = "ELIG";
163                    memlabel = "%nrbquote()";
164                    link = '<a href="#PRINT MYLIB.ELIG">details...</a>';
165                    output;
166              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
      

7                                          The SAS System              15:35 Monday, August 15, 2005

167        
168              ods listing close;
169        

170              ods html3 file="metadata_search.html";
NOTE: Writing HTML3 Body file: metadata_search.html
171                 proc report data = work.index nowd
172                    style(header)=[font_size=2]
173                    style(column)=[font_size=2];
174                    title1 "Index of Datasets";
175                 run;

NOTE: There were 2 observations read from the data set WORK.INDEX.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds
      

176              *** Create the data that includes the search criteria ***;
177              data results (Label="Search Results" drop=tempvar);
178                 set work.metadb;
179                 length tempvar $200;
180                 if index(upcase(libname),upcase('ptid')) > 0 then output;
181                 if index(upcase(memname),upcase('ptid')) > 0 then output;
182                 if index(upcase(MEMLABEL),upcase('ptid')) > 0 then output;
183                 if index(upcase(TYPEMEM),upcase('ptid')) > 0 then output;
184                 if index(upcase(NAME),upcase('ptid')) > 0 then output;
185                 if index(upcase(LABEL),upcase('ptid')) > 0 then output;
186                 if index(upcase(FORMAT),upcase('ptid')) > 0 then output;
187                 if index(upcase(INFORMAT),upcase('ptid')) > 0 then output;
188                 if index(upcase(ENGINE),upcase('ptid')) > 0 then output;
189                 if index(upcase(IDXUSAGE),upcase('ptid')) > 0 then output;
190                 if index(upcase(MEMTYPE),upcase('ptid')) > 0 then output;
191                 if index(upcase(PROTECT),upcase('ptid')) > 0 then output;
192                 if index(upcase(FLAGS),upcase('ptid')) > 0 then output;
193                 if index(upcase(COMPRESS),upcase('ptid')) > 0 then output;
194                 if index(upcase(REUSE),upcase('ptid')) > 0 then output;
195                 if index(upcase(CHARSET),upcase('ptid')) > 0 then output;
196                 if index(upcase(COLLATE),upcase('ptid')) > 0 then output;
197                 if index(upcase(NODUPKEY),upcase('ptid')) > 0 then output;
198                 if index(upcase(NODUPREC),upcase('ptid')) > 0 then output;
199                 if index(upcase(ENCRYPT),upcase('ptid')) > 0 then output;
200                 if index(upcase(POINTOBS),upcase('ptid')) > 0 then output;
201                    tempvar = put(TYPE,best.);
202                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
203                    tempvar = put(LENGTH,best.);
204                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
205                    tempvar = put(VARNUM,best.);
206                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
207                    tempvar = put(FORMATL,best.);
208                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
209                    tempvar = put(FORMATD,best.);
210                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
211                    tempvar = put(INFORML,best.);
8                                          The SAS System              15:35 Monday, August 15, 2005

212                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
213                    tempvar = put(INFORMD,best.);
214                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
215                    tempvar = put(JUST,best.);
216                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
217                    tempvar = put(NPOS,best.);
218                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
219                    tempvar = put(NOBS,best.);
220                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
221                    tempvar = put(CRDATE,best.);
222                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
223                    tempvar = put(MODATE,best.);
224                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
225                    tempvar = put(DELOBS,best.);
226                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
227                    tempvar = put(IDXCOUNT,best.);
228                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
229                    tempvar = put(SORTED,best.);
230                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
231                    tempvar = put(SORTEDBY,best.);
232                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
233                    tempvar = put(GENMAX,best.);
234                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
235                    tempvar = put(GENNUM,best.);
236                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
237                    tempvar = put(GENNEXT,best.);
238                    if index(upcase(tempvar),upcase('ptid')) > 0 then output;
239                 run;

NOTE: There were 62 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.01 seconds
      

NOTE: Table WORK.TMP1 created, with 1 rows and 40 columns.

240                    proc report data = tmp1 nowd
241                       style(header)=[font_size=2]
242                       style(column)=[font_size=2];
243                       title1 '<a name="PRINT MYLIB.AE">--- Meta Data Database mylib.metadb ---
243      ! </a>';
244                       title2 "--- Search Criteria: ptid ---";
245                       title3 "Library name: MYLIB Member name= AE";
246                       footnote1 height=2 "Generated on: 08/15/2005,  3:35:22 pm, Nnguyen";
247                       footnote2 height=2 "Located at: C:\WorkRoom\Metadata\test
247      ! Macro\testing\saspgm";
248                    run;

NOTE: There were 1 observations read from the data set WORK.TMP1.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.07 seconds
      cpu time            0.01 seconds
9                                          The SAS System              15:35 Monday, August 15, 2005

      

NOTE: Table WORK.TMP2 created, with 1 rows and 40 columns.

249                    proc report data = tmp2 nowd
250                       style(header)=[font_size=2]
251                       style(column)=[font_size=2];
252                       title1 '<a name="PRINT MYLIB.ELIG">--- Meta Data Database mylib.metadb ---
252      !  </a>';
253                       title2 "--- Search Criteria: ptid ---";
254                       title3 "Library name: MYLIB Member name= ELIG";
255                       footnote1 height=2 "Generated on: 08/15/2005,  3:35:22 pm, Nnguyen";
256                       footnote2 height=2 "Located at: C:\WorkRoom\Metadata\test
256      ! Macro\testing\saspgm";
257                    run;

NOTE: There were 1 observations read from the data set WORK.TMP2.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.07 seconds
      cpu time            0.04 seconds
      

258                    ods html3 close;
259                 ods listing;
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.57 seconds
      cpu time            0.14 seconds
      


NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           3.59 seconds
      cpu time            1.43 seconds
      
