sas从配置单元加载被截断为32767个字符

rbpvctlc  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(335)

从配置单元加载的sas在19m前被截断为32767个字符
你好。我有一个脚本要从hivedb的表中读取。但是,其中一列包含的数据超过32767个字符(sas字符字数限制)。为此,我在网上做了一些研究,并注意到我可以通过使用pass-thru来克服它。不过,我的脚本是从配置单元表中读取数据并在一个数据步骤中进行转换。
包含超过32767个数据的列是“geometry”
这是我的密码:

proc sort data=ncpdm.ncp_dim_ba 
               (keep=region zone state_code state business_area_code business_area gis_ba)
           out=business_area nodupkeys;
by gis_ba business_area_code;
run;

data business_area;
  set business_area;
  by gis_ba business_area_code;
  if first.business_area_code;
run;

data ncp_dim_ba_geo (drop=excp_code cgis_area)
     work.excp_ncp_dim_ba_geo;
  length excp_code $50;
  length gis_ba dotpos $50 zone $2 state_code $5 /*geometry $1500*/
         region state business_area_code $30 business_area $50 xval yval 8;
  if _n_=1 then do;
     declare hash h(dataset:"business_area");
     h.definekey('gis_ba');
     h.definedata('region','zone','state_code','state','business_area_code','business_area');
     h.definedone();
     call missing(region,zone,state_code,state,business_area_code,business_area);
  end;
  set hpsncp.DIST_OPERATION_BND_GIS (keep=cgis_area geometry cgis_label
      dbsastype=(cgis_area='CHAR(50)' geometry='CHAR(32767)' cgis_label='CHAR(50)'));
  if cgis_area='0290 - Sg. Petani' then cgis_area = '6290 - SUNGAI PETANI';
  if cgis_label='PERLIS' then cgis_area = '2610 - PERLIS';
  gis_ba=upcase(cgis_area);
  rc2=h.find();
  if (rc2 ne 0) then do;
     excp_code='Exception: Unable to map business area';
     output work.excp_ncp_dim_ba_geo;
  end;
  if (rc2=0);
  geometry=substr(geometry,15);
  seq=1;
  do until(dotpos eq '');
     dotpos=compress(scan(geometry, seq, '[]'),',','nk');
     if dotpos not in ('' '{' '}' '[' ']' ',') then do;
        xval=input(put(scan(dotpos,1,','),20.),20.)/1000;
        yval=input(put(scan(dotpos,2,','),20.),20.)/1000;
        if xval ne . and yval ne . then do;
           output ncp_dim_ba_geo;
        end;
     end;
     seq+1;
  end;
  keep excp_code cgis_area region zone state_code state business_area_code business_area seq xval yval /*geometry*/;
run;

这里是sas数据步骤中没有的原始数据,因为它超过了32767(我删除了很多记录,因为stackoverflow不允许超过30k个字)。

