Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import raw data from fixed format .txt file - SAS 9.0

Status
Not open for further replies.

devon59

Technical User
Nov 30, 2005
18
US
Hi, I am having a problem importing the data from a fixed format text file. The total width of the records is 2309 characters. The owner of the text file said the data is one row per record ID. However, when I open the data to look in Notepad, it seems that the data is 3 rows per ID. I am not sure if notepad is just showing it that way and the data is really 3 rows per ID. In any case, I am unsuccessfully importing this data. Could anyone help please? I could email you sample data file and a layout if it's more convenient than just what I copied and pasted below. Thank you
/********************* sample 1 record of data*********/

Hinesville GA3131391230305223202OV 1073 DESERT SHIELD
ST
1C
B0003600000960000...7901020214
31.810958- 81.60928891488389640000 B41



/********************** import code that I use *****/
data T ;
infile 'z:\AUX_20090813.txt' ;
INPUT
FILLER_A $ 1-40
FILLER_B $ 41-80
FILLER_C $ 81-120
CITY $ 121-140
STATE $ 141-142
ZIP $ 143-147
ZIP4 $ 148-151
NameID $ 152-161
ADDRESS_SOURCE $ 162-162
ADDRESS_STATUS $ 163-163
PANDER_CODE $ 164-164
LOCAL_ADDRESS $ 165-204
UNIT_INFORMATION $ 205-217
SECONDARY_ADDRESS $ 218-257
LONG_CITY_NAME $ 258-285
SHORT_CITY_NAME $ 286-298
STATE_ABBREVIATION $ 299-300
ZIP_CODE $ 301-305
ZIP4_CODE $ 306-309
RESERVED_1 $ 310-323
RESERVED_2 $ 324-325
MILITARY_ZIP_CODE $ 326-326
OPAC_INDICATOR $ 327-327
NDI_AFFIRMED_APT $ 328-328
SECONDARY_INDICATOR $ 329-329
STATE_CODE $ 330-331
COUNTY_CODE $ 332-334
LONG_CITY_INDICATOR $ 335-335
CARRIER_ROUTE $ 336-339
LOT_NUMBER $ 340-344
LOT_SORTATION_NUMBER $ 345-346
PRESTIGE_CITY $ 347-347
DELIVERY_POINT $ 348-359

ETHNIC_CODE $ 360-361
RELIGION_CODE $ 362-362
GROUP_CODE $ 363-363
SPOKEN_LANGUAGE $ 364-365
COUNTRY_ORIGIN $ 366-367

APPAREL $ 368-368
APPACC $ 369-369
APPKIDS $ 370-370
APPMEN $ 371-371
MENFASH $ 372-372
APPWOMEN $ 373-373
WOMENFS $ 374-374
AUTO $ 375-375
RACING $ 376-376
TRUCKS $ 377-377
AVIATION $ 378-378
BARGAINS $ 379-379
BEAUTY $ 380-380
BIBLE $ 381-381
BIRDS $ 382-382
BUSINESS $ 383-383
HOMEOFF $ 384-384
BUYINT $ 385-385
CATALOG $ 386-386
COLLECT $ 387-387
STAMPS $ 388-388
COLLEGE $ 389-389
COMPUTER $ 390-390
COOKING $ 391-391
GOURMET $ 392-392
CRAFTS $ 393-393
CROCHET $ 394-394
KNIT $ 395-395
NEEDLEPT $ 396-396
QUILT $ 397-397
SEW $ 398-398
ARTS $ 399-399
CUREVENT $ 400-400
YOURSELF $ 401-401
DONOR $ 402-402
EGO $ 403-403
ELECTRON $ 404-404
HORSES $ 405-405
AFRAMR $ 406-406
ASIAN $ 407-407
HISPANIC $ 408-408
FAMILY $ 409-409
CREDITCD $ 410-410
MONEY $ 411-411
PERSONAL $ 412-412
STOCKS $ 413-413
FOREIGN $ 414-414
GAMBLE $ 415-415
GAMES $ 416-416
GARDEN $ 417-417
GIFTGVER $ 418-418
HEALTH $ 419-419
DIET $ 420-420
FITNESS $ 421-421
MOB $ 422-422
HISTORY $ 423-423
HISTAMER $ 424-424
HOBBIES $ 425-425
HOMEDECO $ 426-426
HUMOR $ 427-427
INSPIRE $ 428-428
INTERNET $ 429-429
INTACC $ 430-430
HIGHTECH $ 431-431
MTRCYCLE $ 432-432
MUSIC $ 433-433
OCEAN $ 434-434
OUTDOORS $ 435-435
BOATING $ 436-436
CAMPING $ 437-437
FISHING $ 438-438
HUNTING $ 439-439
HUNTFISH $ 440-440
PETS $ 441-441
CATS $ 442-442
DOGS $ 443-443
PHOTO $ 444-444
PROCESS $ 445-445
POLITIC $ 446-446
LIBERAL $ 447-447
PUBLISH $ 448-448
BOOKS $ 449-449
FICTION $ 450-450
MAGAZINE $ 451-451
NONFICT $ 452-452
SCIFI $ 453-453
RURAL $ 454-454
SCIENCE $ 455-455
SENIORS $ 456-456
SPORTS $ 457-457
BASEBALL $ 458-458
BASKBALL $ 459-459
FOOTBALL $ 460-460
GOLF $ 461-461
HOCKEY $ 462-462
SKI $ 463-463
SOCCER $ 464-464
TENNIS $ 465-465
STATION $ 466-466
SWEEPS $ 467-467
VCR $ 468-468
TOBACCO $ 469-469
TRAVEL $ 470-470
CRUISE $ 471-471
TRAVELRV $ 472-472
TRAVELUS $ 473-473
MOVIES $ 474-474
WILDLIFE $ 475-475

MTCHCODE $ 476-493
STABBR $ 494-495
ZIP_4 $ 496-499
Z4MATLVL $ 500-500

FILLER_1 $ 501-501

USPSDST $ 502-502
CRRT $ 503-506
DELPNT $ 507-509
CITYNAME $ 510-522
LOCTYPE $ 523-523
LOCID $ 524-535
ADDR $ 536-536
HOUSE_ $ 537-546
FRACTION $ 547-549
STPREDIR $ 550-551
STNAME $ 552-579
STSFX $ 580-583
STPSTDIR $ 584-585
ROUTETYP $ 586-586
ROUTE_ $ 587-589
BOXTYP $ 590-590
BOX_ $ 591-596
UNITTYP $ 597-600
UNIT_ $ 601-608
NREG $ 609-609
NRANK $ 610-610
TIMEZONE $ 611-611
TELSRCAT $ 612-612
TELECNT $ 613-613
DUSIZE $ 614-615
HOMEOWNR $ 616-616
HMAGESRC $ 617-617
HOMEAGE $ 618-620
HMVALSRC $ 621-621
HOMEVAL $ 622-622
LTVRANG $ 623-623
LOANAMT $ 624-628
MORAMSRC $ 629-629

FILLER_2 $ 630-630

EQUITEST $ 631-631
HOMEOWNS $ 632-632
HSEHLDID $ 633-644
SUBHHLD $ 645-645
DROP $ 646-646

FILLER_3 $ 647-647
MAILABILITY_SCORE $ 648-649
FILLER_4 $ 650-650

ARCHIVED $ 651-651
LISTTYPE $ 652-653

FILLER_5 $ 654-666

LOR $ 667-668
AGESRC $ 669-669
AGEC $ 670-670
GENDER1 $ 671-671
TITLE1 $ 672-672
GIVEN1 $ 673-687
MI1 $ 688-688
SURNM1 $ 689-708
SUFFX1 $ 709-710
HHMCNT $ 711-711
ADULTNM_ $ 712-712
CHILDCNT $ 713-713
RSCHFMCT $ 714-716
MARRIED $ 717-717
RSCHFMR $ 718-720
GPINHSE $ 721-721
OCCUPATF $ 722-723
OCCUPATM $ 724-725
OWNRENT $ 726-726
RSCHINC $ 727-732
EXPIRANK $ 733-733
WLTHFIND $ 734-734

FILLER_6 $ 735-737

PIC $ 738-739
REVOLVER $ 740-741
BBC2004 $ 742-743
INETUSE $ 744-745
HTIA $ 746-746

