<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Flaging closest match per row by referencing data from external table? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625843#M184522</link>
    <description>&lt;P&gt;Sure! Something like this is how I would like the the output (column-wise):&lt;/P&gt;&lt;P&gt;[PT route no];[Boarding_stp];[Date];[ToStopCandidate];[Total_Mete];[Total_seco];&lt;STRONG&gt;[Flag for closest stop]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where the last variable (in &lt;STRONG&gt;bold&lt;/STRONG&gt;)&amp;nbsp; is added and indicates with a "1" when 1. the [ToStopCandidate] is in the itinerary of the route of [PT route no] and 2. it has the shortest distance according to [Total_Mete] or [Total_Seco].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Ulrik&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2020 13:45:20 GMT</pubDate>
    <dc:creator>ulricius</dc:creator>
    <dc:date>2020-02-19T13:45:20Z</dc:date>
    <item>
      <title>Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625832#M184519</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working with disaggregate trip data (boardings, in time and space) from public transport (PT) fare cards and aim to infer alighting stops by utilising auxiliary data regarding the actual movements of PT vehicles. The raw card data are in the form [boardingID];[card ID];[boarding datetime];[route no];[stop no]. The idea is to use the boarding of the subsequent trip as candidate ("target stop") for alighting location. Thus, I have successfully introduced a variable [stop no(ID+1)] and merged this with up to 20 candidate stops for possible alightings (see variable [ToStopCandidate] in sheet "StopCandidatesTrip" in enclosed attachment, which is based on a stop-stop matrix based on network distances, generated outside of SAS).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue now is; how do I search and reference the stop itineraries of each PT line route (see sheet "RouteItineraryExcpt" in attachment) in order to identify the closest (in terms of walk distance or duration) stop to the "target stop" of that route? The script would have to search through the line itinerary of&amp;nbsp; "RouteItineraryExcpt" to find the route no stated in the StopCandidatesTrip file, and then flag the stop no that has the shortest walk distance or duration to the "target stop" among the stops serviced by this route.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect, the most straightforward advice would be to merge the line itineraries to the trip file, but this would generate an enormous amount of redundant rows. The entire stop candidates file is more than 26 million rows already, and the route itinerary file is more than one million rows. Is there a more efficient way in SAS to reference between this kind of huge datasets?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll be happy to clarify if there are ambiguities in my description above! I use SAS Enterprise Guide 7.15 HF8 (7.100.5.6214) (32 bit).&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 13:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625832#M184519</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-19T13:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625835#M184520</link>
      <description>Could you post an example of what you want the outcome to look like and what data would be used for that example?</description>
      <pubDate>Wed, 19 Feb 2020 13:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625835#M184520</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2020-02-19T13:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625843#M184522</link>
      <description>&lt;P&gt;Sure! Something like this is how I would like the the output (column-wise):&lt;/P&gt;&lt;P&gt;[PT route no];[Boarding_stp];[Date];[ToStopCandidate];[Total_Mete];[Total_seco];&lt;STRONG&gt;[Flag for closest stop]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where the last variable (in &lt;STRONG&gt;bold&lt;/STRONG&gt;)&amp;nbsp; is added and indicates with a "1" when 1. the [ToStopCandidate] is in the itinerary of the route of [PT route no] and 2. it has the shortest distance according to [Total_Mete] or [Total_Seco].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Ulrik&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 13:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625843#M184522</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-19T13:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625853#M184527</link>
      <description>&lt;P&gt;Could you show, in the form of a SAS data step with actual data values, both a sample of the input data, and a sample of the desired resulting data?&amp;nbsp; This will make it possible to suggest programs that can be tested before submitting them to this discussion. &amp;nbsp; Help us help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can see how to do this by looking at the "example of how to create a data step of your data" link in the&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Getting-Started/How-to-get-fast-helpful-answers/ta-p/226133" target="_self"&gt;How to get fast helpful answers&lt;/A&gt; page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 14:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/625853#M184527</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-02-19T14:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626017#M184577</link>
      <description>&lt;P&gt;Well, I can try...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trip data (relevant variables &lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;are&lt;/FONT&gt; PTrouteNo, Date, ToStopCandidate, Total_Mete &lt;/FONT&gt;&lt;FONT color="#000000"&gt;and&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt; TotalSeco)&lt;/FONT&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;label dev_id="dev_id" dev_log_num="dev_log_num" dev_trs_num="dev_trs_num" &lt;FONT color="#FF0000"&gt;PTrouteNo="linje"&lt;/FONT&gt; dep_num="dep_num" zon="zon" stp="stp" dst_pnt="dst_pnt" trs_dt="trs_dt" log_rec_id="log_rec_id" crd_num="crd_num" crd_trs_num="crd_trs_num" zonnum="zonnum" From="From" 
