Use the DEVTYPE() function to issue the IBM macro DEVTYPE SVC (with the DEVTAB and RPS options) and return the 24-byte binary results.
The DEVTYPE() function has this syntax:
data = DEVTYPE(ddname)
The DEVTYPE() function takes these arguments:
24 bytes of data or error text. The format of the returned data is that of the DEVTYPE SVC with DEVTAB and RPS options specified. Further information may be found in the IBM manual, System Data Administration (GC26-4010).
DDname on which the DEVTYPE is to be issued.
The DEVTYPE() function produces these return codes.
ARG 1 MISSING OR INVALID
DDNAME NOT FOUND
Example
x = devtype('SYSUT1') /* Check for allocated file */
if rc = 120 then do /* Perform if DDNAME not allocated */
say 'SYSUT1 not allocated'
end
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |