Thanks for your reply Justin
As it happens, I JUST found out, the user is no longer wanting this information

Alan Shore
Solutions Architect
IT Supply Chain Execution

[cid:image001.png@01D908B8.A61E7980]

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

From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Justin Taylor
Sent: Monday, December 5, 2022 2:21 PM
To: MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Re: Web service call to determine distance between 2 zip codes

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

request = '
https://maps.googleapis.com/maps/api/distancematrix/json?<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<mailto: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<mailto:ASHORE@xxxxxxxxxxxxxxxxxxxx>

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


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l<https://lists.midrange.com/mailman/listinfo/midrange-l>
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l<https://archive.midrange.com/midrange-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com<https://amazon.midrange.com>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.