![]() Chapter Contents |
![]() Previous |
![]() Next |
| DINFO |
| OS/390 specifics: | info-item |
| Syntax | |
| Details | |
| Example 1: UNIX System Services Directory Information | |
| Example 2: PDS Directory Information | |
| Example 3: PDS Directory Information | |
| See Also |
Syntax |
| DINFO (directory-id, info-item) |
| Details |
Directories opened with the DOPEN function are identified by a directory-id and have a number of associated information items. The DINFO, DOPTNAME, and DOPTNUM functions support the following directory information items under OS/390.
| Item | Item Identifier | Definition |
|---|---|---|
| 1 | File Name | Directory name |
| 2 | Access Permission | Read, write, and execute permissions for owner, group, and other |
| 3 | Number of Links | Number of links in the directory |
| 4 | Owner Name | User ID of the owner |
| 5 | Group Name | Name of the owner's access group |
| 6 | Last Modified | Date contents last modified |
| Item | Item Identifier | Definition |
|---|---|---|
| 1 | Dsname | PDS name |
| 2 | Unit | Disk type |
| 3 | Volume | Volume on which data set resides |
| 4 | Disp | Disposition |
| 5 | Blksize | Block size |
| 6 | Lrecl | Record length |
| 7 | Recfm | Record format |
| Item | Item Identifier | Definition |
|---|---|---|
| 1 | Dsname | PDSE name |
| 2 | Dsntype | Directory type |
| 3 | Unit | Disk type |
| 4 | Volume | Volume on which data set resides |
| 5 | Disp | Disposition |
| 6 | Blksize | Block size |
| 7 | Lrecl | Record length |
| 8 | Recfm | Record format |
| Example 1: UNIX System Services Directory Information |
This first example generates output that includes information item names and values for a UNIX System Services directory:
data _null_;
length opt $100 optval $100;
/* Allocate directory */
rc=FILENAME('mydir', '/u/userid');
/* Open directory */
dirid=DOPEN('mydir');
/* Get number of information items */
infocnt=DOPTNUM(dirid);
/* Retrieve information items and */
/* print to log */
put @1 'Information for a UNIX
System Services Directory:';
do j=1 to infocnt;
opt=DOPTNAME(dirid,j);
optval=DINFO(dirid,upcase(opt));
put @1 opt @20 optval;
end;
/* Close the directory */
rc=DCLOSE(dirid);
/* Deallocate the directory */
rc=FILENAME('mydir');
run;
Example 1 Output: UNIX System Services Directory Information
Information for a UNIX System Services Directory: File Name /u/userid Access Permission drwxr-xr-x Number of Links 17 Owner Name MYUSER Group Name GRP Last Modified Apr 26 07:18 NOTE: The DATA statement used 0.09 CPU seconds and 5203K. |
| Example 2: PDS Directory Information |
This second example generates directory information for a PDSE:
data _null_;
length opt $100 optval $100;
/* Allocate directory */
rc=FILENAME('mydir', 'userid.pdse.src');
/* Open directory */
dirid=DOPEN('mydir');
/* Get number of information items */
infocnt=DOPTNUM(dirid);
/* Retrieve information items and */
/* print to log */
put @1 'Information for a PDSE:';
do j=1 to infocnt;
opt=DOPTNAME(dirid,j);
optval=DINFO(dirid,upcase(opt));
put @1 opt @20 optval;
end;
/* Close the directory */
rc=DCLOSE(dirid);
/* Deallocate the directory */
rc=FILENAME('mydir');
run;
Example 2 Output: PDSE Directory Information
Information for a PDSE: Dsname USERID.PDSE.SRC Dsntype PDSE Unit 3380 Volume ABC002 Disp SHR Blksize 260 Lrecl 254 Recfm VB NOTE: The DATA statement used 0.08 CPU seconds and 5203K. |
| Example 3: PDS Directory Information |
This example generates information item names and values for a PDS:
data _null_;
length opt $100 optval $100;
/* Allocate directory */
rc=FILENAME('mydir', 'userid.mail.text');
/* Open directory */
dirid=DOPEN('mydir');
/* Get number of information items */
infocnt=DOPTNUM(dirid);
/* Retrieve information items and */
/* print to log */
put @1 'Information for a PDS:';
do j=1 to infocnt;
opt=DOPTNAME(dirid,j);
optval=DINFO(dirid,upcase(opt));
put @1 opt @20 optval;
end;
/* Close the directory */
rc=DCLOSE(dirid);
/* Deallocate the directory */
rc=FILENAME('mydir');
run;
Example 3 Output: PDS Directory Information
Information for a PDS: Dsname USERID.MAIL.TEXT Unit 3380 Volume ABC005 Disp SHR Blksize 6160 Lrecl 80 Recfm FB NOTE: The DATA statement used 0.07 CPU seconds and 5211K. |
| See Also |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.