home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: bit.listserv.sas-l
- Path: sparky!uunet!destroyer!gatech!taco!unity.ncsu.edu!realliso
- From: realliso@unity.ncsu.edu (Robert Allison)
- Subject: line length - solution
- Message-ID: <1992Sep3.161546.13621@ncsu.edu>
- Sender: news@ncsu.edu (USENET News System)
- Organization: North Carolina State University Project Unity
- Date: Thu, 3 Sep 1992 16:15:46 GMT
- Lines: 57
-
- Thanks for all the replies to my question regarding
- long lines of data on Unix/SAS.
-
- Several people responded with the tip "use the LRECL
- option on the INFILE line". Several people point out
- that the SAS/Unix might assume a line length of < 256
- unless you specify otherwise.
-
- More interesting, though, is that my data file is *strange*.
- When I look at it with cat, more, or vi (even with :set list
- turned on) it looks like the following:
-
- 142010999000282574599........... (lots more numbers out to col 261)
-
- And I would tend to want to use the following SAS program to
- read it in..
-
- data ser14;
- infile 'ser14.88_10' lrecl=261;
- input
- sernum $ 1-2
- year $ 3-6
- age $ 7-9
- totpop 10-21 etc, etc
-
- -----------------------------------------------
-
- But there must be some 'invisible' non-printing characters
- that make me have to use the column positions that the
- Census publishes in their Record Layout that came with the
- tape (which I should have believed and used in the first
- place, eh :)
-
- The following code works fine..
-
- data ser14;
- infile 'ser14.88_10' lrecl=288;
- input
- sernum $ 1-12
- year $ 13-24
- age $ 25-36
- totpop 37-48 etc, etc
-
- -------------------------
-
- Does anyone know anything about these 'special characters' that
- don't show up when I look at the data, but that do affect the
- column positions?
-
- Thanks,
- Robert Allison (realliso@unity.ncsu.edu)
-
-
-
-
-
-
-