Example: SAS DATA Step with zDLA Functions

%MACRO ZDSLINT(DFILT,VFILT,OPTP);
  DATA _NULL_;
  FILE PRINT;
 
  LENGTH XVOLS $1024;
  LENGTH UNITNM VFILTER $64;
  UNITNM = '3390';
  VFILTER = &VFILT;
  XVOLS = ZVOLLIST(UNITNM, VFILTER);
  PUT XVOLS=;
  PUT;
  
  LENGTH XDSN $32000;
  LENGTH CATGRY DFILTER OPTPARM $256;
  CATGRY = 'CATLG';
  DFILTER = &DFILT;
  OPTPARM = &OPTP;
  XDSN=ZDSLIST(CATGRY, DFILTER, XVOLS, OPTPARM);
  PUT XDSN=;
  PUT;
  
  LENGTH XNUM 8;
  XNUM=ZDSNUM(XDSN);
  PUT XNUM=;
  PUT;
 
  LENGTH XIDNM XATTR $4096;
  LENGTH XATTRN 8;
  LENGTH XATTRC $72;
  DO I=1 to XNUM;
     XIDNM=ZDSIDNM(XDSN, I);
     PUT XIDNM=;
     PUT;
  
     XATTR=ZDSATTR(XIDNM, ‘ALL’);
     
     XATTRN=ZDSXATT(xattr);
     PUT XATTRN=;
     PUT;
     DO J = 1 TO XATTRN;
        XATTRC = ZDSYATT(XATTR, J);
        PUT @1 XATTRC;
     END;
  PUT;
END;
RUN;
%MEND ZDSLINT;

%ZDSLINT('USERID.*.LIST', 'SMS*', '')
quit;

Listing Output from the DATA Step Example

XVOLS=SMS007,SMSOVR,SMS001,SMS004,SMS002

XDSN=ZDSLIST:USERID.SUPERC.LIST

XNUM=1

XIDNM=USERID.SUPERC.LIST

XATTRN=31

USERID.SUPERC.LIST                     
1                                          	 Total Volume Count
** FILE ATTRIBUTES **
1993/05/17                                  	Creation Date
.                                           	Expiration Date
2010/07/12                                  	Last Referenced Date
PS                                         	 Data Set Organization
NO                                          	EATTR option
NO                                              Compressible option
.                                           	Data Class
STD2YEAR                                   	 Management Class
STD                                         	Storage Class
NONE                                       	 Data Set Type
FBA                                         	Record Format
133                                         	Logical Record Size
3325                                        	Blocksize
** END FILE ATTRIBUTES **
** VOLUME ATTRIBUTES **
SMS004                                     	 Volume Serial
3390                                        	Device Type
Blocks                                      	Unit of Allocation
3390                                        	Device Name
14                                          	Primary Allocation
12                                          	Secondary Allocation
2                                          	 Allocated Extents
28                                         	 Allocated Blocks
2                                           	Used Extents
3                                           	Used Blocks
1                                           	Volume Sequence No.
NO                                          	EAV Volume
************                                **********
** END VOLUME ATTRIBUTES **