DSNCATLGD returns a
value of 1 if the filename is found in the
z/OS system catalog, and
a value of 0 if the filename is not found in the catalog.
DSNCATLGD is similar
to the FILEEXIST function, but there are some differences that make
DSNCATLGD the preferred function to use in some circumstances. DSNCATLGD
does not cause dynamic allocation to occur, which is useful for tape
data sets because it does not require that a tape be mounted.
When a batch job is
creating a new
z/OS data set, DSNCATLGD will not return a value of
1 until the job step that creates the data set terminates. FILEEXIST
uses dynamic allocation to verify that the data set exists. It returns
a value of 1 anytime after the start of the batch job that is creating
the data set.
Note: z/OS enters a dynamically
allocated data set into the system catalog immediately at the time
of the dynamic allocation request. All allocations made by TSO users
are treated in this manner.