FILLER_7 $ 747-747

STOCKBND $ 748-748
MAILORD $ 749-749
MR_CURR $ 750-750
MR_PREV $ 751-751
MR_EVER $ 752-752
CONTBHLT $ 753-753
CONTBPOL $ 754-754
CONTBREL $ 755-755
CAT $ 756-756
DOG $ 757-757
TECARD $ 758-758
BANKCARD $ 759-759
ACTVBANK $ 760-760
ACTVCNSR $ 761-761
RSCHCRI $ 762-775
AG0_5 $ 776-776
AG0_11 $ 777-777
AG0_17 $ 778-778
AG6_11 $ 779-779
AG12_17 $ 780-780
AG12_17F $ 781-781
AG12_17M $ 782-782
AG18_24F $ 783-783
AG18_24M $ 784-784
AG18_34F $ 785-785
AG18_34M $ 786-786
AG18_44F $ 787-787
AG25_34F $ 788-788
AG25_34M $ 789-789
AG35_44F $ 790-790
AG35_44M $ 791-791
AG35_54F $ 792-792
AG35_54M $ 793-793
AG45_54F $ 794-794
AG45_54M $ 795-795
AG50_ $ 796-796
AG55_64F $ 797-797
AG55_64M $ 798-798
AG65_ $ 799-799
HHSIZE12 $ 800-800
HHSIZE3_ $ 801-801
CENS2000 $ 802-813