[794533591,649756392],[794460411,643714587],[797817321,640072798],[798129358,636695242],[798322922,633792355],[797756719,633041300],[797949498,630288094],[794695905,627040004],[794619914,623986269],[794328752,622069096],[794215316,620631699],[796922917,618788022],[797467683,617712824],[796756854,615733839],[796165119,613935034],[794734837,611833139],[794380257,610634154],[795585405,609442135],[797865882,609272758],[797988024,608794336],[799428391,608681095],[799785094,609401177],[801582426,609948210],[802306998,608933675],[804104633,609420908],[804413690,607446476],[803350140,603849174],[803898576,601995575],[803619136,597443896],[804748246,594062351],[798643797,590323168],[795646998,589471940],[789271491,592916964],[785205389,589547304],[781873184,582708977],[779591421,583058891],[777806084,579340230],[771898662,554894181],[768790041,551410842],[771089313,546510904],[769913010,539802456],[770523789,536931458],[766802071,536678710],[766213086,533444358],[765995948,526859374],[764076478,526254167],[764095364,520747510],[759891353,520852989],[758461302,517496409],[763528342,510809594],[762533435,509303361],[760735961,507980629],[761585277,505409684],[762640976,501150372],[760950773,492992594],[759702410,490269939],[762838465,486449208],[766318770,487777148],[769209157,485751369],[770894937,484679414],[769106746,480244192],[771660720,478258968],[770921845,467742317],[778783239,465074559],[777255074,459812310],[778942592,455457862],[784160745,454384464],[786684594,450353139],[783806087,444381118],[788878291,428431524],[787992855,423106994],[789362548,417404565],[782304626,408086945],[783863066,405277457],[781045644,405761433],[780475246,404966332],[780907363,403773680],[781465326,402602040],[781480428,400706692],[780294892,400155455],[780015498,399823203],[779517119,397648461],[779970191,396349656],[778432574,395516933],[778432480,395089730],[778534758,394542941],[780277879,383066156],[774678777,385351969],[761284176,398395586],[742640785,391877508],[740386168,390270359],[740068832,390597930],[740094422,390746363],[739981820,390843609],[739858980,390818019],[735957549,394830634],[732022074,402838176],[727912965,405321484],[730388926,408323289],[730795113,408986625],[731584402,409536605],[731895078,409973230],[732310711,409423250],[732906875,409335086],[735279976,410011015],[736771504,409038976],[737006551,408855527],[737564066,409889344],[737676133,410489024],[741094449,410318006],[741143691,411154976],[741164715,411512320],[740363074,412069359],[738238879,412856289],[737704773,412948012],[737643625,412875398],[736988172,413377973],[737979949,414574219],[736975273,415376812],[736468875,415697851],[735863586,414907680],[735979740,413832688],[736089040,413620681],[735894854,413336315],[735581722,413455367],[734661129,414313375],[734220688,414272261],[733920841,413813775],[734098022,413049154],[733778754,412822848],[733549918,412918394],[733507879,412979543],[733557562,413013941],[733490679,413147707],[733214754,414323847],[733386709,414874102],[732989316,415481530],[732446311,416107048],[731804727,416490474],[729740945,416327117],[729740945,415581281],[729740945,415395922],[729481058,415390187],[729347293,415277445],[729131836,415209605],[728898699,415328082],[728795512,415494336],[728751558,415834480],[728891058,416450758],[728921633,416811926],[728900613,417132965],[728816531,417406226],[728568109,417752105],[728434344,418099898],[728493582,418631137],[728600594,418866183],[728743914,419036254],[727528082,419034344],[727197488,418843250],[727019773,418835605],[726807660,418782101],[726503820,418812676],[726235332,418740058],[726097746,418627316],[725778621,418529859],[725769066,418661711],[725637211,418657890],[725453762,418799301],[725425097,418910133],[725481945,419042789],[725284625,419042789],[725708656,419559183],[725838804,419798488],[725838804,420008406],[725775828,420243512],[725561715,420684336],[725393781,420919441],[725242640,421066383],[724999137,421112566],[724018828,420831277],[723174965,420335875],[722721547,420331676],[722064508,420629758],[721871383,420608765],[721644676,420503808],[721313008,420218324],[721052711,419857265],[720930957,419403848],[720864836,418543191],[720780867,418102367],[720545762,417548187],[720323250,417367660],[719844640,417283691],[719286265,417329875],[718820250,417590168],[718496980,417909242],[717963793,418555785],[717858832,419021801],[717833644,419139351],[717871429,419496211],[717955394,419769101],[717716090,419848871],[718564152,420793492],[719647320,421255308],[719886625,421763308],[720012574,421805289],[720029367,421943836],[719928609,422317484],[719533965,422829683],[718740480,423341879],[718173707,423493015],[717748433,423544625],[717093496,423555543],[716258449,423773855],[715707207,424292348],[715510726,424990949],[715543472,425471238],[715850476,426841152],[715907381,427191376],[715893331,427472771],[715778392,427731073],[715638076,427883270],[715288274,427994500],[715005285,427992114],[714251074,427828938],[714251071,427828937],[713762727,427585488],[712817114,427265231],[712143848,426964630],[711380687,426692405],[709659552,426307269],[709023625,426258679],[708246436,426269046],[707306321,426346163],[706764047,426309370],[706474852,426252508],[705017843,425737106],[704673798,425740521],[703882940,425687376],[702704786,425727433],[702308710,425806593],[702201235,425810859],[701945057,425904686],[701888813,425897959],[699709655,424589768],[699639277,424581911],[699551438,424576002],[699532196,424567374],[699508594,424556997],[699446454,424514842],[699375624,424470982],[699232230,424386270],[699219412,424378762],[699147145,424336790],[699083430,424296798],[699040841,424270801],[699000673,424246964],[698923324,424173402],[698833779,424093224],[698817439,424079603],[698718458,423997982],[698654404,423947323],[698588335,423899320],[698520362,423854055],[698450597,423811602],[698362023,423760151],[698319804,423736322],[698236588,423690675],[698143052,423642523],[698047114,423599355],[697891537,423534217],[697807052,423501076],[697745264,423479581],[697682806,423460119],[697575435,423428578],[697469946,423400692],[697363094,423378600],[697284719,423366212],[697199734,423354502],[697156001,423348966],[697074032,423339507],[696960212,423329657],[696888218,423325494],[696776881,423322163],[696689632,423323886],[696602541,423329414],[696515774,423338735],[696429496,423351832],[696327773,423372284],[696227247,423397983],[696107845,423431831],[696040106,423452334],[695973136,423475222],[695883101,423510263],[695794863,423549610],[695686377,423601163],[695631273,423628677],[695617894,423630668],[695532270,423647516],[695447463,423668083],[695405260,423680290],[695363721,423677482],[695276480,423675399],[695189231,423677124],[695102141,423682653],[695015374,423691975],[694929097,423705073],[694843999,423721807],[694759706,423742214],[694711949,423754878],[694627594,423779241],[694544388,423807283],[694462992,423838744],[694383045,423873726],[694304699,423912162],[694293454,423918302],[694256416,423930972],[694201398,423951789],[694027832,424020396],[693926364,424063777],[693848954,424102052],[693844968,424103389],[693763572,424134851],[693683625,424169833],[693605281,424208269],[693528687,424250086],[693453991,424295204],[693381334,424343538],[693310854,424394994],[693242685,424449476],[693176959,424506879],[693113798,424567095],[693053324,424630008],[693044601,424639914],[692991751,424667884],[692889176,424725434],[692871321,424735573],[692796625,424780691],[692723968,424829024],[692653489,424880481],[692643482,424888479],[692637038,424891997],[692598634,424914638],[692516248,424964455],[692430362,425019425],[692347389,425078702],[692274789,425133416],[692254876,425148620],[692085140,425279904],[692026312,425327206],[691959777,425385382],[691900721,425415961],[691815360,425462293],[691748434,425502509],[691583300,425606179],[691526540,425643167],[691471066,425682056],[691416941,425722801],[691364226,425765356],[691298501,425822760],[691235341,425882976],[691174869,425945889],[691117198,426011381],[691113988,426015200],[691002700,426147953],[690948869,426215044],[690897973,426284388],[690865223,426333286],[690852630,426339704],[690793912,426372157],[690725449,426378649],[690621409,426393972],[690541260,426409629],[690461817,426428546],[690365178,426453653],[690275863,426479084],[690187826,426508633],[690106431,426540097],[690026487,426575081],[689948145,426613518],[689871554,426655337],[689796860,426700456],[689724206,426748790],[689653728,426800248],[689585563,426854730],[689519838,426912134],[689456681,426972351],[689396210,427035265],[689338540,427100756],[689283783,427168701],[689232041,427238970],[689183413,427311428],[689137993,427385939],[689086410,427480664],[689040008,427578032],[688984296,427703543],[688958268,427764917],[688934300,427827125],[688900611,427927212],[688889082,427968566],[688863810,428008387],[688822416,428076579],[688815861,428087967],[688729887,428238453],[688680955,428329486],[688625082,428440199],[688590004,428500412],[688540322,428555827],[688485565,428623771],[688433823,428694040],[688385196,428766498],[688339776,428841009],[688290090,428932023],[688277601,428956381],[688225008,429067203],[688205337,429116203],[688162217,429165172],[688107460,429233117],[688055719,429303385],[688009919,429371629],[688006842,429375625],[687984251,429400779],[687929494,429468724],[687877753,429538992],[687829126,429611451],[687783706,429685961],[687741579,429762382],[687702826,429840567],[687667520,429920368],[687635728,430001634],[687607512,430084209],[687582924,430167936],[687562011,430252655],[687544814,430338207],[687531365,430424427],[687521690,430511151],[687517761,430569286],[687511429,430600787],[687506619,430631620],[687468029,430684028],[687419402,430756487],[687373982,430830997],[687331855,430907417],[687293102,430985602],[687257796,431065404],[687226004,431146669],[687189152,431257145],[687158792,431369579],[687155712,431382467],[687132009,431496129],[687118560,431582349],[687108885,431669073],[687103001,431756137],[687100921,431843375],[687102648,431930620],[687108179,432017707],[687117503,432104470],[687130603,432190743],[687155931,432313301],[687188875,432434034],[687196720,432459606],[687227998,432553252],[687243775,432594067],[687230902,432891305],[687198798,433239016],[687198352,433245415],[687197491,433250301],[687183627,433341152],[687173951,433432544],[687158143,433623712],[687124676,433973267],[687121762,434006652],[687097451,434314933],[687059512,434622177],[687050421,434712670],[687039322,434855814],[687033970,434924848],[687008674,435251199],[686996501,435312861],[686993269,435329603],[686954657,435534358],[686951115,435553665],[686932938,435678005],[686910274,435876417],[686896399,435959888],[686891254,435990821],[686888101,436012137],[686880734,436061953],[686872777,436133417],[686867394,436205121],[686864592,436276972],[686860347,436479044],[686859910,436516959],[686862837,436629297],[686863704,436636647],[686862977,436645273],[686858718,436699466],[686857145,436716681],[686856063,436723614],[686846386,436810338],[686840500,436897401],[686839347,436945733],[686822686,437048509],[686811546,437127055],[686803530,437205981],[686798651,437285162],[686796915,437364475],[686799179,437463799],[686804567,437576837],[686809923,437689201],[686815839,437845675],[686822681,438027052],[686823328,438042600],[686836527,438332566],[686837573,438353205],[686851263,438729566],[686861850,439020666],[686866065,439059899],[686879163,439146172],[686892972,439217713],[686900966,439252302],[686902227,439270045],[686923207,439506847],[686932389,439590449],[686945078,439673591],[686957242,439737292],[686984822,439870005],[687000512,439939302],[687018654,440007999],[687028545,440040702],[687028189,440088296],[687028137,440099142],[687031399,440217524],[687041662,440335506],[687062844,440516697],[687076247,440611577],[687121742,440886003],[687152721,441100140],[687161785,441157002],[687180835,441252538],[687236384,441499587],[687253764,441570762],[687273738,441641254],[687396504,442046079],[687423592,442128867],[687821661,442998562],[687830836,443014704],[687887972,443108127],[687950135,443198282],[687981095,443240652],[688023184,443308507],[688061352,443367688],[688101580,443425489],[688143818,443481838],[688188013,443536665],[688227655,443582672],[688319149,443685651],[688367989,443738666],[688418707,443789886],[688471238,443839246],[688521470,443883147],[688525446,443886751],[688541376,443901863],[688595978,443949594],[688675555,444013256],[688713346,444041941],[688750745,444072899],[688800225,444112552],[688850938,444150617],[688902831,444187056],[688955854,444221831],[688978257,444236022],[689009798,444255150],[689034423,444271610],[689080480,444305506],[689150562,444352546],[689152895,444354192],[689164075,444361716],[689233451,444409478],[689305102,444453692],[689347805,444478818],[689358405,444485011],[689434823,444527144],[689513006,444565904],[689592805,444601216],[689674069,444633015],[689728134,444651083],[689745477,444658592],[689816837,444686295],[689922286,444721633],[690029536,444751056],[690115703,444772137],[690177431,444786208],[690239572,444798318],[690325792,444811774],[690412517,444821457],[690499582,444827347],[690586821,444829434],[690644268,444828730],[690784750,444824989],[690857579,444821720],[690930241,444815800],[691002639,444807235],[691028403,444803231],[691083261,444811777],[691137920,444819521],[691282197,444837934],[691309758,444847355],[691393484,444871951],[691478203,444892872],[691563754,444910078],[691627598,444920412],[691669298,444926472],[691739827,444935445],[691810631,444941905],[691881620,444945845],[691938594,444946979],[691940596,444948592],[692000967,444995389],[692063081,445039847],[692126848,445081901],[692192174,445121489],[692261788,445160048],[692332880,445195808],[692405339,445228711],[692479049,445258706],[693633099,445701775],[693643198,445705653],[693717979,446148582],[693719707,446158663],[693731716,446221651],[693745739,446284221],[693761759,446346310],[693779761,446407853],[693891830,446769362],[693921281,446857131],[693963651,446964530],[694012147,447069305],[694156637,447359220],[694213363,447478062],[694224870,447638049],[694222892,447745182],[694216270,447774723],[694198987,447860596],[694197710,447867823],[694151470,448132369],[694138733,448215507],[694129503,448299107],[694123795,448383021],[694121621,448467101],[694120566,448685517],[694115678,449062593],[694091805,449202253],[694090278,449211313],[694067781,449346664],[694044560,449425447],[694000744,449573835],[693976821,449662261],[693956868,449752212],[693943131,449792613],[693918528,449876338],[693897602,449961057],[693880390,450046608],[693865707,450142100],[693854140,450231684],[693846821,450296730],[693834232,450427898],[693817409,450491931],[693801000,450565598],[693795207,450594128],[693786366,450640469],[693772903,450726689],[693763212,450813414],[693757314,450900480],[693755864,450960884],[693752556,450974276],[693735344,451059827],[693730289,451092200],[693685354,451140103],[693638751,451193450],[693581294,451264881],[693551560,451303633],[693483629,451397694],[693421267,451495536],[693385234,451555860],[693372385,451577683],[693345554,451625415],[693326273,451660836],[693290554,451709323],[693241914,451781775],[693196480,451856280],[693150062,451941536],[693087782,452042328],[693072505,452069682],[693041602,452114108],[693019110,452150539],[692979049,452196020],[692901304,452294360],[692875385,452331739],[692816933,452370612],[692746446,452422059],[692678271,452476532],[692612537,452533927],[692549369,452594134],[692530475,452613784],[692527684,452616004],[692478273,452648309],[692412494,452676915],[692244497,452754226],[692163495,452793739],[692084355,452836860],[692077038,452841084],[691941242,452919859],[691877351,452958533],[691814949,452999566],[691783144,453021311],[691700377,453049204],[691618978,453080656],[691582746,453096505],[691518401,453106267],[691478832,453113566],[691432087,453122678],[691356605,453138908],[691281805,453158039],[691207800,453180043],[691134699,453204887],[691053300,453236339],[690973351,453271312],[690895003,453309739],[690844756,453337165],[690797873,453357996],[690704582,453402368],[690613706,453451498],[690539006,453496607],[690466344,453544932],[690395860,453596380],[690327686,453650853],[690261954,453708249],[690198788,453768457],[690138308,453831363],[690080630,453896847],[690036295,453951367],[689993904,454007411],[689953506,454064910],[689915154,454123792],[689885627,454170915],[689850515,454229127],[689808377,454305542],[689769613,454383723],[689734295,454463520],[689702492,454544782],[689674264,454627354],[689649664,454711078],[689628740,454795796],[689611530,454881346],[689598069,454967565],[689591291,455028244],[689569388,455084762],[689541159,455167333],[689516560,455251057],[689495635,455335775],[689478426,455421325],[689473375,455451923],[689457671,455482959],[689422353,455562756],[689390550,455644017],[689368884,455706306],[689355160,455750397],[689330144,455807666],[689317301,455840637],[689307586,455860230],[689272268,455940027],[689253103,455988999],[689245921,456000879],[689202046,456080622],[689181285,456120476],[689152407,456178163],[689144104,456196180],[689128361,456218242],[689084039,456260488],[689063751,456281590],[689005280,456332645],[688942114,456392853],[688881635,456455759],[688823957,456521242],[688774468,456582363],[688733181,456635454],[688692588,456689515],[688653845,456744917],[688616996,456801597],[688610806,456811862],[688577867,456847203],[688534106,456897408],[688486868,456955639],[688458869,456992928],[688455282,456996347],[688394803,457059252],[688337126,457124736],[688316184,457150606],[688295305,457172323],[688237627,457237806],[688203279,457280415],[688178106,457306599],[688137783,457352379],[688072335,457374440],[687990937,457405893],[687910990,457440866],[687832644,457479294],[687756048,457521102],[687713207,457546429],[687689159,457561052],[687625966,457601116],[687564316,457643516],[687504295,457688192],[687445987,457735082],[687380256,457792478],[687317092,457852686],[687256614,457915592],[687198937,457981076],[687144172,458049013],[687115041,458088564],[687105123,458092903],[687026778,458131331],[686950183,458173139],[686904666,458201174],[686861564,458222363],[686786048,458263613],[686711350,458308723],[686696084,458318877],[686672056,458321456],[686585781,458334548],[686500159,458351390],[686415354,458371951],[686331526,458396191],[686248836,458424065],[686167440,458455519],[686087493,458490494],[686009149,458528922],[685932555,458570731],[685858486,458615443],[685786420,458663317],[685734258,458701319],[685727469,458703282],[685725060,458697777],[685686629,458619434],[685644817,458542842],[685599704,458468146],[685551376,458395489],[685499925,458325010],[685445448,458256841],[685375474,458177461],[685301400,458101893],[685253387,458055436],[685203199,458008517],[685151430,457963349],[685083490,457908588],[685013226,457856843],[684940772,457808212],[684866266,457762787],[684789849,457720656],[684711668,457681898],[684631870,457646587],[684550607,457614790],[684451043,457581255],[684349855,457552994],[684266925,457532164],[684199272,457516415],[684131113,457503025],[684044896,457489571],[683958173,457479890],[683871111,457474002],[683783875,457471916],[683766523,457471955],[681737862,457485362],[681720561,457485590],[681650622,457487237],[681637661,457487825],[681563540,457492731],[681554924,457493490],[681476778,457502014],[681472490,457502577],[681390501,457515068],[681304883,457531915],[681220081,457552481],[681136257,457576726],[681053570,457604604],[680972178,457636063],[680892235,457671041],[680878895,457677586],[680873130,457676437],[680795900,457664209],[680718252,457655008],[680680154,457651248],[680584092,457644097],[680487797,457641580],[680400554,457643305],[680313470,457648834],[680226709,457658156],[680140438,457671253],[680054820,457688101],[679970019,457708668],[679886196,457732914],[679803510,457760793],[679722118,457792253],[679642177,457827232],[679563837,457865666],[679487249,457907480],[679482699,457910102],[679459789,457923347],[679386323,457967952],[679314841,458015672],[679245475,458066420],[679178354,458120100],[679112631,458177500],[679049475,458237711],[678989005,458300620],[678931336,458366107],[678876579,458434047],[678824837,458504311],[678778780,458572936],[678761603,458578777],[678680213,458610237],[678600272,458645217],[678521933,458683651],

