BookmarkSubscribeRSS Feed
Filipvdr
Pyrite | Level 9

Hello all,

 

I'm importing a ; seperated .csv file. The first column contains coordinates and somtimes exceeds 32767 characters. On this forum I found a solution (if there is only one column) of creating an array but I dont seem to get it working if there are several columns.

 

Example I found:

 

filename FT15F001 temp;
data lines;
   infile FT15F001 truncover;
   array part[3] $40.;
   input (part[*])($char40.);
   parmcards;
this is the data line this is the line this is the data line 
this is the data line this is the data line this is the data line this is the data line 
this is the data line this is the data line this is the data line 
;;;;
   run;

My code copied from transformation in DI studio. How to implement the above so my column WKT is splitted? I think an array of 2-3 will be enough.

 

data temp ; 
   infile '/SASDATA/DataResult/ETL_InputFiles/Asset_Analytics/buffer_GUP_prio.csv'
          lrecl = 120000
          delimiter = ';'
          dsd
          truncover
          firstobs = 2; 
   ; 
   attrib WKT length = $32767
      format = $32767.
      informat = $32767.; 
   attrib gup_prj length = $14
      format = $14.
      informat = $14.; 
   attrib nis length = 8
      format = 5.
      informat = 5.; 
   attrib prioriteit length = 8
      format = 2.
      informat = 2.; 
   attrib gem_prio_v length = 8
      format = 2.
      informat = 2.; 
   attrib aantal_ie length = 8
      format = 4.
      informat = 4.; 
   attrib kostprijs length = 8
      format = 7.
      informat = 7.; 
   attrib mitk length = 8
      format = 7.5
      informat = 7.5; 
   attrib moederprj length = $13
      format = $13.
      informat = $13.; 
   attrib bekken length = $28
      format = $28.
      informat = $28.; 
   attrib actor length = $17
      format = $17.
      informat = $17.; 
   attrib srt_proj length = $11
      format = $11.
      informat = $11.; 
   attrib gemeente length = $21
      format = $21.
      informat = $21.; 
   attrib spg_ag length = 8
      format = 1.
      informat = 1.; 
   attrib perc_spg length = 8
      format = 8.5
      informat = 8.5; 
   attrib perc_ag length = 8
      format = 8.5
      informat = 8.5; 
   attrib ihd length = 8
      format = 1.
      informat = 1.; 
   attrib perc_ihd length = 8
      format = 8.5
      informat = 8.5; 
   attrib afst_ihd length = 8
      format = 10.4
      informat = 10.4; 
   attrib code_afst_ length = 8
      format = 1.
      informat = 1.; 
   attrib actie_nr length = $8
      format = $8.
      informat = $8.; 
   
   input WKT gup_prj nis prioriteit gem_prio_v aantal_ie kostprijs mitk moederprj 
         bekken actor srt_proj gemeente spg_ag perc_spg perc_ag ihd perc_ihd 
         afst_ihd code_afst_ actie_nr; 
   
run; 

 

Example of one line in my file. This one maybe not exceed the max amount of characters but it gives the idea/structure.