D2MATLVL $ 814-814
A0005PHH $ 815-819
A0017PHH $ 820-826
A0611PHH $ 827-833
A1217FHH $ 834-840
A1217MHH $ 841-847
A1217PHH $ 848-854
A1824FHH $ 855-861
A1824MHH $ 862-868
A2534FHH $ 869-875
A2534MHH $ 876-882
A3544FHH $ 883-889
A3544MHH $ 890-896
A4554FHH $ 897-903
A4554MHH $ 904-910
A5564FHH $ 911-917
A5564MHH $ 918-924
A65UPFHH $ 925-931
A65UPMHH $ 932-938
AGE_MED $ 939-943
AGE_MEDF $ 944-948
AGE_MEDM $ 949-953
AGEMEDAD $ 954-958
AGEMEDAF $ 959-963
AGEMEDAM $ 964-968
AGP00_05 $ 969-973
AGP00_11 $ 974-978
AGP00_17 $ 979-983
AGP06_11 $ 984-988
AGP12_17 $ 989-993
AGP18_24 $ 994-998
AGP18_34 $ 999-1003
AGP25_34 $ 1004-1008
AGP35_44 $ 1009-1013
AGP35_54 $ 1014-1018
AGP45_54 $ 1019-1023
AGP50_64 $ 1024-1028
AGP50UP $ 1029-1033
AGP55_64 $ 1034-1038
AGP65_74 $ 1039-1043
AGP65UP $ 1044-1048
AGP75UP $ 1049-1053
AHP65UP $ 1054-1058
EAASIAN $ 1059-1063
EABLACK $ 1064-1068
EAHISP $ 1069-1073
EAWHITE $ 1074-1078
EPASIAN $ 1079-1083
EPBLACK $ 1084-1088
EPCHINSE $ 1089-1093
EPHCENAM $ 1094-1098
EPHCUBAN $ 1099-1103
EPHISP $ 1104-1108
EPHMEX $ 1109-1113
EPHMIX $ 1114-1118
EPHPRICO $ 1119-1123
EPHSOAMR $ 1124-1128
EPHWHITE $ 1129-1133
EPINDIA $ 1134-1138
EPJAPANS $ 1139-1143
EPKOREAN $ 1144-1148
EPMIX $ 1149-1153
EPVIETNM $ 1154-1158
EPWHITE $ 1159-1163
FAMSIZE $ 1164-1168
FBAFRICA $ 1169-1173
FBASIA $ 1174-1178
FBCITIZN $ 1179-1183
FBLATNAM $ 1184-1188
FBNONCIT $ 1189-1193
FBNORTAM $ 1194-1198
FBORNPCT $ 1199-1203
FLANGPCT $ 1204-1208
FLASAPAC $ 1209-1213
FLSPAN $ 1214-1218
HFAMILY $ 1219-1223
HFGCHILD $ 1224-1228
HFPARENT $ 1229-1233
HHCHILD $ 1234-1238
HHFEM1P $ 1239-1243
HHFEMHH $ 1244-1248
HHMARNOC $ 1249-1253
HHMARWCH $ 1254-1258
HHSGLHFC $ 1259-1263
HHSGLHH $ 1264-1268
HHSGLHM $ 1269-1273
HHSGLHMC $ 1274-1278
HHSINGLE $ 1279-1283
HHSIZE $ 1284-1288
HHSIZEOO $ 1289-1293
HHSIZERO $ 1294-1298
HPARTNRS $ 1299-1303
HPFHFP $ 1304-1308
HPFHMP $ 1309-1313
HPMHFP $ 1314-1318
HPMHMP $ 1319-1323
HS1P $ 1324-1328
HS2P $ 1329-1333
HS3PUP $ 1334-1338
HS4PUP $ 1339-1343
HS5PUP $ 1344-1348
HUOCCPCT $ 1349-1353
HUOOPCT $ 1354-1358
IH_0_10K $ 1359-1363
IH_0_25K $ 1364-1368
IH_35KUP $ 1369-1373
IH_50KUP $ 1374-1378
IH_75KUP $ 1379-1383
IH10012K $ 1384-1388
IH125150 $ 1389-1393
IH150200 $ 1394-1398
IH200KUP $ 1399-1403
IMAG0024 $ 1404-1410
IMAG2534 $ 1411-1417
IMAG3544 $ 1418-1424
IMAG4554 $ 1425-1431
IMAG5564 $ 1432-1438
IMAG6574 $ 1439-1445
IMAG75UP $ 1446-1452
IMASIAN $ 1453-1459
IMBLACK $ 1460-1466
IMHISP $ 1467-1473
IMWHITE $ 1474-1480
INFMED $ 1481-1487
INHH_AVG $ 1488-1494
INHH_MED $ 1495-1501
INPERCAP $ 1502-1508
IPCASIAN $ 1509-1515
IPCBLACK $ 1516-1522
IPCHISP $ 1523-1529
IPCWHITE $ 1530-1536
IPOVERTY $ 1537-1541
ITHHIDR $ 1542-1546
ITHHPUB $ 1547-1551
ITHHRET $ 1552-1556
ITIDR $ 1557-1561
ITSOCSEC $ 1562-1566
L65UPA $ 1567-1571
MDIVRCED $ 1572-1576
MDIVRCEF $ 1577-1581
MDIVRCEM $ 1582-1586
MSINGLE $ 1587-1591
MSINGLEF $ 1592-1596
MSINGLEM $ 1597-1601
POPDENS $ 1602-1610
POPPCTF $ 1611-1615
POPPCTM $ 1616-1620
POPURBAN $ 1621-1625
RCMPIOOM $ 1626-1630
RCPTAXM $ 1631-1635
RCR_99 $ 1636-1640
RCR1KUP $ 1641-1645
RCR2KUP $ 1646-1650
RCRMED $ 1651-1655
RHCOAL $ 1656-1660
RHELEC $ 1661-1665
RHLPGAS $ 1666-1670
RHNATGAS $ 1671-1675
RHNONE $ 1676-1680
RHOIL $ 1681-1685
RHSOLAR $ 1686-1690
RHWOOD $ 1691-1695
RMDYRIN $ 1696-1700
RPERRM $ 1701-1703
RPR1UP $ 1704-1708
RS1RM $ 1709-1713
RS4BRUP $ 1714-1718
RS5BRUP $ 1719-1723
RS6RMUP $ 1724-1728
RS9RMUP $ 1729-1733
RSMEDRMS $ 1734-1736
RT_1U $ 1737-1741
RT_1UA $ 1742-1746
RT_2U $ 1747-1751
RT10UUP $ 1752-1756
RT50UUP $ 1757-1761
RTMOBLHM $ 1762-1766
RTOO1U $ 1767-1771
RTRO1U $ 1772-1776
RUVACSEA $ 1777-1781
RV_0_150 $ 1782-1786
RV_0_15K $ 1787-1791
RV_0_50K $ 1792-1796
RV_1520K $ 1797-1801
RV_2025K $ 1802-1806
RV_70100 $ 1807-1811
RV100KUP $ 1812-1816
RV1MMUP $ 1817-1821
RV200KUP $ 1822-1826
RV300KUP $ 1827-1831
RV400KUP $ 1832-1836
RV500KUP $ 1837-1841
RV7501MM $ 1842-1846
RVAVGOON $ 1847-1853
RVMEDOO $ 1854-1860
RYB95_2K $ 1861-1865
RYB99_2K $ 1866-1870
RYBMED $ 1871-1875
RYBPRE50 $ 1876-1880
SCOLGRAD $ 1881-1885
SDEGAA $ 1886-1890
SDEGBA $ 1891-1895
SDEGDOC $ 1896-1900
SDEGMA $ 1901-1905
SDEGPROF $ 1906-1910
SE912PVT $ 1911-1915
SECOLL $ 1916-1920
SEK12PVT $ 1921-1925
SEPRESCH $ 1926-1930
SHSCOLL $ 1931-1935
SHSGRAD $ 1936-1940
SNONHSG $ 1941-1945
SYRSMED $ 1946-1950
V1HH $ 1951-1955
V2HH $ 1956-1960
V3HH $ 1961-1965
VPERHH $ 1966-1968
W2FAMMEM $ 1969-1973
WEMPLPCT $ 1974-1978
WFLABOR $ 1979-1983
WFMOMS $ 1984-1988
WFPARTTM $ 1989-1993
WFUNEMP $ 1994-1998
WHOMEPCT $ 1999-2003
WIAERAFS $ 2004-2008
WIAFFHM $ 2009-2013
WICONST $ 2014-2018
WIEHSS $ 2019-2023
WIFIRERL $ 2024-2028
WIINFO $ 2029-2033
WIMFG $ 2034-2038
WIOSVC $ 2039-2043
WIPROF $ 2044-2048
WIPUBAD $ 2049-2053
WIRETAIL $ 2054-2058
WITWU $ 2059-2063
WIWHLSL $ 2064-2068
WO_BLUC $ 2069-2073
WO_WHTC $ 2074-2078
WOAESM $ 2079-2083
WOARCENG $ 2084-2088
WOBUSFIN $ 2089-2093
WOCOMPUT $ 2094-2098
WOCONMNT $ 2099-2103
WOCONST $ 2104-2108
WOCUSTDL $ 2109-2113
WOEDUC $ 2114-2118
WOFARMR $ 2119-2123
WOFFF $ 2124-2128
WOFOODRL $ 2129-2133
WOHLTHPT $ 2134-2138
WOHLTHSP $ 2139-2143
WOIMR $ 2144-2148
WOLEGAL $ 2149-2153
WOMGT $ 2154-2158
WOMGTPRO $ 2159-2163
WOOFFADM $ 2164-2168
WOPERSVC $ 2169-2173
WOPROD $ 2174-2178
WOPROF $ 2179-2183
WOPROFT $ 2184-2188
WOPROTSV $ 2189-2193
WOPTMTRL $ 2194-2198
WOPVT4P $ 2199-2203
WOSALESO $ 2204-2208
WOSALESR $ 2209-2213
WOSCI $ 2214-2218
WOSOCSVC $ 2219-2223
WOSVC $ 2224-2228
WOTRANSM $ 2229-2233
WPUBTRAN $ 2234-2238
WPVTTRAN $ 2239-2243
WSELFEMP $ 2244-2248
WTRAVLTM $ 2249-2251
WUNEMP $ 2252-2256

CENSUS_STATE $ 2257-2258
CENSUS_COUNTY $ 2259-2261
CENSUS_TRACT $ 2262-2267
CENSUS_BG $ 2268-2268
CENSUS_LEVEL $ 2269-2269
LATITUDE $ 2270-2280
LONGITUDE $ 2281-2291
MCD $ 2292-2296
PLACE $ 2297-2301
MSA $ 2302-2305
EXPANSION $ 2306-2306
SESI2000 $ 2307-2310
;
RUN;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top