home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / bit / listserv / sasl / 3832 < prev    next >
Encoding:
Text File  |  1992-08-20  |  2.8 KB  |  74 lines

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