Why do you think you need RPG.
With SQL you can access web-services, you can generate and conume/decompose
XML and JSON, what is returned by a webservice.
Embedding SQL in RPG and Cobol is almost the same.
The only difference is an embedded SQL statement in Cobol ends with a period
in RPG it ends with a semi colon.
And the other difference is how to define your (host) variables.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Kelly
Cookson via RPG400-L
Sent: Mittwoch, 9. Februar 2022 15:51
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Cc: Kelly Cookson <KCookson@xxxxxxxxxxxx>
Subject: SQL RPG and Web API Consumption
Hi,
I am an IBMi COBOL developer (which is the standard language for my shop). I
am thinking about learning RPG for use with web/REST/HTTP APIs.
I would like to ask if something is even possible. I am hoping someone has
already done this and can tell me it is possible. Or have someone tell me it
will not work and not to waste my time trying.
Is it possible to have a SQL RPG program:
1. Use the new QSYS2 HTTP functions to consume a web API.
2. Use Scott Klement's YAJL library to parse the JSON returned by the web
API.
Thanks,
Kelly Cookson
Senior Software Engineer II
Dot Foods, Inc.
1-217-773-4486 ext. 12676
www.dotfoods.com<
http://www.dotfoods.com>
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.