|
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf OfAlan
ShoreSystems
Sent: Friday, August 3, 2018 10:47 AM
To: RPG programming on the IBM i (AS/400 and iSeries); Midrange
Technical DiscussionZIP?
Subject: RE: [EXTERNAL] Web service example to retrieve city/state by
it be is
Thanks for your reply Kevin
As to why our system is still on 65535 - I have no answer What should
my responseopened or
Anyway - I ran the command
chgjob ccsid(37)
Went into STRSQL
And ran the SQl
SELECT *
FROM
json_table(SYSTOOLS.HTTPGETCLOB('http://api.zippopotam.us/us/60010'
,''),
'$' columns("post code" VARCHAR(10) , nested
'$.places[*]'
columns("place name" VARCHAR(30), "state"
VARCHAR(15),
"state abbreviation" VARCHAR(2))))
x
and it failed again
Query cannot be run. See lower level messages.
I F1 on that message
Message ID . . . . . . : QRY2293 Severity . . . . . . . : 30
Message type . . . . . : Information
Message . . . . : Query cannot be run. See lower level messages.
Cause . . . . . : An error occurred when the query to be run was
while output was being created. Either a cancel reply was receivedto an
inquiry message about the problem, or the request was ended abruptlythat is
without
use of an inquiry message. In most cases the problem involves data
not correct or data that is not being used correctly.or use
Recovery . . . : To determine the cause of the problem, press F10
the Display Job Log (DSPJOBLOG) command to view the messages thatwere
logged immediately before this message. (If you are in a Work WithQueries
session, the diagnostic information will not be left in the jobqueue unless
you cancel the session when you return to the display on which youare
working.) Inspect any partially completed printer output beforediscarding
it. Correct the problem, then repeat your request.Bottom
30
I then F10 and see the following
4>> strsql
Current connection is to relational database NBTYS20.
Query options retrieved file QAQQINI in library QUSRSYS.
Query options retrieved file QAQQINI in library QUSRSYS.
Query options retrieved file QAQQINI in library QUSRSYS.
The query access plan has been rebuilt.
Query options retrieved file QAQQINI in library QUSRSYS.
**** Starting optimizer debug message for query .
Query options retrieved file QAQQINI in library QUSRSYS.
Query options retrieved file QAQQINI in library QUSRSYS.
The query access plan has been rebuilt.
Arrival sequence access was used for file *FUNCTION.
The query access plan has been rebuilt.
**** Ending debug message for query .
ODP created.
Blocking used for query.
Java Virtual Machine is IBM Technology for Java. PID(1203082)
JVM properties were loaded from a properties file.
User-defined function error on member QSQPTABL.
? C
Cancel reply received for message CPF503E.
When I F1 on the message
User-defined function error on member QSQPTABL.
The following is displayed
Additional Message Information
Message ID . . . . . . : CPF503E Severity . . . . . . . :
Message type . . . . . : Notify11:39:22
Date sent . . . . . . : 08/03/18 Time sent . . . . . . :
function
Message . . . . : User-defined function error on member QSQPTABL.
Cause . . . . . : An error occurred while invoking user-defined
HTTPGETCLOB in library SYSTOOLS. The error occurred while invokingthe
associated external program or service program B2RESTUDF: inlibrary
SYSTOOLS.D, program entry point or external nameThe
com.ibm.db2.rest.DB2UDFWrapper.httpGetClob, specific name
HTTPG00005. The
error occurred on member QSQPTABL file QSQPTABL in library QSYS2.
error38000.
code is 1. The error codes and their meanings follow:
1 -- The external program or service program returned SQLSTATE
TheMore...
text message returned from the program is:
SYSTOOLS.HTTPGETCLOBHTTPG00005java.net.SocketException:Unexpected
end
Reply . . . : CZIP?
Press Enter to continue.
Looking at what SQLSTATE 38000. Means
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Kevin Bucknum
Sent: Friday, August 03, 2018 11:38 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-
l@xxxxxxxxxxxx>; Midrange Systems Technical Discussion <midrange-
l@xxxxxxxxxxxx>
Subject: RE: [EXTERNAL] Web service example to retrieve city/state by
chgjob
That's it then. None of the http functions will run in 65535. You can
ccsid(37) before you strsql and it should run. Is there any reason whyyour
system is still on 65535?by
Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf OfAlan
ShoreSystems
Sent: Friday, August 3, 2018 10:28 AM
To: RPG programming on the IBM i (AS/400 and iSeries); Midrange
Technical Discussion
Subject: RE: [EXTERNAL] Web service example to retrieve city/state
ZIP?by
System ccsid - 65535
As far as the job is concerned
Coded character set identifier . . . . . . . . . : 65535
Default coded character set identifier . . . . . : 37
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Kevin Bucknum
Sent: Friday, August 03, 2018 11:23 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-
l@xxxxxxxxxxxx>; Midrange Systems Technical Discussion <midrange-
l@xxxxxxxxxxxx>
Subject: RE: [EXTERNAL] Web service example to retrieve city/state
ZIP?57017
by
What is your jobs and systems ccsid?
Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf OfAlan
ShoreSystems
Sent: Friday, August 3, 2018 10:13 AM
To: RPG programming on the IBM i (AS/400 and iSeries); Midrange
Technical Discussion
Subject: RE: [EXTERNAL] Web service example to retrieve city/state
ZIP?json_table(SYSTOOLS.HTTPGETCLOB('http://api.zippopotam.us/us/60010'
Thanks Kevin
I cut and pasted
SELECT *
FROM
,''),'$.places[*]'
'$' columns("post code" VARCHAR(10) , nested
columns("place name" VARCHAR(30), "state"
VARCHAR(15),
"state abbreviation" VARCHAR(2))))
X
Into STRSQL session and it failed with the following SQLSTATE
QSQPTABL.30
Additional Message Information
Message ID . . . . . . : CPF503E Severity . . . . . . . :
Message type . . . . . : Diagnostic11:07:15
Date sent . . . . . . : 08/03/18 Time sent . . . . . . :
Message . . . . : User-defined function error on member
QSYS2.invokingCause . . . . . : An error occurred while invoking user-definedfunction
HTTPGETCLOB in library SYSTOOLS. The error occurred while
the
associated external program or service program B2RESTUDF: inlibrary
SYSTOOLS.D, program entry point or external name
com.ibm.db2.rest.DB2UDFWrapper.httpGetClob, specific name
HTTPG00005. The
error occurred on member QSQPTABL file QSQPTABL in library
SQLSTATEThe
error
code is 1. The error codes and their meanings follow:
1 -- The external program or service program returned
return.57017.
The
text message returned from the program is: ^ .
2 -- The external program failed before it completed.
3 -- The database timed out waiting for the program to
city/stateThe timeoutby
More...
Press Enter to continue.
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Kevin Bucknum
Sent: Friday, August 03, 2018 11:01 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-
l@xxxxxxxxxxxx>; Midrange Systems Technical Discussion <midrange-
l@xxxxxxxxxxxx>
Subject: RE: [EXTERNAL] Web service example to retrieve city/state
ZIP?json_table(SYSTOOLS.HTTPGETCLOB('http://api.zippopotam.us/us/60010'
,'')))
SELECT json
FROM
(VALUES(SYSTOOLS.HTTPGETCLOB('http://api.zippopotam.us/us/60010'
x(json);
That returns data, but only for the primary.
A cleaned up version of that is
SELECT *
FROM
Of,''),'$.places[*]'
'$' columns("post code" VARCHAR(10) , nested
columns("place name" VARCHAR(30), "state"
VARCHAR(15),
"state abbreviation" VARCHAR(2))))
x
Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf
Alan
ShoreSystems
Sent: Friday, August 3, 2018 9:10 AM
To: RPG programming on the IBM i (AS/400 and iSeries); Midrange
Technical Discussion
Subject: RE: [EXTERNAL] Web service example to retrieve
ofby
ZIP?
Im looking for something similar Does anyone have a web service
example of retrieving the plus 4
aFor
zip
code, given the address and zip code
Mark - be careful - as some zip codes can have multiple cities
byOfexample,
600100 has 17
ZTZIP ZTCITY
60010 BARRINGTON
60010 BARRINGTON HILLS
60010 DEER PARK
60010 FOX RIVER GROVE
60010 FOX RIVER VALLEY GARDENS
60010 FOX RV VLY GN
60010 HOFFMAN EST
60010 HOFFMAN ESTATES
60010 INVERNESS
60010 KILDEER
60010 LAKE BARRINGTON
60010 NORTH BARRINGTON
60010 PORT BARRINGTON
60010 PT BARRINGTON
60010 SOUTH BARRINGTON
60010 SUTTON
60010 TOWER LAKES
Some are just different ways of spelling
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf
<midrange-l@xxxxxxxxxxxx>mlazarus
Sent: Friday, August 03, 2018 10:03 AM
To: Midrange Systems Technical Discussion
Cc: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-
l@xxxxxxxxxxxx>
Subject: [EXTERNAL] Web service example to retrieve city/state
RPGZIP?city/state
Does anyone have a web service example of retrieving a
by
passing the ZIP code (or country and ZIP code)? Preferably in
taketakeand/or
SQL. TIA.(RPG400-L)
-mark
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx Tosubscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please
atake
affiliatemoment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
link: http://amzn.to/2dEadiD(RPG400-L)
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx Tosubscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please
a
affiliatemoment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
(RPG400-L)link: http://amzn.to/2dEadiD--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx Tosubscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please
atake
affiliatemoment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
link: http://amzn.to/2dEadiD(RPG400-L)
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx Tosubscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please
aa
affiliatemoment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
(RPG400-L)link: http://amzn.to/2dEadiD--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx Tosubscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take
affiliatemoment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
alink: http://amzn.to/2dEadiD(RPG400-L)
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx Tosubscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take
affiliatemoment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
(RPG400-L)link: http://amzn.to/2dEadiD--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx Tosubscribe,
unsubscribe, or change list options,(RPG400-L)
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx Tosubscribe,
unsubscribe, or change list options,--
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
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.