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

  1. Newsgroups: bit.listserv.sas-l
  2. Path: sparky!uunet!destroyer!gatech!taco!unity.ncsu.edu!realliso
  3. From: realliso@unity.ncsu.edu (Robert Allison)
  4. Subject: line length - solution
  5. Message-ID: <1992Sep3.161546.13621@ncsu.edu>
  6. Sender: news@ncsu.edu (USENET News System)
  7. Organization: North Carolina State University Project Unity
  8. Date: Thu, 3 Sep 1992 16:15:46 GMT
  9. Lines: 57
  10.  
  11. Thanks for all the replies to my question regarding 
  12. long lines of data on Unix/SAS.
  13.  
  14. Several people responded with the tip "use the LRECL
  15. option on the INFILE line".  Several people point out
  16. that the SAS/Unix might assume a line length of < 256
  17. unless you specify otherwise.
  18.  
  19. More interesting, though, is that my data file is *strange*.
  20. When I look at it with cat, more, or vi (even with :set list
  21. turned on) it looks like the following:
  22.  
  23. 142010999000282574599........... (lots more numbers out to col 261)
  24.  
  25. And I would tend to want to use the following SAS program to
  26. read it in..
  27.  
  28. data ser14;
  29. infile  'ser14.88_10' lrecl=261;
  30.    input
  31.    sernum   $ 1-2
  32.    year     $ 3-6
  33.    age      $ 7-9
  34.    totpop     10-21 etc, etc
  35.  
  36. -----------------------------------------------
  37.  
  38. But there must be some 'invisible' non-printing characters
  39. that make me have to use the column positions that the 
  40. Census publishes in their Record Layout that came with the
  41. tape (which I should have believed and used in the first 
  42. place, eh :)
  43.  
  44. The following code works fine..
  45.  
  46. data ser14;
  47. infile  'ser14.88_10' lrecl=288;
  48.    input
  49.    sernum   $ 1-12
  50.    year     $ 13-24
  51.    age      $ 25-36
  52.    totpop     37-48 etc, etc
  53.  
  54. -------------------------
  55.  
  56. Does anyone know anything about these 'special characters' that
  57. don't show up when I look at the data, but that do affect the 
  58. column positions?
  59.  
  60. Thanks,
  61. Robert Allison (realliso@unity.ncsu.edu)
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.