|
David West, in particular, wrote:
...
> With regard to using the Libname statement within a batch job on MVS, the
> default disposition is SHR...at least it was when I
> was running code on MVS. I don't think that this varies from site to site.
>
Yes, it does. At my current site (AT&T UCS in Jacksonville),
the default disposition is DISP=OLD, so any attempt to even
read a SAS dataset by two jobs simultaneously without
explicitly specifying DISP=SHR on the LIBNAME statement
fails. At least at one other site where I have worked, the
default used to be DISP=SHR.
>
> There are two things to consider when using the libname statement in an MVS
> batch job rather than using JCL. First, if you use JCL, the dataset will
> be tied up by the job for its duration. If you have a long running job
> which uses a library briefly before moving on to more time consuming
> matters, other users may not access that library with anything other than
> read access (assuming you used DISP=SHR). However, if you use the libname
> statement, you can clear the libref when you are finished using it and the
> dataset will be available for others. Second, if you use JCL to allocate a
> lib to your job, and SMS is configured appropriately, migrated or
> unavailable datasets will be retrieved and made available to the job. If
> you use the libname statement, you will simply get a dataset error and the
> job will abend.
>
Again, this is site dependent. Here at UCS, issuing a
LIBNAME (or, for that matter, a FILENAME) statement against
an archived or migrated data set causes the same effect as
referencing it in a JCL's DD, and this has never been a
reason for an abend.
>
...
As far as LIBNAME/FILENAME vs. JCL goes, there is nothing in
JCL that cannot be done in LIBNAME/FILENAME, but not vice
versa. LIBNAME/FILENAME are code statements able of being
fully programmatically controlled, for instance, by means of
the Macro Language, whilst JCL allows certain logical
flexibility only at the job step level. One of SAS's
greatest and often underestimated features is its ability to
question existence, all the attributes, deletion and
creation of OS files WHOSE NAMES ARE DATA DRIVEN, on the
fly. As a result, a simple task of splitting an input file
containing some date field into a number of files, whose
records correspond to the same date and whose system names
contain the date in certain format, is a no-brainer to do in
SAS, but try to handle it in JCL! This is a typical
situation where COBOL with its much heralded ability to
'manipulate complex business data' simply fails to perform,
as files it processes must be hard-coded into JCL.
My $.02, anyway...
Kind regards,
+++++++++++++++++++++++++++++++++
Paul M. Dorfman
AT&T UCS Decision Support Systems
Jacksonville, FL
+++++++++++++++++++++++++++++++++
|