Chapter Contents

Previous

Next
DINFO

DINFO



Returns information from the directory of an aggregate external file

CMS specifics: info-item


Syntax
DINFO Output for SFS Directories
DINFO Output for Minidisks
See Also

Syntax

DINFO (directory-id,info-item)

directory-id
specifies the identifier that was assigned when the aggregate external files was opened (generally by the DOPEN function).

info-item
specifies the information item to be retrieved. Under CMS, the single valid value for info-item is DIRECTORY, which returns the directory path associated with directory-id. If directory-id represents a single aggregate, the information returned by DINFO will be of the form 'pathname'. If directory-id represents a concatenated series of aggregates, the information returned by DINFO will be of the form ('pathname_1', ... 'pathname_n').


DINFO Output for SFS Directories

The following example and output illustrate the use of DINFO and the other directory access functions for SFS directories:

data _null_;                                      
   length opt $100 optval $100;                   
   rc=FILENAME('mydir', 'user1.');  /* allocate directory     */
   dirid = DOPEN('mydir');          /* open directory         */
   infocnt=DOPTNUM(dirid); /* get number of information items */
   
   /* retrieve information items and print to log*/
   put @1 'Information for an SFS Directory:';
   do j=1 to infocnt;
      opt = DOPTNAME(dirid,j);
      optval  = DINFO(dirid,upcase(opt));
      put @1 opt @20 optval;
      end ;

   rc = DCLOSE(dirid);            /* close the directory      */
   rc = FILENAME('mydir');        /* deallocate the directory */
run;

DINFO Output for an SFS Directory
Information for an SFS Directory:                     
Directory          SFSFP:USER1 .                            
NOTE: DATA statement used:                                  
      real time           0.85 seconds                      
      cpu time            0.28 seconds                      
                                                            


DINFO Output for Minidisks

The following example and output illustrate the use of DINFO and the other directory access functions for minidisks:

data _null_;
   length opt $100  optval $100;
   rc=FILENAME('mydir', 'A'); /* allocate directory */
   dirid = DOPEN('mydir'); /* open directory */
   infocnt=DOPTNUM(dirid); /* Get number of information items */

   /* Retrieve information items and print to log*/
   put @1 'Information for a Minidisk Directory:';
   do j=1 to infocnt;
      opt = DOPTNAME(dirid,j);
      optval  = DINFO(dirid,upcase(opt));
      put @1 opt @20 optval;
   end;
   
   rc = DCLOSE(dirid);  /* close the directory */
   rc = FILENAME('mydir'); /* deallocate the directory */
run;                                                  

DINFO Output for a Minidisk
                                                                
Information for a Minidisk Directory:                           
Directory          A                                            
NOTE: DATA statement used:                                      
      real time           0.18 seconds                          
      cpu time            0.18 seconds                                                                 


See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.