× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I use Google Maps API for mileage. The call is simple in RPGLE, using
https://www.scottklement.com/httpapi/.

request = '
https://maps.googleapis.com/maps/api/distancematrix/json?'
+ 'origins=' + originCity + '+' + originState + '+' +
originZip
+ '&destinations=' + destinationCity + '+' +
destinationState + '+' + destinationZip
+ '&key=' + googleAPI
+ '&units=imperial&';
response = '/tmp/googleDistance' + randomFileName(20) + '.json'
;

rc = http_url_get(request :response);


HTH


date: Fri, 2 Dec 2022 13:11:56 +0000
from: Alan Shore via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: Web service call to determine distance between 2 zip codes

Hi everyone
We are on V7r3
I have been given a task to extract data concerning packages that have
shipped
Part of that data is to determine the distance between the origin zip code
and the destination zip code
Does anyone have code (and is willing to share it) for a web service call
to obtain this information?
As always - all answers gratefully accepted

Alan Shore
Solutions Architect
IT Supply Chain Execution

[cid:image001.png@01D90625.BD2AB6B0]

60 Orville Drive
Bohemia, NY 11716
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
E-mail : ASHORE@xxxxxxxxxxxxxxxxxxxx

'If you're going through hell, keep going.'
Winston Churchill



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.