1                                          The SAS System            09:05 Wednesday, August 3, 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           0.29 seconds
      cpu time            0.10 seconds
      

NOTE: AUTOEXEC processing beginning; file is C:\WorkRoom\Metadata\test Macro\saspgm\autoexec.sas.

NOTE: Libref COMDATA was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\WorkRoom\Metadata\test Macro\saspgm

NOTE: AUTOEXEC processing completed.

1          /*--------------------------------------------------------------------------------	*
2          * program:     metadata.scl                                   						*
3          * Description: Generate and maintain a metadata database with search capabilities.	*
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:          Sy Truong, 7/13/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\saspgm
12         
13         %metadata (source = mylib1.ae,
14                    metadb =,
15                    search =,
16                    task =,
17                    output =);

  
ERROR: [metadata] has an invalid source specified by SOURCE. 
  
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.43 seconds
      cpu time            0.09 seconds
      

18         
19         %metadata (source = mylib.ae1,
20                    metadb =,
21                    search =,
2                                          The SAS System            09:05 Wednesday, August 3, 2005

22                    task =,
23                    output =);

  
ERROR: [metadata] has an invalid source specified by SOURCE. 
  
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

24         
25         %metadata (source = mylib.ae,
26                    metadb = mylib1.ae,
27                    search =,
28                    task =,
29                    output =);

  
ERROR: [metadata] has an invalid metadata database specified by METADB. 
  
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

30         
31         %metadata (source = mylib.ae,
32                    metadb = mylib.ae1,
33                    search =,
34                    task =,
35                    output =);

36                  data mylib.ae1;
37                     length libname $ 10 memname $200;
38                     if not missing(libname);
39                  run;

NOTE: Variable libname is uninitialized.
NOTE: Variable memname is uninitialized.
NOTE: The data set MYLIB.AE1 has 0 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds
      

40               *** Remove the old metadata before updating ***;
41               data mylib.ae1;
42                   set mylib.ae1;
43                  if compress(upcase(libname || '.' || memname)) = upcase("mylib.ae") then delete;
44               run;

NOTE: There were 0 observations read from the data set MYLIB.AE1.
NOTE: The data set MYLIB.AE1 has 0 observations and 2 variables.
3                                          The SAS System            09:05 Wednesday, August 3, 2005

NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

45         

46                  *** Capture the meta data for mylib.ae ***;
47                  proc contents data = mylib.ae noprint
48                     out=curdat;
49                  run;

NOTE: The data set WORK.CURDAT has 33 observations and 40 variables.
NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.04 seconds
      cpu time            0.00 seconds
      

50         
51                  *** Appply the updates to the destination for mylib.ae ***;
52                  data mylib.ae1;
53                     set mylib.ae1 curdat;
54                  run;

NOTE: There were 0 observations read from the data set MYLIB.AE1.
NOTE: There were 33 observations read from the data set WORK.CURDAT.
NOTE: The data set MYLIB.AE1 has 33 observations and 40 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
      

NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.17 seconds
      cpu time            0.06 seconds
      

55         
56         %metadata (source = mylib.ae,
57                    metadb = mylib.ae,
58                    search = examplethelongcondition,
59                    task =,
60                    output =);

  
ERROR: [metadata] has an invalid text search criteria which is longer than 20 characters. 
  
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

61         
62         %metadata (source = mylib.ae,
4                                          The SAS System            09:05 Wednesday, August 3, 2005

63                    metadb = mylib.ae,
64                    search = protocol,
65                    task = save,
66                    output =);

  
ERROR: [metadata] has an invalid task specified by TASK. 
  
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

67         
68         %metadata (source = mylib.ae,
69                    metadb = mylib.ae,
70                    search = protocol,
71                    task = update,
72                    output = unknow);

  
ERROR: [metadata] has an invalid path specified by OUTPUT: unknow 
  
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.03 seconds
      cpu time            0.00 seconds
      

73         
74         %metadata (source = mylib.ae,
75                    metadb = mylib.ae,
76                    search = protocol,
77                    task = update,
78                    output = C:\metadata.itc);

  
ERROR: [metadata] has an invalid path specified by OUTPUT: C:\metadata.itc 
  
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

79         

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           1.04 seconds
      cpu time            0.29 seconds
      