&lt;FONT color="#FF0000"&gt;ToStopCandidate="To" Total_Mete="Total_Mete" Total_Seco="Total_Seco"&lt;/FONT&gt; InvDist="InvDist";
datalines;
46226 1000533 332347 &lt;FONT color="#FF0000"&gt;803&lt;/FONT&gt; 954 7001 7400096 0 &lt;FONT color="#FF0000"&gt;14NOV2016&lt;/FONT&gt; 72 3 2 2016 8 20772.313345 7001 7400250 7400250 &lt;FONT color="#FF0000"&gt;7400250 0 0&lt;/FONT&gt; .
46252 4000359 214519 803 954 7001 7400235 0 17NOV2016 72 3 2 2016 8 20775.322535 7001 7400250 7400250 7400250 0 0 .
46937 834 807857 803 814 8060 7400511 0 25NOV2016 72 3 18 2016 8 20783.673241 8060 . . . . . .
46210 2000693 396089 804 75 25020 7400161 0 14NOV2016 72 27 18 2016 8 20772.680243 25020 7400315 7400315 7400315 0 0 .
46926 709 96746 804 93 25020 7400161 0 17NOV2016 72 27 18 2016 8 20775.353495 25020 7400315 7400315 7400315 0 0 .
46976 1000054 43501 804 8 25020 7400161 0 18NOV2016 72 27 19 2016 8 20776.681493 25020 7400315 7400315 7400315 0 0 .
46459 2000082 80846 804 93 25010 7400315 0 21NOV2016 72 27 19 2016 8 20779.355914 25010 7400002 7400002 7400002 0 0 .
46999 2000482 290220 804 93 25020 7400161 0 22NOV2016 72 27 19 2016 8 20780.352755 25020 7400315 7400315 7400315 0 0 .
46193 1000028 29242 804 775 1030 7400110 0 25NOV2016 72 27 31 2016 8 20783.354167 1030 . . . . . .
46232 3000268 169361 817 2 2050 7401547 0 14NOV2016 72 59 31 2016 8 20772.699931 2050 7400003 7400003 7415745 928.47124344 668.4992945 0.0010770393
46232 3000268 169361 817 2 2050 7401547 0 14NOV2016 72 59 31 2016 8 20772.699931 2050 7400003 7400003 7413039 1330.3410244 957.84552638 0.000751687
46232 3000268 169361 817 2 2050 7401547 0 14NOV2016 72 59 31 2016 8 20772.699931 2050 7400003 7400003 7415816 1257.7971129 905.61392546 0.0007950408&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Line itinerary for (two services of) line 802 (refer to attached excel sheet in original post for context - relevant variables &lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;are&lt;/FONT&gt; Date, PTrouteNo &lt;FONT color="#000000"&gt;and&lt;/FONT&gt; StopCode&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;label &lt;FONT color="#FF0000"&gt;Date="Datum"&lt;/FONT&gt; &lt;FONT color="#FF0000"&gt;PTrouteNo="Linjenummer"&lt;/FONT&gt; Turnummer="Turnummer" StopSequenceNo="Hpl_sekv_nr" StopName="Hallplats" HplGTFS="HplGTFS" &lt;FONT color="#FF0000"&gt;StopCode="HplKodGTFS"&lt;/FONT&gt; Planerad_avgangstid="Planerad_avgangstid" &lt;FONT color="#FF0000"&gt;ActualArrTime="Verklig_ankomsttid"&lt;/FONT&gt; Verklig_avgangst
id="Verklig_avgangstid" Tidshallning_avgang="Tidshallning_avgang" Tidshallning_avgang_kopia="Tidshallning_avgang_kopia" Ank_avvikelse="Ank_avvikelse" Planerad_ankomsttid="Planerad_ankomsttid" Riktn_Norrgaende="Riktn_Norrgaende" ID="ID";
datalines;
&lt;FONT color="#FF0000"&gt;14NOV2016&lt;/FONT&gt; &lt;FONT color="#FF0000"&gt;802&lt;/FONT&gt; 1007 1 Lund C / 3 Lund Centralstation 7400120 4:19:00 . &lt;FONT color="#FF0000"&gt;4:19:00&lt;/FONT&gt; 0:00:00 0:00:00 . 4:19:00 0 0
14NOV2016 802 1007 2 Malmö C / 1b Malmö Centralstation 7400003 4:33:00 4:28:00 4:33:00 0:00:00 0:00:00 . 4:28:00 0 0
14NOV2016 802 1007 3 Malmö Triangeln / 1 Malmö Triangeln station 7401587 4:36:00 4:34:00 4:36:00 0:00:00 0:00:00 . 4:34:00 0 0
14NOV2016 802 1007 4 Malmö Hyllie / 1b Malmö Hyllie station 7401586 4:41:00 4:38:00 4:41:00 0:00:00 0:00:00 . 4:38:00 0 0
14NOV2016 802 1007 5 CPH Airport / 2 Copenhagen Airport 8600858 4:54:00 . . 0:00:00 . . 4:54:00 0 0
14NOV2016 802 1007 6 Tårnby / 1 Tårnby 8600857 4:58:00 . . 0:00:00 . . 4:58:00 0 0
14NOV2016 802 1007 7 Ørestad / 1 Örestad 8600856 5:00:00 . . 0:00:00 . . 5:00:00 0 0
14NOV2016 802 1007 8 København H / 1 Köbenhavn H 8600626 5:12:00 . . 0:00:00 . . 5:12:00 0 0
14NOV2016 802 1007 9 København Nørreport / 1 Nörreport 8600646 5:15:00 . . 0:00:00 . . 5:15:00 0 0
14NOV2016 802 1007 10 København Østerport / 1 Österport 8600650 5:19:00 . . 0:00:00 . . 5:19:00 0 0
14NOV2016 802 1007 11 Hellerup / 1 Hellerup 8600655 5:24:00 . . 0:00:00 . . 5:24:00 0 0
14NOV2016 802 1007 12 Kokkedal / 1 Kokkedal 8600664 5:38:00 . . 0:00:00 . . 5:38:00 0 0
14NOV2016 802 1007 13 Nivå / 1 Nivå 8600665 5:42:00 . . 0:00:00 . . 5:42:00 0 0
14NOV2016 802 1007 14 Humlebæk / 1 Humlebaek 8600666 5:46:00 . . 0:00:00 . . 5:46:00 0 0
14NOV2016 802 1007 15 Espergærde / 1 Espergaerde 8600667 5:50:00 . . 0:00:00 . . 5:50:00 0 0
14NOV2016 802 1007 16 Snekkersten / 1 Snekkersten 8600668 5:54:00 . . 0:00:00 . . 5:54:00 0 0
14NOV2016 802 1007 17 Helsingør station / 1 Helsingör 8600669 5:54:00 . . 0:00:00 . . 5:54:00 0 0
14NOV2016 802 1010 1 CPH Airport / 1 Copenhagen Airport 8600858 5:46:00 . . 0:00:00 . . 5:46:00 1 0
14NOV2016 802 1010 2 Malmö Hyllie / 4b Malmö Hyllie station 7401586 6:08:00 5:59:00 6:08:00 0:00:00 0:00:00 . 5:59:00 1 0
14NOV2016 802 1010 3 Malmö Triangeln / 2 Malmö Triangeln station 7401587 6:11:00 6:10:00 6:12:00 0:01:00 0:01:00 . 6:10:00 1 0
14NOV2016 802 1010 4 Malmö C / 4a Malmö Centralstation 7400003 6:29:00 6:14:00 6:30:00 0:01:00 0:01:00 . 6:14:00 1 0
14NOV2016 802 1010 5 Lund C / 4 Lund Centralstation 7400120 6:41:00 6:38:00 6:41:00 0:00:00 0:00:00 . 6:38:00 1 0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(i'm sorry I have to include such large chunks of data, but otherwise it is hard to get the context!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 22:08:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626017#M184577</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-19T22:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626047#M184584</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/312891"&gt;@ulricius&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason "we" are asking for sample data provided via a working SAS data step: It allows "us" to spend the time solving your problem instead of spending time preparing the data. Soo... could you please post the sample data in the form of a fully working SAS data step? There are still bits missing in what you've posted.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 04:01:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626047#M184584</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-20T04:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626822#M184925</link>
      <description>&lt;P&gt;Dear Patrick,&lt;/P&gt;&lt;P&gt;I have no doubt that you are sincerely trying to help me out, but your reply gives me no hint to what is actually missing in what I have provided to you. As indicated in my profile, I'm a novice at SAS, and I am neither a native English speaker, so please forgive any flaws in what I have provided to you so far. I have a script in MatLab code, though, which does something similar to what I would like SAS to do for me (searching through line itineraries). Do you think it would simplify your efforts to assist me if I provided you with this code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Ulrik&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 08:57:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626822#M184925</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-24T08:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626855#M184939</link>
      <description>What I was looking for was a single example of the relevant source records and what the desired results are.</description>
      <pubDate>Mon, 24 Feb 2020 13:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626855#M184939</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2020-02-24T13:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626885#M184951</link>
      <description>&lt;P&gt;OK, let me provide you with an example (with example data - I reduce the number of columns to the ones relevant to the query): I want to get the exact, or at least the closest stop (or the stop candidate &lt;STRONG&gt;"To"&lt;/STRONG&gt; to target stop ID - "stp_t" - &lt;STRONG&gt;7400003&lt;/STRONG&gt; with the shortest Total_Mete or Total_seco) for the trip made by card id no 666, along line route ("linje") 817, according to the&lt;STRONG&gt; trip table&lt;/STRONG&gt; below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data PossibleTargetStops7400003;&lt;BR /&gt;infile datalines truncover;&lt;BR /&gt;input linje 4. dep_num 4. stp trs_dt DATE9. crd_num:32. time:TIME. stp_t:32. To:32. Total_Mete:32. Total_Seco:32.;&lt;BR /&gt;format trs_dt DDMMYYC10. time TIME.;&lt;BR /&gt;label linje="linje" dep_num="dep_num" stp="stp" trs_dt="trs_dt" crd_num="crd_num" time="time" To="To" Total_Mete="Total_Mete" Total_Seco="Total_Seco";&lt;BR /&gt;datalines;&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7423209 0 0&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7400120 177.94374725 128.11949792&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7416996 182.68941177 131.53637897&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417039 279.36951404 201.14604856&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7416995 371.59214966 267.54635143&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7416547 418.3915942 301.24195019&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417038 432.86920559 311.66582988&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7416595 474.30527436 341.49979002&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7416594 492.87472427 354.8697986&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417297 518.44331708 373.27919083&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417004 541.37789108 389.79206988&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417294 566.7279597 408.04413585&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417104 611.07258177 439.97225975&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7416546 644.50533806 464.04384592&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417293 670.00833066 482.40599831&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417044 684.10199126 492.55343059&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417298 706.62704179 508.77146768&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7416981 872.20038294 627.98426415&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417109 885.47051119 637.53876562&lt;BR /&gt;817 223 7400003 23NOV2016 666 20:10:20 7423209 7417300 912.68055691 657.12999389&lt;BR /&gt;;;;;;;;;;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The possible candidate stops for line route 817 are provided in the column "HplKodGTFS" in the &lt;STRONG&gt;line route itinerary&lt;/STRONG&gt; below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Data Punkt817;&lt;BR /&gt;infile datalines truncover;&lt;BR /&gt;input Datum:DATE9. Linjenummer:32. Hpl_sekv_nr:32. HplKodGTFS:32. Verklig_avgangstid:TIME8. Verklig_ankomsttid:TIME8. Riktn_Norrgaende:32. ID:32.; &lt;BR /&gt;format Datum DDMMYYC10. Verklig_avgangstid TIME. Verklig_ankomsttid TIME.;&lt;BR /&gt;datalines;&lt;BR /&gt;14NOV2016 817 1 7400088 5:09:00 . 1 0&lt;BR /&gt;14NOV2016 817 2 7401614 5:19:00 5:17:00 1 0&lt;BR /&gt;14NOV2016 817 3 7401615 . . 1 0&lt;BR /&gt;14NOV2016 817 4 7401546 5:32:00 5:31:00 1 0&lt;BR /&gt;14NOV2016 817 5 7401586 5:36:00 5:34:00 1 0&lt;BR /&gt;14NOV2016 817 6 7401587 5:40:00 5:38:00 1 0&lt;BR /&gt;14NOV2016 817 7 7400003 5:44:00 5:41:00 1 0&lt;BR /&gt;14NOV2016 817 8 7400120 5:56:00 5:55:00 1 0&lt;BR /&gt;14NOV2016 817 9 7400941 6:00:00 5:58:00 1 0&lt;BR /&gt;14NOV2016 817 10 7400945 6:05:00 6:03:00 1 0&lt;BR /&gt;14NOV2016 817 11 7400939 6:09:00 6:08:00 1 0&lt;BR /&gt;14NOV2016 817 12 7401547 6:14:00 6:13:00 1 0&lt;BR /&gt;14NOV2016 817 13 7401554 6:20:00 6:17:00 1 0&lt;BR /&gt;14NOV2016 817 14 7401558 6:24:00 6:23:00 1 0&lt;BR /&gt;14NOV2016 817 15 7401557 6:28:00 6:26:00 1 0&lt;BR /&gt;14NOV2016 817 16 7401270 6:33:00 6:31:00 1 0&lt;BR /&gt;14NOV2016 817 17 7400044 . 6:37:00 1 0&lt;BR /&gt;;;;;;;;;;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;So, I would like the code to flag the stop ID &lt;STRONG&gt;7400120 (identified in Table #2 for line route no 817, see second line in Table #3 below) in the "To" column&lt;/STRONG&gt; because it is the "HplKodGTFS" stop of Table #2 with the shortest distance (Total_mete) (by foot) to "stp_t" stop &lt;STRONG&gt;#7423209&lt;/STRONG&gt; according to the &lt;STRONG&gt;Table #1&lt;/STRONG&gt; above (whereas "stp_t" stop 7423209 itself is not found in Table #2).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result table should include the closest (i e minimum of Total_mete or Total_seco) matching "To" stop ID along with the column values Total_mete, Total_seco from the trip table and ActualArrivalTime ("Verklig_ankomsttid") from the line route itinerary table for this stop ID. The latter in order to be able to calculate travel times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this is what I'm after:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data want;&lt;BR /&gt;infile datalines delimiter='09'x truncover;&lt;BR /&gt;input linje:32. stp:32. trs_dt:DATE9. time:TIME. crd_num:3. stp_t:32. To:32. Total_Mete:32. Total_Seco:32. FlagForClosestStopCandidate:2.;&lt;BR /&gt;format trs_dt DDMMYYC10. time TIME.;&lt;BR /&gt;datalines;&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7423209 0 0 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7400120 177.94374725 128.11949792 1&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7416996 182.68941177 131.53637897 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417039 279.36951404 201.14604856 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7416995 371.59214966 267.54635143 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7416547 418.3915942 301.24195019 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417038 432.86920559 311.66582988 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7416595 474.30527436 341.49979002 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7416594 492.87472427 354.8697986 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417297 518.44331708 373.27919083 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417004 541.37789108 389.79206988 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417294 566.7279597 408.04413585 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417104 611.07258177 439.97225975 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7416546 644.50533806 464.04384592 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417293 670.00833066 482.40599831 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417044 684.10199126 492.55343059 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417298 706.62704179 508.77146768 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7416981 872.20038294 627.98426415 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417109 885.47051119 637.53876562 0&lt;BR /&gt;817 7400003 23nov16 20:10:20 666 7423209 7417300 912.68055691 657.12999389 0&lt;BR /&gt;;;;;;;;;;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;Is there enough material now for you to help me with the coding?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 20:21:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/626885#M184951</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-27T20:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627422#M185218</link>
      <description>&lt;P&gt;Now that I have updated the latest post with records that should enable you to follow my line of thought, but still no reply from you, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144199"&gt;@tomrvincent&lt;/a&gt;, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; - is there still something missing or is the description still simply too messy? I would appreciate any feedback to my latest post!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 07:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627422#M185218</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-26T07:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627431#M185226</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/312891"&gt;@ulricius&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Now that I have updated the latest post with records that should enable you to follow my line of thought, but still no reply from you, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144199"&gt;@tomrvincent&lt;/a&gt;, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; - is there still something missing or is the description still simply too messy? I would appreciate any feedback to my latest post!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The reason for absence of replies could be that you still don't post working data steps. Hint: a data step begins with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datasetname;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 08:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627431#M185226</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-02-26T08:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627443#M185237</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OK, so now I have added dataset code to the datalines, by editing message #9 above. Is this enough or is there still missing pieces of information you need? Please forgive me for coding errors - as I mentioned, I am a novice to SAS (and I am not a particularly experienced programmer either).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Ulrik&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 09:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627443#M185237</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-26T09:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627460#M185248</link>
      <description>&lt;P&gt;Have you actually executed the data steps you have posted? The don't seem to be error-free.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 12:28:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627460#M185248</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-02-26T12:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627461#M185249</link>
      <description>&lt;P&gt;I'm sorry, but I seem to be lost in translation here.&lt;/P&gt;&lt;P&gt;1. I'm not sure what the purpose of the datastep code is. What is the desired result? I have run code in order to produce the sample datasets, whose datalines I have copied from the log file and pasted into this conversation (as I was tipped off in the thread suggesting code that produce datalines from data files, &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;) - both for input and desired output data. How should I have done it differently to enable you to help me? Please, be specific and explain in detail (coding examples, please)!&lt;/P&gt;&lt;P&gt;2. I am not sure how this code should be formulated. I have looked at similar conversations in this forum, and they present the issues in a similar fashion to how I have done it. Is my issue different in any way, motivating a different data/problem description? In that case, please be specific in how I should formulate the problem, since I find few similar questions/conversations in this forum to learn from!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your patience!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 12:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627461#M185249</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-26T12:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627493#M185265</link>
      <description>Seven hours ago I was fast asleep.&lt;BR /&gt;&lt;BR /&gt;Just to make sure, you have the following problem:&lt;BR /&gt;1. Origin point and departure date/time.&lt;BR /&gt;2. Destination point.&lt;BR /&gt;3. A schedule table of boarding and target stops with dates and times.&lt;BR /&gt;&lt;BR /&gt;And so you want to find the fastest route between Origin and Destination points...regardless of how many stops there are between?&lt;BR /&gt;&lt;BR /&gt;If this is the case, I'd suggest you provide an example from your data.  &lt;BR /&gt;&lt;BR /&gt;Show us the origin record and the trip records you or someone has manually determined to be the optimal route (assuming this is a process that currently exists at all).&lt;BR /&gt;&lt;BR /&gt;You'll have to do QA on your logic at some point in time, otherwise you won't be able to prove to anybody that your coding is successful, right?</description>
      <pubDate>Wed, 26 Feb 2020 14:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627493#M185265</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2020-02-26T14:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627794#M185402</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/312891"&gt;@ulricius&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm sorry, but I seem to be lost in translation here.&lt;/P&gt;
&lt;P&gt;1. I'm not sure what the purpose of the datastep code is. What is the desired result? I have run code in order to produce the sample datasets, whose datalines I have copied from the log file and pasted into this conversation (as I was tipped off in the thread suggesting code that produce datalines from data files, &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;) - both for input and desired output data. How should I have done it differently to enable you to help me? Please, be specific and explain in detail (coding examples, please)!&lt;/P&gt;
&lt;P&gt;2. I am not sure how this code should be formulated. I have looked at similar conversations in this forum, and they present the issues in a similar fashion to how I have done it. Is my issue different in any way, motivating a different data/problem description? In that case, please be specific in how I should formulate the problem, since I find few similar questions/conversations in this forum to learn from!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your patience!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"&lt;EM&gt;1. I'm not sure what the purpose of the datastep code is.&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;To provide us with sample source data so we have something to work with and can actually test the code we then post as a solution to your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;What is the desired result?&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;Instead of only describing in words what you want to do with the data you also provide us with the actual data or report which you want as a result of the logic to be implemented. And it should be the data/report which uses the sample source data.&lt;/P&gt;
&lt;P&gt;Posting such data/reports helps a lot in clarifying what you describe and it also allows us to test the code we propose (=it needs to create the data/report you post as desired result).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;2. I am not sure how this code should be formulated.&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;The way you've posted it now is perfect BUT you should also test the code you post. What you've posted doesn't fully work so we would now first have to spend time fixing your stuff instead of dealing with the actual question.&amp;nbsp; ...and that's where I often loose motivation to spend any further time.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 07:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627794#M185402</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-27T07:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627805#M185408</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good that you checked the problem formulation - forces me to improve the structuring of the problem!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is not a simple "travelling salesman" problem, the fastest route between two points, but rather the closest match, to a target stop, along a PT route. Thus, the first table of Message #9, which consists of only one card transaction, contains, in column #8, possible (candidate) stops based on network _walk_ distances to stops surrounding to stop in the 7th column (#7400003), which is the boarding stop of the _subsequent_ (next in time) PT trip (i e subsequent card transaction in the ticketing data). Note that all the rows in ths sample of the first table have the same values of column1-6 and thus belong to the same card transaction, with the boarding of the subsequent trip appended to it. (The boarding stop of the transaction itself is thus 7401547 - column #3).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What about the second table then? Well, it contains the trip itinerary of line route 817, in this case identified by the line route ID of the first column in table #1, and looked up in the trip itinerary database based on column #2 (table #2 of message #9). Now, the script should loop through the stops of column #8 of table #1 and compare them to the stops of column #4 in Table #2 and indicate the stop (in column #8 in Table #1) with the smallest value of either column #9 OR column #10 in Table #1. This should result in a '1' in column #10 of Table #3, which is just a reformulation of Table #1, plus the "flag" column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As to what is missing in the code of the datasteps i provided in message #9, I am still lost in oblivion...&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 08:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627805#M185408</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-27T08:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627813#M185413</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;As to what is missing in the code of the datasteps i provided in message #9, I am still lost in oblivion...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For datastep&amp;nbsp; &lt;EM&gt;data data.PossibleTargetStops7400003;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;1.&lt;EM&gt;datalines1;&amp;nbsp;&lt;/EM&gt; is invalid syntax. It's either &lt;EM&gt;datalines&lt;/EM&gt; or &lt;EM&gt;datalines4&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;2. column&amp;nbsp;&lt;EM&gt;trs_d&lt;/EM&gt;t is always missing due to missing informat.&lt;/P&gt;
&lt;P&gt;3. you mention in the narrative&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;card id no 10643&lt;/EM&gt; but I can't find such a column or value in the data you've posted.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4. is column &lt;EM&gt;Time&lt;/EM&gt; of any relevance? And if yes what does a value of&amp;nbsp;&lt;EM&gt;20772.69993&lt;/EM&gt;1 mean? Are these seconds?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 08:53:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627813#M185413</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-27T08:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627815#M185414</link>
      <description>&lt;P&gt;Thanks, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;, for some concrete comments, finally! Il be back shortly with corrections, in message #9! /Ulrik&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 08:51:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627815#M185414</guid>
      <dc:creator>ulricius</dc:creator>
      <dc:date>2020-02-27T08:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging closest match per row by referencing data from external table?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627816#M185415</link>
      <description>&lt;P&gt;Sorry to be such a pain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I know from own experience how hard it can be to ask a question if the problem is not trivial. I've also made the experience that it really helped me to get to the solution by being forced to reduce the problem to its core.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Try to provide as little data (rows and columns) as you can - but these as representative as possible.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also try in your narrative to be as short and precise as you can be. And provide examples illustrating what you describe (as you've done already).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 08:54:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-closest-match-per-row-by-referencing-data-from-external/m-p/627816#M185415</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-27T08:54:15Z</dc:date>
    </item>
  </channel>
</rss>

