VDS_GET_SN_RANGE(3)
NAME
vds_get_sn_range
parse serial number range from a VDS name specification
SYNOPSIS
#include <soi_vds.h>
VDS *vds_get_sn_range (KEY *params, char *name, int ds,
int *fsn, int *lsn, int *dsn, int flag)
DESCRIPTION
For a dataset name associated with the argument name,
dataset number ds, and selectors in a params keylist, opens
and returns a VDS, and returns as arguments the first and
last sn's for the dataset, either assuming continuity or not
depending on the flag value.
This function is motivated by a useful ambiguity in the
dataset naming scheme: it is not stated whether the data
selector (record range within a dataset) applies indepen-
dently to each dataset or collectively to the whole series.
Thus the dataset name
prog:a,series:b[5-9],sel:[32-48,2]
can be interpreted to mean every other record starting with
32 and ending with 48 in each dataset, or to mean every
other record in the entire series starting with 32 in
dataset #5 and ending with 48 in dataset #9. Depending on
the setting of the "discontinuous" flag value, this function
will return the appropriate record range for a given dataset
number. A flag value of true means that the series is
discontinuous, the starting and ending values applying
separately to each set in the series.
DIAGNOSTICS
If the requested data set cannot be opened a NULL is
returned; if the record selection is continuous and the
dataset is neither the first nor the last in the range, the
value returned for lsn is -1.
FILES
~CM/src/libvds.d/vds_util.c
SEE ALSO
vds_record_count(3), track_region(1)
BUGS
May fail for data set numbers (ds) outside range [-9999,
99999].
If the increment is not 1 and the selector is "continuous"
the results may be unexpected; no information about phase is
retained.
HISTORY
1999-12-17 SOI V 4.5 Rick Bogart - changed calling
sequence