Previous Topic: DB2()

Next Topic: DEALLOC()

DEVTYPE()

Use the DEVTYPE() function to issue the IBM macro DEVTYPE SVC (with the DEVTAB and RPS options) and return the 24-byte binary results.

Syntax

The DEVTYPE() function has this syntax:

data = DEVTYPE(ddname)

Arguments

The DEVTYPE() function takes these arguments:

data

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

DDname on which the DEVTYPE is to be issued.

Return Codes

The DEVTYPE() function produces these return codes.

101

ARG 1 MISSING OR INVALID

120

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