home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / bit / listserv / sasl / 3974 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.8 KB  |  70 lines

  1. Newsgroups: bit.listserv.sas-l
  2. Path: sparky!uunet!gatech!taco!unity.ncsu.edu!realliso
  3. From: realliso@unity.ncsu.edu (Robert Allison)
  4. Subject: line length limit?
  5. Message-ID: <1992Sep1.213745.29196@ncsu.edu>
  6. Sender: news@ncsu.edu (USENET News System)
  7. Organization: North Carolina State University Project Unity
  8. Date: Tue, 1 Sep 1992 21:37:45 GMT
  9. Lines: 59
  10.  
  11. I'm running SAS 6.07 on a DECstation under X-Windows.
  12.  
  13. I have recently received a tape with population projections
  14. from the US Census.  There are 30 different series, with 
  15. projections by age, race, and sex for 1988-2080.
  16.  
  17. The whole file is ~200 Mb, so I have copied out the 2346 lines
  18. for the Series 14 projection for years 1988 - 2010 (~0.6 Mb)
  19.  
  20. I have transferred this file to my Unix workstation, but the
  21. lines are so long (261 characters) that several Unix commands 
  22. won't even work on it.  (eg. tail will work, but head won't,
  23. also cut command I had planned to use to get certain columns
  24. does not seem to work with this size lines.)
  25. SAS does not seem to want to read in the data correctly either.
  26.  
  27. Do any of you guys have tricks for handling long lines on Unix
  28. systems (and/or in SAS)?  If all else fails, I'll probably write
  29. a C program to extract out certail columns like I was wanting 
  30. cut to do.
  31.  
  32. Thanks,
  33. Robert Allison (realliso@unity.ncsu.edu)
  34.  
  35. -----here's my SAS code---------
  36.  
  37. data ser14;
  38. infile '/tmp/bob/ser14.88_10';
  39.    input
  40.    sernum   1-2
  41.    year     3-6
  42.    age      7-9
  43.    totpop   10-21
  44.    totmale  22-33
  45.    totfema  34-45
  46.    totwhite 46-57
  47. /* whitmale 58-69
  48.    whitfema 70-81
  49.    totblack 82-93
  50.    blacmale 94-105
  51.    blacfema 106-117
  52.    totdeath 118-129
  53.    totmdeat 130-141
  54.    totfdeat 142-153
  55.    whitdeat 154-165
  56.    wmdeaths 166-177
  57.    wfdeaths 178-189
  58.    blacdeat 190-201
  59.    bmdeaths 202-213
  60.    bfdeaths 214-225
  61.    totbirth 226-237
  62.    whitbirt 238-249
  63.    blacbirt 250-261 */
  64.    ;
  65. run;
  66.  
  67. proc print data=ser14;
  68. run;
  69.  
  70.