我该怎么解决这个问题?有解决办法吗?预期的结果是在[,]块中每个有1行记录
例如,
x=794533591
y=649756392元
(一行,以上数据中其他块相同)
试用@pinegulf文章后更新
嗨,我指的是你的导游。我尝试了在datastep中使用varchar进行处理的方法。我首先使用pass-thru将列拆分为3个独立的列。然后,使用datastep和varchar连接回并进一步转换。然而,它从来没有在我的脚本工作。这是我的剧本:

proc sql;
      connect to hadoop as mydb
         (server=XXXX
          database=<removed>
        );
            create table a as 
            select * from connection to mydb(
            select  cgis_area
            ,substr(geometry,1,30000) as geometry1
            ,substr(geometry,30001,60000) as geometry2
            ,substr(geometry,60001,90000) as geometry3
            from DIST_OPERATION_BND_GIS 
            );
      disconnect from mydb;
    quit;

proc sort data=ncpdm.ncp_dim_ba 
               (keep=region zone state_code state business_area_code business_area gis_ba)
           out=business_area nodupkeys;
by gis_ba business_area_code;
run;

data business_area;
  set business_area;
  by gis_ba business_area_code;
  if first.business_area_code;
run;

data ncp_dim_ba_geo (drop=excp_code cgis_area)
     work.excp_ncp_dim_ba_geo;
  length excp_code $50;
  length gis_ba dotpos $50 zone $2 state_code $5
         region state business_area_code $30 business_area $50 xval yval 8;
  if _n_=1 then do;
     declare hash h(dataset:"business_area");
     h.definekey('gis_ba');
     h.definedata('region','zone','state_code','state','business_area_code','business_area');
     h.definedone();
     call missing(region,zone,state_code,state,business_area_code,business_area);
  end;
  set a;
    array geo {3} geometry1-geometry3;

