Date: Tue, 6 Aug 2002 08:15:55 -0400
Reply-To: "Livingston, Arthur (OIG/OAS)" <ALIVINGSTON@OIG.HHS.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Livingston, Arthur (OIG/OAS)" <ALIVINGSTON@OIG.HHS.GOV>
Subject: Re: a (Raithel-type) tape question
Content-Type: text/plain; charset="iso-8859-1"
Mary:
I have to do this quite frequently with data that I receive. I usually sort the data by a unique variable (usually a product code or member id), then read each tape to determine what the first record on each tape. By doing this, I know that if I have to find a particular record(s) on a tape, I can just ask for that specific tape to be mounted.
Since you only want the first 20 records from the tapes code your JCL like this:
//INPUT1 DD DISP=SHR,
// DSN=TAPE.PMT0201.MATHHPOL.SAS,
// VOL=SER=XXXXXX
-----Original Message-----
From: McCracken, Mary [mailto:MFie2@ALLSTATE.COM]
Sent: Monday, August 05, 2002 3:05 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: a (Raithel-type) tape question
Hi All,
I am rather new to the MVS platform and still trying to master all the
information from Michael Raithel's wonderful book. However I have stumbled
upon a question that I can not seem to find the answer to. I am trying to
take a sample of the first 20 observations of a SAS dataset. When done with
a disk file, the results are almost instantaneous.
However, I am trying to do the same with a tape file. The file is on 9
tapes. All 9 tapes are mounted and read before SAS seems to acknowledge
that there is a global parm limiting it 20 records. Can someone explain to
me why all 9 tapes need to be mounted? Is there a faster way to take a
small sample of a tape file?
My coding is below. Thanks in advance for any assistance!
-Mary
//SAS2SAS JOB PMT0201,M.FIELDEN,
// CLASS=D,MSGCLASS=P,NOTIFY=MFIEL
//*==================================================
//STEP1 EXEC SAS,REGION=6800K
//INPUT1 DD DISP=SHR,
// DSN=TAPE.PMT0201.MATHHPOL.SAS
//OUTREC1 DD DISP=(NEW,CATLG),UNIT=DISK,
// SPACE=(CYL,(950,500),RLSE),
// DSN=TEMP.PMT0201.DATASET.SAS.SAMPLE
//SYSIN DD *
options obs=20 ERROR=2
nocenter ps=800 ls=120;
DATA OUTREC1.DATA;
SET INPUT1.DATA;
RUN;
|