ZDSYATT Function: z/OS

Displays each attribute that is created by zdsattr().
Category: External Files
z/OS specifics: info-item


zdsyatt(variable name, indexj);

Required Arguments

variable name
specifies the name of the variable that is created by ZDSATTR.
represents an index into the attribute list within the first parameter.This index can be derived from the variable that is produced by ZDSXATT.


Invoking ZDSYATT

Use the following method to invoke the ZDSXATT function:
length xattrc $72;
do i = 1 to 10;
   xattrc=zdsyatt(variable name, indexj);
   put @1 xattrc;

Processing Specifics

ZDSYATT extracts each attribute from the variable that is created by zdsattr() based on the index that is passed from the do loop. It returns that attribute to the 72-byte–byte character variable that is declared as the function’s output variable. If the output variable is too small, a note is issued. An ERROR message is issued after the note.


length xattr $4096;
length xdsn $4096;
length xidnm $256;
length xnum 8;
length xattrn 8;
length xattrc $72;
xdsn = zdslist(‘catlg’, ‘sasdrc.sas.*’, ‘’, ‘’);
xnum = zdsnum(xdsn);
do i = 1 to xnum; 
    xidnm = zdsidnm(xdsn, i);
    xattr = zdsattr(xidnm, ‘ALL’);
    xattrn = zdsxatt(xattr);
    do j = 1 to xattrn;
    			xattrc=zdsyatt(xattr, j);
   			 put @1 xattrc;
The output format for ZDSYATT is a character variable. For an example of its contents, see the Example section of the ZDATTR function.