**CREATE AND POPULATE VARCHAR FIELD**;

    length longgeo varchar(160000);
    do i = 1 to 3;
    longgeo = cat(longgeo,geo(i));
    end;
/*  set hpsncp.DIST_OPERATION_BND_GIS (keep=cgis_area geometry cgis_label*/
/*      dbsastype=(cgis_area='CHAR(50)' geometry='CHAR(32767)' cgis_label='CHAR(50)'));*/
  if cgis_area='0290 - Sg. Petani' then cgis_area = '6290 - SUNGAI PETANI';
  if cgis_label='PERLIS' then cgis_area = '2610 - PERLIS';
  gis_ba=upcase(cgis_area);
  rc2=h.find();
  if (rc2 ne 0) then do;
     excp_code='Exception: Unable to map business area';
     output work.excp_ncp_dim_ba_geo;
  end;
  if (rc2=0);
  longgeo=substr(longgeo,15);
  seq=1;
  do until(dotpos eq '');
     dotpos=compress(scan(longgeo, seq, '[]'),',','nk');
     if dotpos not in ('' '{' '}' '[' ']' ',') then do;
        xval=input(put(scan(dotpos,1,','),20.),20.)/1000;
        yval=input(put(scan(dotpos,2,','),20.),20.)/1000;
        if xval ne . and yval ne . then do;
           output ncp_dim_ba_geo;
        end;
     end;
     seq+1;
  end;
  keep excp_code cgis_area region zone state_code state business_area_code business_area seq xval yval;
run;

表ncp\u dim\u ba\u geo现在不产生任何结果。我做错了什么?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题