"MULTIPOLYGON (((238929.952917889 195111.023842223,238922.254134767 195110.42790772,238914.534881592 195110.6267283,238906.876984335 195111.618196409,238899.361618638 195113.391802248,238892.068449222 195115.928745162,238885.074785523 195119.202132903,238878.454762109 195123.177266762,238872.278552853 195127.812009327,238866.920555562 195132.742103539,238741.898031451 195259.526060227,238736.645995855 195265.48372452,238732.171814367 195271.777221106,238728.36845018 195278.497401178,238725.276219927 195285.573029164,238722.927901998 195292.929101638,238721.348389149 195300.4876424,238720.554424614 195308.168529045,238720.554424614 195315.890342265,238721.348389149 195323.57122891,238722.927901998 195331.129769675,238725.276219927 195338.485842146,238728.36845018 195345.561470129,238732.171814367 195352.281650208,238736.645995855 195358.575146794,238741.743567228 195364.37524727,238747.410492949 195369.620469104,238753.586702205 195374.255211677,238760.20672562 195378.230345529,238767.200389333 195381.503733277,238774.493558735 195384.04067618,238782.00892444 195385.814282022,238789.666821696 195386.805750139,238797.386074863 195387.004570719,238805.084857985 195386.408636216,238812.681562014 195385.02426368,238820.095659994 195382.866127811,238827.248560652 195379.957105387,238834.064441465 195376.328032762,238840.471052393 195372.017379008,238846.400481768 195367.070838138,238848.857467048 195364.6903749,238973.725526951 195238.063982021,238976.657936066 195234.91445183,238981.450166568 195228.859625146,238985.594434321 195222.344147883,238989.046809092 195215.437085703,238991.770694815 195208.211655203,238993.737217635 195200.744447738,238994.925531924 195193.114617564,238995.323041253 195185.403042778,238994.925531924 195177.691467989,238993.737217635 195170.061637819,238991.770694815 195162.594430357,238989.046809092 195155.368999857,238985.594434321 195148.461937681,238981.450166568 195141.946460418,238976.657936066 195135.89163373,238971.268541671 195130.361640301,238965.339112297 195125.415099423,238958.932501368 195121.104445677,238952.116620556 195117.475373052,238944.96371989 195114.56635062,238937.549621917 195112.408214752,238929.952917889 195111.023842223)),((240873.740320124 195486.454337031,240868.948089615 195480.399510343,240863.558695227 195474.869516913,240857.629265845 195469.922976036,240851.222654916 195465.612322282,240844.406774111 195461.983249668,240837.253873445 195459.074227232,240829.839775465 195456.916091364,240822.243071437 195455.531718835,240814.544288322 195454.935784332,240806.825035147 195455.134604912,240799.167137891 195456.126073021,240792.814732939 195457.571297418,240688.371485397 195486.156125449,240723.066712424 195346.066061363,240723.68035806 195343.377415735,240724.868672356 195335.747585561,240725.266181685 195328.036010776,240724.868672356 195320.324435987,240723.68035806 195312.694605816,240721.713835239 195305.227398355,240718.989949524 195298.001967855,240715.537574746 195291.094905678,240711.393307 195284.579428416,240706.601076499 195278.524601728,240701.211682104 195272.994608298,240695.282252729 195268.048067421,240688.875641793 195263.737413675,240682.059760988 195260.108341049,240674.906860322 195257.199318618,240667.492762342 195255.041182749,240659.896058314 195253.65681022,240652.197275199 195253.060875718,240644.478022024 195253.259696297,240636.820124768 195254.251164407,240629.30475907 195256.024770245,240622.011589669 195258.561713159,240615.017925955 195261.8351009,240608.397902533 195265.810234759,240602.221693285 195270.444977324,240596.554767556 195275.690199167,240591.457196184 195281.490299642,240586.983014695 195287.783796228,240583.179650515 195294.5039763,240580.087420255 195301.579604283,240577.739102326 195308.935676761,240577.465650946 195310.005960193,240545.103712767 195440.674826831,240445.110343136 195334.497094516,240441.456600875 195330.874780908,240435.5271715 195325.928240027,240429.120560572 195321.617586277,240422.304679759 195317.988513652,240415.1517791 195315.079491224,240407.737681121 195312.921355356,240400.140977092 195311.536982827,240392.442193978 195310.941048324,240384.722940803 195311.139868904,240377.065043546 195312.131337013,240369.549677841 195313.904942855,240362.25650844 195316.441885762,240355.262844726 195319.715273507,240348.642821312 195323.690407369,240342.466612056 195328.325149931,240336.799686335 195333.570371777,240331.702114962 195339.370472249,240327.227933474 195345.663968835,240323.424569286 195352.384148907,240320.332339033 195359.459776893,240317.984021105 195366.815849368,240316.404508255 195374.374390129,240315.61054372 195382.055276774,240315.61054372 195389.777089994,240316.404508255 195397.457976639,240317.984021105 195405.016517404,240320.332339033 195412.372589875,240323.424569286 195419.448217858,240327.227933474 195426.168397937,240331.702114962 195432.461894523,240335.911857784 195437.335272249,240502.148638979 195613.853420604,240477.677333444 195703.581765242,240476.213030668 195710.072749592,240475.329812968 195716.667974149,240475.034632571 195723.315524749,240475.034632571 195776.529199604,240464.119320095 195830.633746464,240463.531506367 195833.923986495,240462.737541817 195841.604873147,240462.737541817 195849.32668636,240463.531506367 195857.007573001,240465.111019216 195864.56611377,240467.459337145 195871.922186241,240470.551567405 195878.997814223,240474.354931585 195885.717994303,240478.829113074 195892.011490889,240483.926684447 195897.811591361,240489.593610175 195903.056813199,240495.769819424 195907.691555768,240502.389842845 195911.666689623,240509.383506551 195914.940077368,240516.67667596 195917.477020275,240524.192041658 195919.250626117,240531.849938914 195920.242094234,240539.569192089 195920.440914813,240547.267975204 195919.844980311,240554.864679232 195918.460607775,240562.278777212 195916.302471906,240569.43167787 195913.393449482,240576.247558683 195909.764376853,240582.654169612 195905.453723103,240588.583598986 195900.507182233,240593.972993381 195894.977188803,240598.765223891 195888.922362115,240602.909491651 195882.406884845,240606.361866407 195875.499822676,240609.08575213 195868.274392173,240611.104576007 195860.55249887,240623.553411044 195798.85121166,240624.637123235 195791.730753161,240625.034632564 195784.019178376,240625.034632564 195733.359356839,240646.94814337 195653.009616338,240832.411656663 195602.25054137,240837.253873445 195600.747611549,240844.406774111 195597.838589121,240851.222654916 195594.209516495,240857.629265845 195589.898862746,240863.558695227 195584.952321876,240868.948089615 195579.422328446,240873.740320124 195573.367501758,240877.884587884 195566.852024488,240881.336962648 195559.944962315,240884.060848363 195552.719531815,240886.027371183 195545.25232435,240887.215685479 195537.622494176,240887.613194808 195529.910919391,240887.215685479 195522.199344605,240886.027371183 195514.569514431,240884.060848363 195507.102306966,240881.336962648 195499.876876473,240877.884587884 195492.969814293,240873.740320124 195486.454337031)),((238847.981412672 195944.354112994,238847.866560809 195941.884861689,238897.271018945 195963.058223315,238898.560400747 195963.596655011,238905.853570163 195966.133597918,238913.368935861 195967.90720376,238921.026833117 195968.898671877,238928.746086292 195969.097492456,238936.444869414 195968.501557954,238944.041573443 195967.117185418,238951.455671415 195964.959049549,238958.608572081 195962.050027125,238965.424452893 195958.420954496,238971.831063822 195954.110300746,238977.760493197 195949.163759876,238983.149887592 195943.633766446,238987.942118093 195937.578939758,238992.086385846 195931.063462488,238995.538760617 195924.156400319,238998.26264634 195916.930969816,239000.22916916 195909.46376235,239001.417483449 195901.833932176,239001.814992778 195894.122357391,239001.417483449 195886.410782605,239000.22916916 195878.780952431,238998.26264634 195871.313744966,238995.538760617 195864.088314466,238992.086385846 195857.181252293,238987.942118093 195850.665775031,238983.149887592 195844.610948343,238977.760493197 195839.080954913,238971.831063822 195834.134414036,238965.424452893 195829.823760286,238958.608572081 195826.194687657,238956.358966611 195825.186491471,238868.418275394 195787.497583877,238861.938931832 195785.06803219,238855.263243218 195783.24600148,238848.448038487 195782.047002368,238841.551334254 195781.481241718,238790.364261203 195779.653017145,238789.618322015 195779.630090162,238781.89906884 195779.828910742,238774.241171584 195780.820378851,238766.725805886 195782.593984693,238759.432636485 195785.130927596,238752.438972771 195788.404315345,238745.818949349 195792.379449207,238740.834990717 195796.040151887,238722.553863242 195810.665109787,238721.361612618 195811.639149662,238715.694686897 195816.884371508,238710.597115524 195822.68447198,238706.122934036 195828.977968566,238702.319569848 195835.698148638,238699.227339596 195842.773776624,238696.879021667 195850.129849099,238695.299508817 195857.68838986,238694.505544282 195865.369276505,238694.487098739 195872.714877713,238698.152630873 195951.511608202,238698.955818176 195959.380600847,238700.535331026 195966.939141616,238702.883648954 195974.295214087,238705.975879215 195981.370842069,238709.779243395 195988.091022149,238714.253424883 195994.384518735,238719.350996256 196000.184619207,238725.017921977 196005.429841045,238731.194131233 196010.064583614,238737.814154655 196014.039717469,238744.807818361 196017.313105214,238752.10098777 196019.850048121,238759.616353467 196021.623653963,238767.274250723 196022.61512208,238774.993503898 196022.81394266,238782.692287013 196022.218008157,238790.288991041 196020.833635621,238797.703089021 196018.675499752,238804.85598968 196015.766477328,238811.671870492 196012.137404699,238818.078481421 196007.826750949,238824.007910796 196002.880210079,238829.397305191 195997.350216649,238834.1895357 195991.295389961,238838.33380346 195984.779912692,238841.786178216 195977.872850522,238844.510063939 195970.647420019,238846.476586759 195963.180212554,238847.664901055 195955.550382379,238848.062410384 195947.838807594,238847.981412672 195944.354112994)),((239128.298859641 195903.214559555,239120.600076526 195902.618625052,239112.880823351 195902.817445632,239105.222926095 195903.808913741,239097.707560398 195905.582519583,239090.414390996 195908.119462486,239083.420727283 195911.392850235,239076.800703861 195915.367984097,239070.624494612 195920.002726659,239064.957568884 195925.247948505,239059.859997511 195931.048048977,239056.649245299 195935.420876246,238972.462152556 196059.227003124,238971.198723279 196061.147672441,238967.395359099 196067.867852513,238964.303128839 196074.943480495,238961.95481091 196082.299552973,238960.37529806 196089.858093739,238959.581333518 196097.538980383,238959.481890269 196101.399886988,238959.481890269 196103.227971781,238959.581333518 196107.088878393,238960.37529806 196114.769765038,238961.95481091 196122.328305803,238964.303128839 196129.684378274,238967.395359099 196136.760006256,238971.198723279 196143.480186336,238975.672904767 196149.773682926,238980.77047614 196155.57378339,238986.437401868 196160.819005232,238992.613611117 196165.453747798,238999.233634539 196169.428881656,239006.227298245 196172.702269405,239013.520467654 196175.239212312,239021.035833351 196177.01281815,239028.693730608 196178.004286267,239036.412983783 196178.203106847,239044.111766897 196177.607172344,239051.708470926 196176.222799808,239059.122568905 196174.064663939,239066.275469571 196171.155641515,239073.091350377 196167.52656889,239079.497961305 196163.215915136,239085.42739068 196158.269374266,239090.816785075 196152.739380836,239095.609015584 196146.684554148,239099.753283344 196140.169076879,239102.353376962 196134.967147905,239180.688720725 196019.766643982,239183.940376095 196014.534865208,239187.392750852 196007.627803035,239190.116636567 196000.402372535,239192.083159387 195992.93516507,239193.271473683 195985.305334896,239193.668983012 195977.59376011,239193.271473683 195969.882185325,239192.083159387 195962.252355151,239190.116636567 195954.785147682,239187.392750852 195947.55971719,239183.940376095 195940.652655013,239179.796108328 195934.13717775,239175.003877826 195928.082351062,239169.614483431 195922.552357633,239163.685054056 195917.605816755,239157.27844312 195913.295163013,239150.462562315 195909.666090384,239143.309661649 195906.757067952,239135.89556367 195904.598932084,239128.298859641 195903.214559555)),((239455.23651018 196131.366110057,239456.424824469 196123.736279882,239456.822333798 196116.024705097,239456.424824469 196108.313130312,239455.23651018 196100.683300138,239454.252561197 196096.560323332,239416.815263368 195957.249862406,239415.832689531 195953.905631747,239413.108803809 195946.680201247,239409.656429037 195939.773139074,239405.512161277 195933.257661812,239400.719930783 195927.202835124,239395.330536388 195921.672841698,239389.401107013 195916.726300817,239382.994496085 195912.415647067,239376.178615272 195908.786574442,239369.025714606 195905.877552014,239361.611616619 195903.719416145,239354.014912605 195902.335043617,239346.316129483 195901.739109114,239338.596876308 195901.937929694,239330.938979059 195902.929397803,239323.423613355 195904.703003645,239316.130443938 195907.239946552,239309.13678024 195910.513334297,239302.51675681 195914.488468159,239296.340547569 195919.123210721,239290.673621848 195924.368432567,239285.576050475 195930.168533038,239281.101868987 195936.462029625,239277.2985048 195943.182209697,239274.206274532 195950.257837683,239271.857956603 195957.613910157,239270.278443754 195965.172450919,239269.484479219 195972.853337564,239269.484479219 195980.575150784,239270.278443754 195988.256037429,239271.906382583 195995.996602066,239303.726151407 196114.405118611,239300.128972568 196125.871116526,239272.903687365 196116.447010141,239265.597047329 196114.326162398,239258.0003433 196112.941789869,239250.301560186 196112.345855366,239242.582307011 196112.54467595,239234.924409755 196113.536144059,239227.409044057 196115.309749898,239220.115874648 196117.846692804,239213.122210942 196121.120080549,239206.50218752 196125.095214412,239200.325978272 196129.729956973,239194.659052543 196134.975178819,239189.56148117 196140.775279291,239185.087299682 196147.068775877,239181.283935502 196153.788955953,239178.191705242 196160.864583936,239175.843387313 196168.22065641,239174.263874464 196175.779197171,239173.469909921 196183.460083816,239173.469909921 196191.181897037,239174.263874464 196198.862783682,239175.843387313 196206.421324447,239178.191705242 196213.777396917,239181.283935502 196220.8530249,239185.087299682 196227.573204979,239189.56148117 196233.866701566,239194.659052543 196239.666802034,239200.325978272 196244.912023876,239206.50218752 196249.546766441,239213.122210942 196253.5219003,239220.115874648 196256.795288049,239223.837245978 196258.19497072,239271.368009657 196274.647873618,239277.03214075 196276.361478054,239282.813742647 196277.623183536,239288.676821589 196278.425135233,239345.348149016 196283.909529388,239346.784398131 196284.034601964,239354.503651306 196284.233422544,239362.202434428 196283.637488041,239369.799138442 196282.253115505,239377.213236429 196280.094979636,239384.366137095 196277.185957212,239391.182017908 196273.556884587,239397.588628836 196269.246230833,239403.518058211 196264.299689963,239408.907452606 196258.769696534,239413.6996831 196252.714869846,239417.84395086 196246.199392576,239421.296325631 196239.292330407,239424.07687515 196231.887855105,239453.38331496 196138.47522793,239455.23651018 196131.366110057)),((239552.325768769 196200.690978091,239544.626985647 196200.095043585,239536.907732472 196200.293864161,239529.249835216 196201.285332277,239521.734469518 196203.058938116,239514.441300102 196205.595881023,239507.447636403 196208.869268771,239500.827612974 196212.84440263,239494.651403733 196217.479145195,239488.984478004 196222.724367037,239483.886906639 196228.524467509,239479.412725143 196234.817964099,239475.609360963 196241.538144171,239472.51713071 196248.613772154,239470.168812767 196255.969844628,239468.589299925 196263.52838539,239467.795335382 196271.209272034,239467.795335382 196278.931085255,239468.589299925 196286.6119719,239470.168812767 196294.170512669,239472.51713071 196301.526585136,239475.609360963 196308.602213118,239479.412725143 196315.322393201,239483.886906639 196321.615889776,239488.984478004 196327.415990252,239494.651403733 196332.661212094,239500.827612974 196337.29595466,239502.725410767 196338.531667907,239661.031011805 196438.238610633,239665.753237441 196440.978031244,239672.74690114 196444.251418993,239680.040070556 196446.7883619,239687.555436254 196448.561967738,239695.21333351 196449.553435855,239702.932586685 196449.752256438,239710.631369807 196449.156321932,239718.22807382 196447.771949396,239725.642171808 196445.613813527,239732.795072474 196442.704791103,239739.610953286 196439.075718477,239746.017564215 196434.765064724,239751.946993589 196429.818523854,239757.336387984 196424.288530424,239762.128618479 196418.233703729,239766.272886239 196411.718226466,239769.72526101 196404.811164297,239772.449146733 196397.585733797,239774.415669553 196390.118526332,239775.603983834 196382.488696158,239776.001493178 196374.777121369,239775.603983834 196367.065546583,239774.415669553 196359.435716409,239772.449146733 196351.968508944,239769.72526101 196344.743078444,239766.272886239 196337.836016275,239762.128618479 196331.320539009,239757.336387984 196325.265712317,239751.946993589 196319.735718887,239746.017564215 196314.789178018,239740.971974522 196311.315632109,239582.666373484 196211.608689383,239581.305352248 196210.771581538,239574.489471436 196207.142508913,239567.33657077 196204.233486488,239559.922472782 196202.075350616,239552.325768769 196200.690978091)),((239661.818654299 196539.757653557,239654.119871184 196539.161719054,239646.400618009 196539.360539634,239638.742720753 196540.352007743,239631.227355056 196542.125613585,239623.934185646 196544.662556492,239616.940521941 196547.935944237,239610.320498519 196551.911078099,239604.14428927 196556.545820661,239598.477363542 196561.791042507,239593.379792169 196567.591142979,239588.905610681 196573.884639565,239585.102246501 196580.604819637,239582.01001624 196587.680447619,239579.661698312 196595.036520097,239578.082185462 196602.595060859,239577.28822092 196610.275947507,239577.28822092 196617.997760721,239578.082185462 196625.678647365,239579.661698312 196633.237188134,239582.01001624 196640.593260601,239585.102246501 196647.668888588,239588.905610681 196654.389068667,239593.379792169 196660.682565253,239593.828972161 196661.244529732,239625.64978072 196700.666050188,239630.298172101 196705.904186185,239635.965097822 196711.14940802,239642.141307063 196715.784150593,239648.761330493 196719.759284444,239655.754994191 196723.032672193,239663.048163608 196725.569615096,239670.563529305 196727.343220938,239678.221426561 196728.334689055,239685.940679736 196728.533509634,239693.639462858 196727.937575132,239701.236166872 196726.553202596,239708.650264859 196724.395066727,239715.803165525 196721.486044303,239722.619046338 196717.856971677,239729.025657266 196713.546317924,239734.955086641 196708.599777054,239740.344481036 196703.069783624,239745.13671153 196697.014956936,239749.280979291 196690.499479666,239752.733354062 196683.592417497,239755.457239784 196676.366986997,239757.423762605 196668.899779528,239758.612076886 196661.269949354,239759.00958623 196653.558374569,239758.612076886 196645.846799783,239757.423762605 196638.216969609,239755.457239784 196630.749762144,239752.733354062 196623.524331644,239749.280979291 196616.617269475,239745.13671153 196610.101792209,239742.369391717 196606.450698953,239710.548583165 196567.0291785,239708.523672476 196564.625445064,239703.134278089 196559.095451634,239697.204848707 196554.148910757,239690.798237778 196549.838257015,239683.982356973 196546.209184386,239676.829456307 196543.300161954,239669.415358327 196541.142026085,239661.818654299 196539.757653557)),((239499.602897607 196746.43229818,239491.904114485 196745.836363673,239483.970238663 196746.062971447,239402.236265868 196695.761464648,239401.445599928 196695.280028775,239394.629719116 196691.65095615,239387.47681845 196688.741933722,239380.062720463 196686.583797853,239372.466016449 196685.199425325,239364.767233327 196684.603490822,239357.047980152 196684.802311406,239349.390082903 196685.793779515,239341.874717198 196687.567385353,239334.581547782 196690.10432826,239327.587884083 196693.377716005,239320.967860654 196697.352849867,239314.791651413 196701.987592429,239309.124725692 196707.232814275,239304.027154319 196713.032914747,239299.552972808 196719.326411333,239295.749608643 196726.046591409,239292.657378376 196733.122219391,239290.309060447 196740.478291865,239288.729547597 196748.036832627,239287.935583062 196755.717719272,239287.935583062 196763.439532492,239288.729547597 196771.120419137,239290.309060447 196778.678959902,239292.657378376 196786.035032373,239295.749608643 196793.110660356,239299.552972808 196799.830840435,239304.027154319 196806.124337021,239309.124725692 196811.924437489,239314.791651413 196817.169659331,239320.967860654 196821.804401893,239323.436013773 196823.395787112,239440.810156129 196895.861498751,239444.962026447 196898.245247394,239451.955690145 196901.518635143,239459.248859562 196904.055578046,239466.764225259 196905.829183888,239474.422122516 196906.820652004,239482.141375691 196907.019472584,239489.840158813 196906.423538081,239497.436862826 196905.039165545,239504.850960813 196902.881029677,239512.003861479 196899.972007252,239518.819742292 196896.342934627,239525.226353221 196892.032280874,239531.155782595 196887.085740004,239536.681608118 196881.399644893,239546.580778033 196870.010704421,239551.100146286 196864.268081103,239555.244414039 196857.752603829,239558.69678881 196850.84554166,239561.420674533 196843.62011116,239563.387197353 196836.152903691,239564.575511642 196828.523073521,239564.973020971 196820.811498731,239564.575511642 196813.099923946,239563.387197353 196805.470093772,239561.420674533 196798.002886306,239558.69678881 196790.777455807,239555.244414039 196783.870393638,239551.100146286 196777.354916371,239546.307915784 196771.30008968,239540.918521389 196765.77009625,239534.989092015 196760.82355538,239528.582481086 196756.512901627,239521.766600274 196752.883829001,239514.613699608 196749.974806573,239507.199601635 196747.816670705,239499.602897607 196746.43229818)))";GUP-72021-103;72021;12;12;34;1141600;1.60294;GUP-72021-103;Maasbekken;gemeentelijk;aansluiting;MAASEIK;1;100;0;1;100;324.6222;0;7B_I_005
17 REPLIES 17
tomrvincent
Rhodochrosite | Level 12
why not set the delim to spaces instead? That seems like a simpler solution.
Filipvdr
Pyrite | Level 9
I don't want all the coordinates in seperate fields. The coordinates are separated by spaces, but the different columns are separated by ";"
tomrvincent
Rhodochrosite | Level 12

