home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!gatech!paladin.american.edu!auvm!UVVM.BITNET!KLASSEN
- Message-ID: <SAS-L%92082019325401@UALTAVM.BITNET>
- Newsgroups: bit.listserv.sas-l
- Date: Thu, 20 Aug 1992 18:00:00 PDT
- Reply-To: Melvin Klassen <KLASSEN@UVVM.BITNET>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Melvin Klassen <KLASSEN@UVVM.BITNET>
- Subject: Re: my thanks and some results
- Lines: 62
-
- On Thu, 20 Aug 1992 19:26:00 EDT <X_S_CONS@CUTCV2> said:
- >... by first looking at the WORK default setting in SAS cataloged procedure.
- >Here, the WORK space=(6144,(800,400)) is for version 6.07,
- >while space=(CYL,(500,100)) for version 6.06!!
-
- So, in 6.06, if there was sufficient space on the disk,
- SAS would have used 500 cylinders (7500 tracks) as the "primary" space,
- and up to 300 cylinders (three increments of 100) of "secondary" space.
- The complete disk is 885 cylinders, but you won't get the "last" 55 cylinders,
- because your secondary-allocation-unit is 100 cylinders,
- and MVS won't give you less-than-one allocation-unit.
-
- Under 6.07, since there are 7 blocks (of 6144 bytes each) per track,
- and there are 15 tracks per cylinder, you'll get a maximum
- of 115 tracks (16.4 cylinders) of "primary" space,
- and up to 870 tracks (15 increments of 58 tracks) of "secondary" space.
-
- That's quite(!) a lot less disk-space.
-
- > 3 DATA MAT;
- > 4 INFILE MAT92;
- > 5 INPUT ... $CHARw.
- > 15 RUN;
- >
- > NOTE: 171020 records were read from the infile MAT92.
- > NOTE: The data set USER.MAT has 171020 observations and 119 variables.
- > NOTE: The DATA statement used the following resources:
- > CPU time - 00:00:41.68
- > Elapsed time - 00:01:15.70
- > EXCP count - 2877
- >
- > 19 DATA MAT;
- > 20 SET MAT;
- > 21 BY ID;
- > 22 IF FIRST.ID THEN S=0; S+1;
- > 23 RUN;
- >
- > NOTE: The data set USER.MAT has 171020 observations and 120 variables.
- > NOTE: The DATA statement used the following resources:
- > CPU time - 00:00:05.48
- > Elapsed time - 00:01:06.14
- > EXCP count - 1338
- >
- Assuming that SAS statements you omitted from your posting
- were **not** an invocation of 'PROC SORT', please note that
- you could have combined the second DATA step as part of the first DATA step.
-
- It would have eliminated(!) the 1338 I/O operations,
- and would have not(!) consumed about 90% of the 5.48 CPU seconds,
- and would have only used 50% as much disk-space in the WORK library.
-
- DATA MAT; /* recoded for efficiency */
- INFILE MAT92;
- INPUT ID ... $CHARw.
- RETAIN S 0; LENGTH S 4;/* Allow S to be up to 2**24 */
- IF LAG(ID) = ID THEN S+1;
- ELSE S=1;
- RUN;
-
- P.S. If you did need to sort the file, it still would be more CPU-efficient
- to sort the file using a sort package (SyncSort, CA-SORT, IBM Sort)
- **before** reading the records into SAS.
-