Use PROC SOURCE to read
PDS or PDSE libraries and produce sequential output.
You can use the SOURCE
procedure to perform the following tasks:
-
write the contents of an entire
library to the SAS log.
-
process only the directory of a
library in order to produce input for SAS software, for a utility,
or for other programs.
-
route the members of a library
to other programs for processing. By default, PROC SOURCE generates
records for the IBM utility, IEBUPDTE, which reloads an unloaded data
set.
-
create a sequential, or unloaded,
version of the library's directory records.
-
construct an unloaded data set
from a library. The unloaded data set is suitable for reloading by
IEBUPDTE or other source library maintenance utilities, including
the ability to recognize and properly handle aliases.
Using
the SOURCE procedure, a source library can be copied into a sequential
tape or disk data set to create either a backup or a manually transportable
copy of the source data. This copy is called an
unloaded
data set; it consists of 80-byte records that
contain the source data and the control information that are needed
to restore the source to its original organization. When an unloaded
data set is restored by the proper utility to a device that supports
the data in their original form, the data is reconstructed, or
loaded.
The INDD and OUTDD data
sets can have an LRECL that is greater than 80. The larger LRECL might
be useful if you want to simply concatenate input data set members
in the output data set with no BEFORE or AFTER records. If the INDD
and OUTDD LRECL do not have the same LRECL value, then the value of
the OUTTD LRECL must be equal to or greater than the value of the
INDD LRECL. If the value of the OUTDD LRECL is less than the value
of the INDD LRECL, the records are truncated at the OUTDD LRECL.
For example, when the INDD LRECL=128 and the OUTDD LRECL=80, records
will be truncated to 80 bytes and the 48 bytes of each record will
be lost in OUTDD.
An advantage of having
an unloaded data set is that one or more members can be retrieved
without reloading the entire library.
PROC
SOURCE has several advantages over IBM's IEBPTPCH utility. With PROC
SOURCE, you can perform the following tasks:
-
list members in alphabetical order
-
select members by specifying a
wildcard or range
-
list the number of records in each
member
-
list each member on a new page
-
produce an unloaded version of
the library that can be ported to some other host systems.
The
model-control-statements in
the FIRST, LAST, BEFORE, and AFTER statements are usually either utility
or job control statements, depending on the destination given by the
OUTDD= option in the PROC SOURCE statement.