A client sent me an ASCII flat text file that looks fine in NOTEPAD and Excel will import w/o issue, but when I read it in SAS using "input" everything blows up because SAS sees '00'X as every other character. Is there an input option to accomodate this?
Example of SAS LOG:
NOTE: Invalid data for costcenterid in line 2 37-39.
NOTE: Invalid data for accountid in line 2 100-113.
NOTE: Invalid data for amount in line 2 193-193.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---
2 CHAR .2.0.1.1.-.1.0.-.0.1. .0.0.:.0.0.:.0.0. . . . . .O.c.t. .1.1. .A.c.t. . . .1.2.3.4.5. .
ZONE 0303030302030302030302030303030303030302020202020406070203030204060702020203030303030202
NUMR 020001010D01000D00010000000A00000A000000000000000F03040001010001030400000001020304050000
89 . . . . . .A.l.l.e.g.r.a. .W.r.i.t.e.-.o.f.f. . . . . . . . . . . . . . . . . . . . . .
ZONE 0202020202040606060607060205070607060206060602020202020202020202020202020202020202020202
NUMR 0000000000010C0C050702010007020904050D0F060600000000000000000000000000000000000000000000
177 . . . . . . . . . . . . .6.7.8.9.9.9. . . . . . . . . . . . . . . . . . . . . . . . . .
ZONE 0202020202020202020202020303030303030202020202020202020202020202020202020202020202020202
NUMR 0000000000000000000000000607080909090000000000000000000000000000000000000000000000000000
265 . . . . . . . . .A.L.L.E.G.R.A. .W.R.I.T.E. .O.F.F. . . . . . . . . . . . . . . . . . .
ZONE 0202020202020202040404040405040205050405040204040402020202020202020202020202020202020202
NUMR 0000000000000000010C0C05070201000702090405000F060600000000000000000000000000000000000000
353 . . . . . .E.x.p.e.n.s.e. . . . .0...0.0.0.0...
ZONE 0202020202040707060607060202020203020303030300022222222222222222222222222222222222222222
NUMR 0000000000050800050E030500000000000E000000000D000000000000000000000000000000000000000000
441
This is the data pasted from NOTEPAD:
2011-10-01 00:00:00 Oct 11 Act 12345 Allegra Write-off 678999 ALLEGRA WRITE OFF Expense 0.0000
Try including this option: encoding=unicode
Try including this option: encoding=unicode
dmorrell!
Try change _infile_.
verify sintaxe the _infile_ and prxchange()
ok
my english is tiny....
thank
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.