Date: Fri, 12 Mar 1999 08:34:18 -0500
Reply-To: "gtiedens@njcmail.ups.com" <gtiedens@njcmail.ups.com>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Gary Tiedens <gtiedens@NJCMAIL.UPS.COM>
Organization: United Parcel Service
Subject: Re: (MVS) Re:Loading a empty vsam dsn from a data step....
Content-Type: text/plain; charset="us-ascii"
Mike,
Thank you very much... I put in options vsamload, and the job took off
with no problem (other then the performance people complaining). One thing
I dont understand is: why would the default be novsamload. Nobody at my
company seems to know how that is set....
Gary
-----Original Message-----
From: RAITHEM [SMTP:RAITHEM@WESTAT.COM]
Sent: Friday, March 12, 1999 8:16 AM
To: SAS-L@UGA.CC.UGA.EDU
Subject: (MVS) Re:Loading a empty vsam dsn from a data step....
Gary Tiedens posted the following (interesting) question:
>I am trying to load up an empty vsam file. And I came across a >vsamload
statememt. Does anyone know how I would use this. Every >variation that I
have
tried has given me an error.
Gary, ahh..., VSAM; access method of the Gods! You should not have any
problem
loading a VSAM file from the SAS System for Information Delivery. I think
that
you might be mistaking the SAS (under MVS) VSAMLOAD Option for a SAS
statement. The VSAMLOAD option enables the SAS System to load VSAM files.
This
option is found in the System Config file, and the default is NOVSAMLOAD.
You
can override it in the usual places (if your clever SAS Administrator has
not
already done so). The easiest way to do this is in an OPTIONS statement at
the
beginning of your program:
OPTIONS VSAMLOAD;
Once you have the VSAMLOAD system option whipped into shape, you can go
about
loading your VSAM file. Here is an example of reading a flatfile and
loaded the
records into a VSAM file:
********************************************;
* INPUT DATA/LOAD VSAM FILE *;
********************************************;
DATA _NULL_;
INFILE FLATFILE;
FILE VSAMFILE VSAM;
INPUT @1 KEY1 6.
@7 KEY2 $27.
@34 VALUE1 15.
@49 VALUE2 15.
;
PUT @1 KEY1 6.
@7 KEY2 $27.
@34 VALUE1 15.
@49 VALUE2 15.
;
In the example, above, consider that the flatfile and VSAM file were
already
allocated with the proper DISPositions. The FILE statement must have the
word
"VSAM" after the fileref to identify the file as a VSAM file to the SAS
System.
Since the VSAMLOAD SAS System option is in effect, the PUT statement _CAN_
load
records into the VSAM data set.
Gary, if you will be at SUGI 24 in Miami, you might want to attend my
Systems
Architecture Section (Michael Davis of Bassett Consulting, Section Chair)
presentation: "Optimizing the Processing of VSAM Data Sets With the SAS
System." The techniques in this presentation will help you to turbo-charge
your
SAS applications that process VSAM data sets.
On a similar note, if you are going to do a lot of SAS--VSAM work, you
might
want to pick up the following book from the SAS Institute:
SAS Guide to VSAM Processing, Version 5 Edition
The edition above, is the only edition that the SAS Institute published,
and is
still relevant, despite being written for Version 5 of the SAS System. I
don't
know the SI Pub number, but the ISBN is: 0-917382-89-7. It is a good buy.
Gary, good luck in cramming your VSAM data set's CI's and CA's full of good
data
using the SAS System for Information Delivery!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not
reflect
those of my organization or my associates.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
"The man who wrote the book on performance."
E-mail: raithem@westat.com
Author: Tuning SAS Applications in the MVS Environment
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...walking down the road, trying to lighten my load... -- The Eagles
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++