Previous Page | Next Page

Procedures under z/OS

CONTENTS Procedure: z/OS



Prints the description of the contents of one or more files from a SAS library.
z/OS specifics: engine/host-dependent information, directory information

Syntax
Details
See Also

Syntax

PROC CONTENTS <option(s)>;


Details

Although most of the output that this procedure generates is the same on all operating environments, the Engine/Host Dependent Information is system-dependent and engine-dependent. The following SAS code creates two data sets, classes.grades and classes.majors, and executes PROC CONTENTS to describe the classes.majors data set.

data grades (label='First Data Set');
   input student year state $ grade1 grade2;
   label year='Year of Birth';
   format grade1 4.1;
   datalines;
1000 1980 NC 85 87
1042 1981 MD 92 92
1095 1979 PA 78 72
1187 1980 MA 87 94
;

data majors(label='Second Data Set');
   input student $ year state $ grade1 grade2 major $;
   label state='Home State';
   format grade1 5.2;
   datalines;
1000 1980 NC 84 87 Math
1042 1981 MD 92 92 History
1095 1979 PA 79 73 Physics
1187 1980 MA 87 74 Dance
1204 1981 NC 82 96 French
;

proc contents data=classes.majors;
run;

The following output shows sample PROC CONTENTS output, including the information that is specific to z/OS for the BASE engine.

CONTENTS Procedure Output, Including Engine/Host Dependent Information

                                CONTENTS PROCEDURE
   Data Set Name  WORK.MAJORS                         Observations:         5
   Member Type    DATA                                Variables:            6
   Engine         V9                                  Indexes:              0
   Created        Tue, Sep 18, 2007 10:11:41 AM       Observation Length:   48
   Last Modified  Tue, Sep 18, 2007 10:11:41 AM       Deleted Observations: 0
   Protection                                         Compressed:           NO
   Data Set Type                                      Sorted:               NO
   Label          MVS_32
   Encoding       open_ed-1047  Western
                  (OpenEdition)

                   -----Engine/Host Dependent Information-----

         Data Set Page Size          6144
         Number of Data Set Pages    1
         First Data Page             1
         Max Obs per Page            127
         Obs in First Data Page      5
         Number of Data Set Repairs  0
         Physical Name               SYS07261.T100745.RA000.USERID.R0107945
         Release Created             9.0202B0
         Release Last Modified       9.0202B0
         Created by                  USERID
         Last Modified by            USERID
         Subextents                  1
         Total Blocks Used           1


         
                                CONTENTS PROCEDURE

                  Alphabetic List of Variables and Attributes

                       #    Variable    Type    Len    Format   Label
                       -----------------------------------
                       4    grade1      Num       8    5.2
                       5    grade2      Num       8    
                       6    major       Char      8    
                       3    state       Char      8             Home State
                       1    student     Char      8    
                       2    year        Num       8

The procedure output provides values for the physical characteristics of the SAS data set WORK.MAJORS. Here are the important values:

Observations

is the number of nondeleted records in the data set.

Observation Length

is the maximum record size in bytes.

Compressed

has the value NO if records are not compressed; it has the value CHAR or BINARY if records are compressed.

Data Set Page Size

is the size of pages in the data set.

Number of Data Set Pages

is the total number of pages in the data set.

First Data Page

is the number of the page that contains the first data record; header records are stored in front of data records.

Max Obs per Page

is the maximum number of records that a page can hold.

Obs in First Data Page

is the number of data records in the first data page.

The DIRECTORY option lists several host-specific library attributes at the beginning of PROC CONTENTS output. The following output shows the directory information that is listed by the following code. You can substitute any directory name for work, but the rest of the command is required.

proc contents data=work._all_ directory;
run;

Engine/Host Dependent Information

                        The CONTENTS Procedure                      
                                                                    
                              Directory                             
                                                                    
   Libref                   WORK                                    
   Engine                   V9                                      
   Physical Name            SYS07261.T100745.RA000.SASKIS.R0107945  
   Unit                     VIO                                     
   Volume                   .                                       
   Disposition              NEW                                     
   Device                   3390                                    
   Blocksize                6144                                    
   Blocks per Track         8                                       
   Total Library Blocks     9120                                    
   Total Used Blocks        36                                      
   Total Free Blocks        9084                                    
   Highest Used Block       36                                      
   Highest Formatted Block  20        
   Members                  2         
   DSNTYPE                  BASIC     

                                Number                   
              Member                of                   
   #  Name    Type    Pagesize   Pages  Created          
                                                        
   1  GRADES  DATA        6144       1  18Sep07:10:11:41 
   2  MAJORS  DATA        6144       1  18Sep07:10:11:41 
The following list explains these library attributes:
Total Library Blocks

is the total number of blocks that are currently allocated to the library. This value equals the sum of Total Used Blocks and Total Free Blocks. It also equals Blocks per Track multiplied by the number of tracks that are currently allocated to the library. The current number of allocated cylinders or tracks can be found in the DSINFO window, or in ISPF panel 3.2. These windows show what the allocation was the last time the library was closed.

Total Used Blocks

is the total number of library blocks that currently contain valid data. This value equals the sum of the directory blocks and all the data blocks that are associated with existing members.

Total Free Blocks

is the total number of currently allocated library blocks that are available for use by members or as extra directory blocks. This count includes any data blocks that were previously associated with members that have been deleted.

Highest Used Block

is the number of the highest relative block in the library that currently contains either directory information or data for an existing member.

Highest Formatted Block

is the number of the highest relative block in the library that has been internally formatted for use. Blocks are internally formatted before they are used, and they are formatted in full track increments. Therefore, the highest formatted block is equal to the Blocks per Track multiplied by the number of tracks that are currently used by the library. The number of currently used cylinders or tracks can be found in the DSINFO window or in ISPF panel 3.2. These windows show what the allocation was the last time the library was closed. This number is also the true end-of-file (EOF) marker. It corresponds to the DS1LSTAR field (or, in the case of large sequential libraries, the DS1TTTHI and DS1LSTAR fields) of the library's Format-1 DSCB entry in the VTOC.

Note:   The same directory information that is generated by the DIRECTORY option in the PROC CONTENTS statement is also generated by the LIST option in the LIBNAME statement.  [cautionend]


See Also

Previous Page | Next Page | Top of Page