I am looking at the program and am not sure where to put it. I have dried a few places but did not work. Any ideas on where to put it?
I assume it is on this statement
exec sql select * into :latitude, :longitude
from json_table(systools.httpgetclob(:URL, ''),
'lax $.result.addressMatches[*]'
columns(
Latitude varchar(15) path '$.coordinates.y',
Longitude varchar(15) path '$.coordinates.x')
empty on error);
I have done it on sql scripts before. Usually in the select area like this.
SELECT ENTRY_TIMESTAMP,
JOB_NUMBER CONCAT '/' CONCAT RTRIM(JOB_USER) CONCAT '/' CONCAT RTRIM(JOB_NAME) AS JOB_NAME,
REMOTE_ADDRESS,
rtrim(cast(cast(substring(entry_data,2,10) as VARCHAR(10) for bit data) as varchar(10) ccsid 37)) as User_Name
FROM TABLE(qsys2.display_journal(
'QSYS', 'QAUDJRN', -- Journal library and name
STARTING_RECEIVER_NAME => '*CURAVLCHN',
journal_entry_types => 'PW', -- Journal entry types
starting_timestamp => CURRENT TIMESTAMP - 48 HOURS)) -- Time period
P#
Kerwin
IBMi Systems/Applications Programmer
-----Original Message-----
From: Kevin Bucknum [mailto:Kevin@xxxxxxxxxxxxxxxxxxx]
Sent: Monday, March 2, 2020 3:30 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Cc: Kerwin Crawford <kcrawford@xxxxxxxxxxx>
Subject: Re: challenging tasks? Got one to discuss?
If your CCSID is 65535 then yes, that would cause it to error out.
On Mon, 2020-03-02 at 21:07 +0000, Kerwin Crawford via RPG400-L wrote:
Booth, I have found some of your stuff interesting.
I just looked at this and thought, I need to try it.
I copied the two SQLRPGLE programs and the DSPF to my system. They compiled without issue. I think that is a first.
I get these results.
Location Response
Street 2800 37th St NW Trial 1 failed: SQL code -332
City Rochester Trial 2 failed: SQL code -332
State MN Trial 3 failed: SQL code -332
ZIP 55901
I looked up -332 and it said "Character conversion is not defined." I am not sure what conversion it is refering to.
Do I need to set up my CCID or something?
P#
Kerwin
IBMi Systems/Applications Programmer
-----Original Message-----
From: Booth Martin [mailto:
<mailto:booth@xxxxxxxxxxxx>
booth@xxxxxxxxxxxx
]
Sent: Monday, March 2, 2020 2:16 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <
<mailto:rpg400-l@xxxxxxxxxxxxxxxxxx>
rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: challenging tasks? Got one to discuss?
A few days ago Jeff came up with a challenging task - not an everyday need, cool if we could do it, and yet very common in the non-i World. Plenty of discussion here, which is always good, right?
It looked like fun, here is my answer:
<
http://www.martinvt.com/Web_-__json/Latitude_-_Longitude/latitude_-_longitude.html>
http://www.martinvt.com/Web_-__json/Latitude_-_Longitude/latitude_-_longitude.html
Location Response
Street 2800 37th St NW Latitude is 43.96728
City Rochester Longitude is -92.411514
State MN Trial 1 failed: SQL code 100
ZIP 55901 Trial 2 failed: SQL code 100
Which brings us to the point of this post: Anymore RPG challenges where a bit of lively discussion raises skill levels for many of us? A nagging project that needs attention but it's not clear where and/or how to start? Why not put it out here for us to look at?
(disclaimer: yes, this is a blatant appeal for a challenging task; it keeps me out of the beer halls and back alleys. :) I'm not looking for money or responsibility, just something to bat away the boredom.
--
Booth Martin
<
http://www.martinvt.com>
www.martinvt.com
(870)576-9371
(802)461-5349
Beauty and harmony are as necessary to you as the very breath of life.
[
https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
As an Amazon Associate we earn from qualifying purchases.