Then read in records 20,000 chars (or whatever) at a time using the @ construct.

input longrecord @;

Maybe the @@ would be useful.

This might help: https://www.lexjansen.com/nesug/nesug08/ff/ff01.pdf

Tom
Super User Tom
Super User

Not sure you needed to post such a large example to get your point across about the contents.  

You can use a simple SAS datastep to display the value in a readable form.

6     option ls=132;
7     data _null_;
8       infile 'C:\downloads\sample.csv';
9       input;
10      list;
11    run;

NOTE: The infile 'C:\downloads\sample.csv' is:
      Filename=C:\downloads\sample.csv,
      RECFM=V,LRECL=32767,File Size (bytes)=22716,
      Last Modified=04Mar2019:10:29:57,
      Create Time=11Feb2019:15:48:04

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
1         "MULTIPOLYGON (((238929.952917889 195111.023842223,238922.254134767 195110.42790772,238914.534881592
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
     101   195110.6267283,238906.876984335 195111.618196409,238899.361618638 195113.391802248,238892.068449222
     201   195115.928745162,238885.074785523 195119.202132903,238878.454762109 195123.177266762,238872.2785528
     301  53 195127.812009327,238866.920555562 195132.742103539,238741.898031451 195259.526060227,238736.64599
     401  5855 195265.48372452,238732.171814367 195271.777221106,238728.36845018 195278.497401178,238725.27621
     501  9927 195285.573029164,238722.927901998 195292.929101638,238721.348389149 195300.4876424,238720.55442
     601  4614 195308.168529045,238720.554424614 195315.890342265,238721.348389149 195323.57122891,238722.9279
     701  01998 195331.129769675,238725.276219927 195338.485842146,238728.36845018 195345.561470129,238732.171
     801  814367 195352.281650208,238736.645995855 195358.575146794,238741.743567228 195364.37524727,238747.41
     901  0492949 195369.620469104,238753.586702205 195374.255211677,238760.20672562 195378.230345529,238767.2
    1001  00389333 195381.503733277,238774.493558735 195384.04067618,238782.00892444 195385.814282022,238789.6
    1101  66821696 195386.805750139,238797.386074863 195387.004570719,238805.084857985 195386.408636216,238812
    1201  .681562014 195385.02426368,238820.095659994 195382.866127811,238827.248560652 195379.957105387,23883
    1301  4.064441465 195376.328032762,238840.471052393 195372.017379008,238846.400481768 195367.070838138,238
    1401  848.857467048 195364.6903749,238973.725526951 195238.063982021,238976.657936066 195234.91445183,2389
    1501  81.450166568 195228.859625146,238985.594434321 195222.344147883,238989.046809092 195215.437085703,23
    1601  8991.770694815 195208.211655203,238993.737217635 195200.744447738,238994.925531924 195193.114617564,
    1701  238995.323041253 195185.403042778,238994.925531924 195177.691467989,238993.737217635 195170.06163781
    1801  9,238991.770694815 195162.594430357,238989.046809092 195155.368999857,238985.594434321 195148.461937
    1901  681,238981.450166568 195141.946460418,238976.657936066 195135.89163373,238971.268541671 195130.36164
    2001  0301,238965.339112297 195125.415099423,238958.932501368 195121.104445677,238952.116620556 195117.475
    2101  373052,238944.96371989 195114.56635062,238937.549621917 195112.408214752,238929.952917889 195111.023
    2201  842223)),((240873.740320124 195486.454337031,240868.948089615 195480.399510343,240863.558695227 1954
    2301  74.869516913,240857.629265845 195469.922976036,240851.222654916 195465.612322282,240844.406774111 19
    2401  5461.983249668,240837.253873445 195459.074227232,240829.839775465 195456.916091364,240822.243071437
    2501  195455.531718835,240814.544288322 195454.935784332,240806.825035147 195455.134604912,240799.16713789
    2601  1 195456.126073021,240792.814732939 195457.571297418,240688.371485397 195486.156125449,240723.066712
    2701  424 195346.066061363,240723.68035806 195343.377415735,240724.868672356 195335.747585561,240725.26618
    2801  1685 195328.036010776,240724.868672356 195320.324435987,240723.68035806 195312.694605816,240721.7138
    2901  35239 195305.227398355,240718.989949524 195298.001967855,240715.537574746 195291.094905678,240711.39
    3001  3307 195284.579428416,240706.601076499 195278.524601728,240701.211682104 195272.994608298,240695.282
    3101  252729 195268.048067421,240688.875641793 195263.737413675,240682.059760988 195260.108341049,240674.9
    3201  06860322 195257.199318618,240667.492762342 195255.041182749,240659.896058314 195253.65681022,240652.
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
    3301  197275199 195253.060875718,240644.478022024 195253.259696297,240636.820124768 195254.251164407,24062
    3401  9.30475907 195256.024770245,240622.011589669 195258.561713159,240615.017925955 195261.8351009,240608
    3501  .397902533 195265.810234759,240602.221693285 195270.444977324,240596.554767556 195275.690199167,2405
    3601  91.457196184 195281.490299642,240586.983014695 195287.783796228,240583.179650515 195294.5039763,2405
    3701  80.087420255 195301.579604283,240577.739102326 195308.935676761,240577.465650946 195310.005960193,24
    3801  0545.103712767 195440.674826831,240445.110343136 195334.497094516,240441.456600875 195330.874780908,
    3901  240435.5271715 195325.928240027,240429.120560572 195321.617586277,240422.304679759 195317.988513652,
    4001  240415.1517791 195315.079491224,240407.737681121 195312.921355356,240400.140977092 195311.536982827,
    4101  240392.442193978 195310.941048324,240384.722940803 195311.139868904,240377.065043546 195312.13133701
    4201  3,240369.549677841 195313.904942855,240362.25650844 195316.441885762,240355.262844726 195319.7152735
    4301  07,240348.642821312 195323.690407369,240342.466612056 195328.325149931,240336.799686335 195333.57037
    4401  1777,240331.702114962 195339.370472249,240327.227933474 195345.663968835,240323.424569286 195352.384
    4501  148907,240320.332339033 195359.459776893,240317.984021105 195366.815849368,240316.404508255 195374.3
    4601  74390129,240315.61054372 195382.055276774,240315.61054372 195389.777089994,240316.404508255 195397.4
    4701  57976639,240317.984021105 195405.016517404,240320.332339033 195412.372589875,240323.424569286 195419
    4801  .448217858,240327.227933474 195426.168397937,240331.702114962 195432.461894523,240335.911857784 1954
    4901  37.335272249,240502.148638979 195613.853420604,240477.677333444 195703.581765242,240476.213030668 19
    5001  5710.072749592,240475.329812968 195716.667974149,240475.034632571 195723.315524749,240475.034632571
    5101  195776.529199604,240464.119320095 195830.633746464,240463.531506367 195833.923986495,240462.73754181
    5201  7 195841.604873147,240462.737541817 195849.32668636,240463.531506367 195857.007573001,240465.1110192
    5301  16 195864.56611377,240467.459337145 195871.922186241,240470.551567405 195878.997814223,240474.354931
    5401  585 195885.717994303,240478.829113074 195892.011490889,240483.926684447 195897.811591361,240489.5936
    5501  10175 195903.056813199,240495.769819424 195907.691555768,240502.389842845 195911.666689623,240509.38
    5601  3506551 195914.940077368,240516.67667596 195917.477020275,240524.192041658 195919.250626117,240531.8
    5701  49938914 195920.242094234,240539.569192089 195920.440914813,240547.267975204 195919.844980311,240554
    5801  .864679232 195918.460607775,240562.278777212 195916.302471906,240569.43167787 195913.393449482,24057
    5901  6.247558683 195909.764376853,240582.654169612 195905.453723103,240588.583598986 195900.507182233,240
    6001  593.972993381 195894.977188803,240598.765223891 195888.922362115,240602.909491651 195882.406884845,2
    6101  40606.361866407 195875.499822676,240609.08575213 195868.274392173,240611.104576007 195860.55249887,2
    6201  40623.553411044 195798.85121166,240624.637123235 195791.730753161,240625.034632564 195784.019178376,
    6301  240625.034632564 195733.359356839,240646.94814337 195653.009616338,240832.411656663 195602.25054137,
    6401  240837.253873445 195600.747611549,240844.406774111 195597.838589121,240851.222654916 195594.20951649
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
    6501  5,240857.629265845 195589.898862746,240863.558695227 195584.952321876,240868.948089615 195579.422328
    6601  446,240873.740320124 195573.367501758,240877.884587884 195566.852024488,240881.336962648 195559.9449
    6701  62315,240884.060848363 195552.719531815,240886.027371183 195545.25232435,240887.215685479 195537.622
    6801  494176,240887.613194808 195529.910919391,240887.215685479 195522.199344605,240886.027371183 195514.5
    6901  69514431,240884.060848363 195507.102306966,240881.336962648 195499.876876473,240877.884587884 195492
    7001  .969814293,240873.740320124 195486.454337031)),((238847.981412672 195944.354112994,238847.866560809
    7101  195941.884861689,238897.271018945 195963.058223315,238898.560400747 195963.596655011,238905.85357016
    7201  3 195966.133597918,238913.368935861 195967.90720376,238921.026833117 195968.898671877,238928.7460862
    7301  92 195969.097492456,238936.444869414 195968.501557954,238944.041573443 195967.117185418,238951.45567
    7401  1415 195964.959049549,238958.608572081 195962.050027125,238965.424452893 195958.420954496,238971.831
    7501  063822 195954.110300746,238977.760493197 195949.163759876,238983.149887592 195943.633766446,238987.9
    7601  42118093 195937.578939758,238992.086385846 195931.063462488,238995.538760617 195924.156400319,238998
    7701  .26264634 195916.930969816,239000.22916916 195909.46376235,239001.417483449 195901.833932176,239001.
    7801  814992778 195894.122357391,239001.417483449 195886.410782605,239000.22916916 195878.780952431,238998
    7901  .26264634 195871.313744966,238995.538760617 195864.088314466,238992.086385846 195857.181252293,23898
    8001  7.942118093 195850.665775031,238983.149887592 195844.610948343,238977.760493197 195839.080954913,238
    8101  971.831063822 195834.134414036,238965.424452893 195829.823760286,238958.608572081 195826.194687657,2
    8201  38956.358966611 195825.186491471,238868.418275394 195787.497583877,238861.938931832 195785.06803219,
    8301  238855.263243218 195783.24600148,238848.448038487 195782.047002368,238841.551334254 195781.481241718
    8401  ,238790.364261203 195779.653017145,238789.618322015 195779.630090162,238781.89906884 195779.82891074
    8501  2,238774.241171584 195780.820378851,238766.725805886 195782.593984693,238759.432636485 195785.130927
    8601  596,238752.438972771 195788.404315345,238745.818949349 195792.379449207,238740.834990717 195796.0401
    8701  51887,238722.553863242 195810.665109787,238721.361612618 195811.639149662,238715.694686897 195816.88
    8801  4371508,238710.597115524 195822.68447198,238706.122934036 195828.977968566,238702.319569848 195835.6
    8901  98148638,238699.227339596 195842.773776624,238696.879021667 195850.129849099,238695.299508817 195857
    9001  .68838986,238694.505544282 195865.369276505,238694.487098739 195872.714877713,238698.152630873 19595
    9101  1.511608202,238698.955818176 195959.380600847,238700.535331026 195966.939141616,238702.883648954 195
    9201  974.295214087,238705.975879215 195981.370842069,238709.779243395 195988.091022149,238714.253424883 1
    9301  95994.384518735,238719.350996256 196000.184619207,238725.017921977 196005.429841045,238731.194131233
    9401   196010.064583614,238737.814154655 196014.039717469,238744.807818361 196017.313105214,238752.1009877
    9501  7 196019.850048121,238759.616353467 196021.623653963,238767.274250723 196022.61512208,238774.9935038
    9601  98 196022.81394266,238782.692287013 196022.218008157,238790.288991041 196020.833635621,238797.703089
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
    9701  021 196018.675499752,238804.85598968 196015.766477328,238811.671870492 196012.137404699,238818.07848
    9801  1421 196007.826750949,238824.007910796 196002.880210079,238829.397305191 195997.350216649,238834.189
    9901  5357 195991.295389961,238838.33380346 195984.779912692,238841.786178216 195977.872850522,238844.5100
   10001  63939 195970.647420019,238846.476586759 195963.180212554,238847.664901055 195955.550382379,238848.06
   10101  2410384 195947.838807594,238847.981412672 195944.354112994)),((239128.298859641 195903.214559555,239
   10201  120.600076526 195902.618625052,239112.880823351 195902.817445632,239105.222926095 195903.808913741,2
   10301  39097.707560398 195905.582519583,239090.414390996 195908.119462486,239083.420727283 195911.392850235
   10401  ,239076.800703861 195915.367984097,239070.624494612 195920.002726659,239064.957568884 195925.2479485
   10501  05,239059.859997511 195931.048048977,239056.649245299 195935.420876246,238972.462152556 196059.22700
   10601  3124,238971.198723279 196061.147672441,238967.395359099 196067.867852513,238964.303128839 196074.943
   10701  480495,238961.95481091 196082.299552973,238960.37529806 196089.858093739,238959.581333518 196097.538
   10801  980383,238959.481890269 196101.399886988,238959.481890269 196103.227971781,238959.581333518 196107.0
   10901  88878393,238960.37529806 196114.769765038,238961.95481091 196122.328305803,238964.303128839 196129.6
   11001  84378274,238967.395359099 196136.760006256,238971.198723279 196143.480186336,238975.672904767 196149
   11101  .773682926,238980.77047614 196155.57378339,238986.437401868 196160.819005232,238992.613611117 196165
   11201  .453747798,238999.233634539 196169.428881656,239006.227298245 196172.702269405,239013.520467654 1961
   11301  75.239212312,239021.035833351 196177.01281815,239028.693730608 196178.004286267,239036.412983783 196
   11401  178.203106847,239044.111766897 196177.607172344,239051.708470926 196176.222799808,239059.122568905 1
   11501  96174.064663939,239066.275469571 196171.155641515,239073.091350377 196167.52656889,239079.497961305
   11601  196163.215915136,239085.42739068 196158.269374266,239090.816785075 196152.739380836,239095.609015584
   11701   196146.684554148,239099.753283344 196140.169076879,239102.353376962 196134.967147905,239180.6887207
   11801  25 196019.766643982,239183.940376095 196014.534865208,239187.392750852 196007.627803035,239190.11663
   11901  6567 196000.402372535,239192.083159387 195992.93516507,239193.271473683 195985.305334896,239193.6689
   12001  83012 195977.59376011,239193.271473683 195969.882185325,239192.083159387 195962.252355151,239190.116
   12101  636567 195954.785147682,239187.392750852 195947.55971719,239183.940376095 195940.652655013,239179.79
   12201  6108328 195934.13717775,239175.003877826 195928.082351062,239169.614483431 195922.552357633,239163.6
   12301  85054056 195917.605816755,239157.27844312 195913.295163013,239150.462562315 195909.666090384,239143.
   12401  309661649 195906.757067952,239135.89556367 195904.598932084,239128.298859641 195903.214559555)),((23
   12501  9455.23651018 196131.366110057,239456.424824469 196123.736279882,239456.822333798 196116.024705097,2
   12601  39456.424824469 196108.313130312,239455.23651018 196100.683300138,239454.252561197 196096.560323332,
   12701  239416.815263368 195957.249862406,239415.832689531 195953.905631747,239413.108803809 195946.68020124
   12801  7,239409.656429037 195939.773139074,239405.512161277 195933.257661812,239400.719930783 195927.202835
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
   12901  124,239395.330536388 195921.672841698,239389.401107013 195916.726300817,239382.994496085 195912.4156
   13001  47067,239376.178615272 195908.786574442,239369.025714606 195905.877552014,239361.611616619 195903.71
   13101  9416145,239354.014912605 195902.335043617,239346.316129483 195901.739109114,239338.596876308 195901.
   13201  937929694,239330.938979059 195902.929397803,239323.423613355 195904.703003645,239316.130443938 19590
   13301  7.239946552,239309.13678024 195910.513334297,239302.51675681 195914.488468159,239296.340547569 19591
   13401  9.123210721,239290.673621848 195924.368432567,239285.576050475 195930.168533038,239281.101868987 195
   13501  936.462029625,239277.2985048 195943.182209697,239274.206274532 195950.257837683,239271.857956603 195
   13601  957.613910157,239270.278443754 195965.172450919,239269.484479219 195972.853337564,239269.484479219 1
   13701  95980.575150784,239270.278443754 195988.256037429,239271.906382583 195995.996602066,239303.726151407
   13801   196114.405118611,239300.128972568 196125.871116526,239272.903687365 196116.447010141,239265.5970473
   13901  29 196114.326162398,239258.0003433 196112.941789869,239250.301560186 196112.345855366,239242.5823070
   14001  11 196112.54467595,239234.924409755 196113.536144059,239227.409044057 196115.309749898,239220.115874
   14101  648 196117.846692804,239213.122210942 196121.120080549,239206.50218752 196125.095214412,239200.32597
   14201  8272 196129.729956973,239194.659052543 196134.975178819,239189.56148117 196140.775279291,239185.0872
   14301  99682 196147.068775877,239181.283935502 196153.788955953,239178.191705242 196160.864583936,239175.84
   14401  3387313 196168.22065641,239174.263874464 196175.779197171,239173.469909921 196183.460083816,239173.4
   14501  69909921 196191.181897037,239174.263874464 196198.862783682,239175.843387313 196206.421324447,239178
   14601  .191705242 196213.777396917,239181.283935502 196220.8530249,239185.087299682 196227.573204979,239189
   14701  .56148117 196233.866701566,239194.659052543 196239.666802034,239200.325978272 196244.912023876,23920
   14801  6.50218752 196249.546766441,239213.122210942 196253.5219003,239220.115874648 196256.795288049,239223
   14901  .837245978 196258.19497072,239271.368009657 196274.647873618,239277.03214075 196276.361478054,239282
   15001  .813742647 196277.623183536,239288.676821589 196278.425135233,239345.348149016 196283.909529388,2393
   15101  46.784398131 196284.034601964,239354.503651306 196284.233422544,239362.202434428 196283.637488041,23
   15201  9369.799138442 196282.253115505,239377.213236429 196280.094979636,239384.366137095 196277.185957212,
   15301  239391.182017908 196273.556884587,239397.588628836 196269.246230833,239403.518058211 196264.29968996
   15401  3,239408.907452606 196258.769696534,239413.6996831 196252.714869846,239417.84395086 196246.199392576
   15501  ,239421.296325631 196239.292330407,239424.07687515 196231.887855105,239453.38331496 196138.47522793,
   15601  239455.23651018 196131.366110057)),((239552.325768769 196200.690978091,239544.626985647 196200.09504
   15701  3585,239536.907732472 196200.293864161,239529.249835216 196201.285332277,239521.734469518 196203.058
   15801  938116,239514.441300102 196205.595881023,239507.447636403 196208.869268771,239500.827612974 196212.8
   15901  4440263,239494.651403733 196217.479145195,239488.984478004 196222.724367037,239483.886906639 196228.
   16001  524467509,239479.412725143 196234.817964099,239475.609360963 196241.538144171,239472.51713071 196248
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
   16101  .613772154,239470.168812767 196255.969844628,239468.589299925 196263.52838539,239467.795335382 19627
   16201  1.209272034,239467.795335382 196278.931085255,239468.589299925 196286.6119719,239470.168812767 19629
   16301  4.170512669,239472.51713071 196301.526585136,239475.609360963 196308.602213118,239479.412725143 1963
   16401  15.322393201,239483.886906639 196321.615889776,239488.984478004 196327.415990252,239494.651403733 19
   16501  6332.661212094,239500.827612974 196337.29595466,239502.725410767 196338.531667907,239661.031011805 1
   16601  96438.238610633,239665.753237441 196440.978031244,239672.74690114 196444.251418993,239680.040070556
   16701  196446.7883619,239687.555436254 196448.561967738,239695.21333351 196449.553435855,239702.932586685 1
   16801  96449.752256438,239710.631369807 196449.156321932,239718.22807382 196447.771949396,239725.642171808
   16901  196445.613813527,239732.795072474 196442.704791103,239739.610953286 196439.075718477,239746.01756421
   17001  5 196434.765064724,239751.946993589 196429.818523854,239757.336387984 196424.288530424,239762.128618
   17101  479 196418.233703729,239766.272886239 196411.718226466,239769.72526101 196404.811164297,239772.44914
   17201  6733 196397.585733797,239774.415669553 196390.118526332,239775.603983834 196382.488696158,239776.001
   17301  493178 196374.777121369,239775.603983834 196367.065546583,239774.415669553 196359.435716409,239772.4
   17401  49146733 196351.968508944,239769.72526101 196344.743078444,239766.272886239 196337.836016275,239762.
   17501  128618479 196331.320539009,239757.336387984 196325.265712317,239751.946993589 196319.735718887,23974
   17601  6.017564215 196314.789178018,239740.971974522 196311.315632109,239582.666373484 196211.608689383,239
   17701  581.305352248 196210.771581538,239574.489471436 196207.142508913,239567.33657077 196204.233486488,23
   17801  9559.922472782 196202.075350616,239552.325768769 196200.690978091)),((239661.818654299 196539.757653
   17901  557,239654.119871184 196539.161719054,239646.400618009 196539.360539634,239638.742720753 196540.3520
   18001  07743,239631.227355056 196542.125613585,239623.934185646 196544.662556492,239616.940521941 196547.93
   18101  5944237,239610.320498519 196551.911078099,239604.14428927 196556.545820661,239598.477363542 196561.7
   18201  91042507,239593.379792169 196567.591142979,239588.905610681 196573.884639565,239585.102246501 196580
   18301  .604819637,239582.01001624 196587.680447619,239579.661698312 196595.036520097,239578.082185462 19660
   18401  2.595060859,239577.28822092 196610.275947507,239577.28822092 196617.997760721,239578.082185462 19662
   18501  5.678647365,239579.661698312 196633.237188134,239582.01001624 196640.593260601,239585.102246501 1966
   18601  47.668888588,239588.905610681 196654.389068667,239593.379792169 196660.682565253,239593.828972161 19
   18701  6661.244529732,239625.64978072 196700.666050188,239630.298172101 196705.904186185,239635.965097822 1
   18801  96711.14940802,239642.141307063 196715.784150593,239648.761330493 196719.759284444,239655.754994191
   18901  196723.032672193,239663.048163608 196725.569615096,239670.563529305 196727.343220938,239678.22142656
   19001  1 196728.334689055,239685.940679736 196728.533509634,239693.639462858 196727.937575132,239701.236166
   19101  872 196726.553202596,239708.650264859 196724.395066727,239715.803165525 196721.486044303,239722.6190
   19201  46338 196717.856971677,239729.025657266 196713.546317924,239734.955086641 196708.599777054,239740.34
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
   19301  4481036 196703.069783624,239745.13671153 196697.014956936,239749.280979291 196690.499479666,239752.7
   19401  33354062 196683.592417497,239755.457239784 196676.366986997,239757.423762605 196668.899779528,239758
   19501  .612076886 196661.269949354,239759.00958623 196653.558374569,239758.612076886 196645.846799783,23975
   19601  7.423762605 196638.216969609,239755.457239784 196630.749762144,239752.733354062 196623.524331644,239
   19701  749.280979291 196616.617269475,239745.13671153 196610.101792209,239742.369391717 196606.450698953,23
   19801  9710.548583165 196567.0291785,239708.523672476 196564.625445064,239703.134278089 196559.095451634,23
   19901  9697.204848707 196554.148910757,239690.798237778 196549.838257015,239683.982356973 196546.209184386,
   20001  239676.829456307 196543.300161954,239669.415358327 196541.142026085,239661.818654299 196539.75765355
   20101  7)),((239499.602897607 196746.43229818,239491.904114485 196745.836363673,239483.970238663 196746.062
   20201  971447,239402.236265868 196695.761464648,239401.445599928 196695.280028775,239394.629719116 196691.6
   20301  5095615,239387.47681845 196688.741933722,239380.062720463 196686.583797853,239372.466016449 196685.1
   20401  99425325,239364.767233327 196684.603490822,239357.047980152 196684.802311406,239349.390082903 196685
   20501  .793779515,239341.874717198 196687.567385353,239334.581547782 196690.10432826,239327.587884083 19669
   20601  3.377716005,239320.967860654 196697.352849867,239314.791651413 196701.987592429,239309.124725692 196
   20701  707.232814275,239304.027154319 196713.032914747,239299.552972808 196719.326411333,239295.749608643 1
   20801  96726.046591409,239292.657378376 196733.122219391,239290.309060447 196740.478291865,239288.729547597
   20901   196748.036832627,239287.935583062 196755.717719272,239287.935583062 196763.439532492,239288.7295475
   21001  97 196771.120419137,239290.309060447 196778.678959902,239292.657378376 196786.035032373,239295.74960
   21101  8643 196793.110660356,239299.552972808 196799.830840435,239304.027154319 196806.124337021,239309.124
   21201  725692 196811.924437489,239314.791651413 196817.169659331,239320.967860654 196821.804401893,239323.4
   21301  36013773 196823.395787112,239440.810156129 196895.861498751,239444.962026447 196898.245247394,239451
   21401  .955690145 196901.518635143,239459.248859562 196904.055578046,239466.764225259 196905.829183888,2394
   21501  74.422122516 196906.820652004,239482.141375691 196907.019472584,239489.840158813 196906.423538081,23
   21601  9497.436862826 196905.039165545,239504.850960813 196902.881029677,239512.003861479 196899.972007252,
   21701  239518.819742292 196896.342934627,239525.226353221 196892.032280874,239531.155782595 196887.08574000
   21801  4,239536.681608118 196881.399644893,239546.580778033 196870.010704421,239551.100146286 196864.268081
   21901  103,239555.244414039 196857.752603829,239558.69678881 196850.84554166,239561.420674533 196843.620111
   22001  16,239563.387197353 196836.152903691,239564.575511642 196828.523073521,239564.973020971 196820.81149
   22101  8731,239564.575511642 196813.099923946,239563.387197353 196805.470093772,239561.420674533 196798.002
   22201  886306,239558.69678881 196790.777455807,239555.244414039 196783.870393638,239551.100146286 196777.35
   22301  4916371,239546.307915784 196771.30008968,239540.918521389 196765.77009625,239534.989092015 196760.82
   22401  355538,239528.582481086 196756.512901627,239521.766600274 196752.883829001,239514.613699608 196749.9
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
   22501  74806573,239507.199601635 196747.816670705,239499.602897607 196746.43229818)))";GUP-72021-103;72021;
   22601  12;12;34;1141600;1.60294;GUP-72021-103;Maasbekken;gemeentelijk;aansluiting;MAASEIK;1;100;0;1;100;324
   22701  .6222;0;7B_I_005 22716
