ZDSYATT Function: z/OS

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

Syntax

zdsyatt(variable name, indexj);

Required Arguments

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

Details

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;
end;

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.

Example

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;
    end;  
end;
The output format for ZDSYATT is a character variable. For an example of its contents, see the Example section of the ZDATTR function.