1                                                          The SAS System                            09:22 Thursday, August 18, 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           0.73 seconds
      cpu time            0.59 seconds
      

NOTE: AUTOEXEC processing beginning; file is C:\test\fmtsum_test\testing\saspgm\autoexec.sas.


NOTE: AUTOEXEC processing completed.

1          /*------------------------------------------------------------*
2          * program:     fmtsum3.sas                                    *
3          * Description: Verify that both formats and informats are     *
4          *              captured by dataset                            *
5          * By:          Sy Truong, 6/27/2003                           *
6          *-------------------------------------------------------------*/
7          
8          *** Create sample format catalog for testing ***;
9          libname curlib '..\data';
NOTE: Libref CURLIB was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\test\fmtsum_test\testing\data
10         
11         proc format library=curlib.formats;
12            invalue incode
13               "one" = 1
14               "two" = 2
15               "three" = 3;
NOTE: Informat INCODE has been output.
16         
17            value diffcode
18               1 = "one"
19               2 = "two"
20               3 = "three"
21               4 = "four";
NOTE: Format DIFFCODE is already on the library.
NOTE: Format DIFFCODE has been written to CURLIB.FORMATS.
2                                       The SAS System          09:22 Thursday, August 18, 2005

22         
23            value diffname
24               1 = "one"
25               2 = "two"
26               3 = "three";
NOTE: Format DIFFNAME is already on the library.
NOTE: Format DIFFNAME has been written to CURLIB.FORMATS.
27         
28            value $charfmt
29               "test 1" = "one"
30               "test 2" = "two"
31               "test 3" = "three"
32               "test 4" = "four"
33               "test 5" = "five";
NOTE: Format $CHARFMT is already on the library.
NOTE: Format $CHARFMT has been written to CURLIB.FORMATS.
34         run;

NOTE: PROCEDURE FORMAT used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

35         
36         libname library '..\data';
NOTE: Libname LIBRARY refers to the same physical library as CURLIB.
NOTE: Libref LIBRARY was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\test\fmtsum_test\testing\data
37         
38         data work.test;
39            attrib var1 length=$20 format=$charfmt.;
40            attrib var2 length=8 format=diffname.  ;
41            attrib var3 length=8 informat=incode. ;
42         
43            var1 = "test 1";
44            var2 = 1;
45            var3 = 2;
46         run;

NOTE: The data set WORK.TEST has 1 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.12 seconds
      cpu time            0.06 seconds
      

47         
48         %fmtsum(fmtpath=..\data,datname=work.test);
NOTE: Libname TEMPLIB refers to the same physical library as LIBRARY.
NOTE: Libref TEMPLIB was successfully assigned as follows: 
      Engine:        V9 
3                                       The SAS System          09:22 Thursday, August 18, 2005

      Physical Name: C:\test\fmtsum_test\testing\data
NOTE: Libname LIBRARY refers to the same physical library as TEMPLIB.
NOTE: Libref LIBRARY was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\test\fmtsum_test\testing\data

NOTE: PROCEDURE FORMAT used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      
NOTE: The data set WORK.FORMAT has 18 observations and 21 variables.

NOTE: Libref _TEMPLIB was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\test\fmtsum_test\testing\saspgm

NOTE: Table WORK.FMTSUM created, with 11 rows and 3 columns.

NOTE: Table WORK.FMTSUMVAR created, with 3 rows and 1 columns.

49            *** Create the summary of the formats with associated data sets ***;
50            data work.fmtsum;
51               set work.fmtsum;
52               attrib data length=$100 label="Associated Data";
53               if fmtname = "CHARFMT" or fmtname = "" then data = "work.test";
54               if fmtname = "DIFFNAME" or fmtname = "" then data = "work.test";
55               if fmtname = "" or fmtname = "INCODE" then data = "work.test";
56            run;

NOTE: There were 11 observations read from the data set WORK.FMTSUM.
NOTE: The data set WORK.FMTSUM has 11 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

57            *** Create the summary of formats pertaining to variables ***;
58            data work.fmtsumvar;
59               set work.fmtsumvar;
60               attrib data length=$100 label="Associated Data";
61               attrib var1 length=$100 label="Associated Variable as Format";
62               attrib var2 length=$100 label="Associated Variable as Informat";
63               if fmtname = "CHARFMT" then do;
64                  data = "work.test";
65                  var1 = "var1";
66               end;
67               if fmtname = "CHARFMT" or fmtname="" then output;
68               if fmtname = "DIFFNAME" then do;
69                  data = "work.test";
70                  var1 = "var2";
71               end;
4                                       The SAS System          09:22 Thursday, August 18, 2005

72               if fmtname = "DIFFNAME" or fmtname="" then output;
73               if fmtname = "INCODE" then do;
74                  data = "work.test";
75                  var2 = "var3";
76               end;
77               if fmtname = "" or fmtname="INCODE" then output;
78            run;

NOTE: There were 3 observations read from the data set WORK.FMTSUMVAR.
NOTE: The data set WORK.FMTSUMVAR has 3 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

79         

80         proc sort data = work.fmtsum;
81            by fmtname;
82         run;

NOTE: There were 11 observations read from the data set WORK.FMTSUM.
NOTE: The data set WORK.FMTSUM has 11 observations and 4 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds
      

83         
84         title1 height=2'--- Format Summary ---';
85         title2 height=2'--- Format Path: ..\data ---';
86         title3 height=2'--- Data: work.test ---';
87         
88         proc print data = work.fmtsum label
89                  style(header)=[font_size=2]
90                  style(column)=[font_size=2];
91         
92         by fmtname;
93         run;

NOTE: There were 11 observations read from the data set WORK.FMTSUM.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.09 seconds
      cpu time            0.06 seconds
      

94         title1 height=2'--- Format Summary Detailed Variables ---';
95         title2 height=2'--- Format Path: ..\data ---';
96         title3 height=2'--- Data: work.test ---';
97         
5                                       The SAS System          09:22 Thursday, August 18, 2005

98         proc print data = work.fmtsumvar label
99                  style(header)=[font_size=2]
100                 style(column)=[font_size=2];
101        
102        run;

NOTE: There were 3 observations read from the data set WORK.FMTSUMVAR.
NOTE: The PROCEDURE PRINT printed page 2.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

NOTE: The PROCEDURE DISPLAY printed pages 1-2.
NOTE: PROCEDURE DISPLAY used (Total process time):
      real time           0.56 seconds
      cpu time            0.28 seconds
      

103        

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           1.56 seconds
      cpu time            0.96 seconds
      