NOTE: 1 record was read from the infile 'C:\downloads\sample.csv'.
      The minimum record length was 22716.
      The maximum record length was 22716.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
Tom
Super User Tom
Super User

You could read the file using space, comma, semi-colon, double-quote and parentheses as delimiters (without the DSD option).

You would then need to do you own detection of when you have read past the co-ordinates and are into the trailing fields.

Note that if the leading text value, "MULTIPOLYGON", or the 20 trailing field's have any of these characters inside of them then that could make this not work.

I am not going to re-type all of your variable names. Let's just call that trailing information VAR1 to VAR20.  I will call the variable to hold that first word PREFIX.  I will then may two arrays for the X an Y coordinates.   I just made room for 2,000 pairs.

data test;
  infile 'C:\downloads\sample.csv' dlm='( ,";)' truncover lrecl=1000000 ;
  length prefix $20 var1-var20 $20 n 8 next $32 ;
  array x [2000] ;
  array y [2000] ;
  input prefix next @;
  do n=1 by 1 ;
     if input(next,??32.) = . then leave;
     x[n]=input(next,??32.);
     input y[n] ??:32. next @;
  end;
  n=n-1;
  var1=next ;
  input var2-var20;
  drop next;
run;

proc print data=test;
  var prefix var1-var3 n x1 y1 x667 y667;
