#include <os.h> int osdnext(struct DSNINFO *info);
osdnext
finds the next MVS data set or member matching a pattern
previously defined in a call to osdfind
. The info
pointer points to a
DSNINFO
structure filled in by a previous call to osdfind
. If a
match is found, information about the matching data set or member is placed in
the structure pointed to by info
, as with osdfind
. Refer to the
description of osdfind
for a listing of the DSNINFO
structure.
osdnext
returns 0 if a matching data set or PDS member is found, or
- 1 if no match is found. Other negative values may be returned to
indicate fatal errors, after which no more names can be returned.
If a minor error occurs, a positive value may be returned, indicating that
the names of some files or members could not be returned, but that another
call to osdnext
may successfully return additional names. For example,
if osdnext
is unable to return PDS members because a PDS directory is
corrupt, osdnext
returns a positive return code to indicate that it may
be possible to return members of other PDSs matching the pattern.
osdnext
assumes that the PDS directory for a (*) pattern will not be modified
during processing. If a write to the data set or member occurs during the
execution of osdnext
, the results are unpredictable. The results
are also unpredictable if files or members matching the pattern are added or
deleted between the call to osdnext
and the corresponding osdquit
.
The first 16 bytes of the DSNINFO
structure are reserved for use in
subsequent calls to osdnext
. Do not alter this area because the effects are
unpredictable.
The catalog searches by osdnext
use a 65K buffer to hold data set names.
For this reason, all matching filenames may not be returned if the highest
level qualifier identifies more than about 1,400 filenames. For example, if
there are more than 1,400 files under the index ORDERS, then osdnext
with
the pattern ORDERS.*.LOG returns only matching names from the first 1,400. This
is a limitation of the operating system, not of SAS/C.
osdfind
.
osdfind
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.