run;
Obs       prefix           var1         var2     var3     n         x1           y1          x667         y667

 1     MULTIPOLYGON    GUP-72021-103    72021     12     667    238929.95    195111.02    239499.60    196746.43

 

(Note it would be SO much easier if the long list was at the END of the line.  Can you change the program that makes the files to place it at the end of the line?).

Filipvdr
Pyrite | Level 9

Thanks for the efforts - I will try your suggestions out.

 

This will seem silly (and it is 🙂 ) - but i'm getting this .csv as an input file from a certain source (I don't know which source) and I have to output it as a "|" delimited file which serves as an input for another application. In the "|" delimited file they want the polygon coordinates as one column. 

 

 

ballardw
Super User

@Filipvdr wrote:

Thanks for the efforts - I will try your suggestions out.

 

This will seem silly (and it is 🙂 ) - but i'm getting this .csv as an input file from a certain source (I don't know which source) and I have to output it as a "|" delimited file which serves as an input for another application. In the "|" delimited file they want the polygon coordinates as one column. 

 

 


It might help to show 10 or 20 rows of the output needed for the pipe delimited file. It sounds more like what I would expect.

Maybe include a transition section from one polygon (?) to another if the layout at that point differs from the main body of the file.

Peter_C
Rhodochrosite | Level 12
Do those ((( psrentheses imply a hierarchical structure that needs to be captured?
Filipvdr
Pyrite | Level 9
No, i just want the complete string captured in one variable, or if necessary in a second and third variable (like an array)
Peter_C
Rhodochrosite | Level 12
Another feature of infile might be helpful here :
The DLM= option can name a variable as well as a constant of more than one character - each character is respected as a delimiter - so both blank and semicolon can be used
DLM= ' ;'
With dlm as a variable, its value could be changed from blank to semicolon once the final ) in coordinates is detected.
Peter_C
Rhodochrosite | Level 12
Is there a specific maximum number of coordinates in one row?
Filipvdr
Pyrite | Level 9
no.. i only know that some of them can reach more than 32k charachters...
Peter_C
Rhodochrosite | Level 12
If your customer just wants the same but with pipe | demimiters, do you need to do any more than replacing semicolons with pipes?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 17 replies
  • 1763 views
  • 1 like
  • 5 in conversation