× 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.



You could create a REST API to call from COBOL that would call HTTPAPI or
GETURI. :)

(sorry, just listened to the latest incredible i podcast).

On Thu, Feb 10, 2022 at 10:33 AM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

The biggest problem with using any RPG oriented Service program routines
(such as HTTPAPI) is that COBOL does not have an equivalent to prototyping.
Many library functions make extensive use of those to manipulate the data
before calling the routine. So from COBOL you have to manually null
terminate strings and explicitly pass a pointer whereas in RPG you can take
advantage of Options(*String) to do all the work for you. Similarly if the
function takes a varchar you have to build the string (unless COBOL have
added varchar support and I missed it).

It can all be done but it can be painful.

If it is known in advance that COBOL _and_ RPG will be calling the
routines you can adjust the interface to make the COBOL calls simpler - but
using anything designed initially for RPG use can be time consuming to
convert,

I've done it many times so if anyone ever needs help in that area let me
know.


Jon P.

On Feb 9, 2022, at 6:34 PM, Roger Harman <roger.harman@xxxxxxxxxxx>
wrote:

This was my first thought as well - just use them from your COBOL
programs.
ILE modules should be relatively language agnostic, correct?
I can see possible concerns with matching data types but wouldn't that
be about all?

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power



-----Original Message-----
< snip >
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of John
Yeung
Sent: Wednesday, February 9, 2022 1:11 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: [EXTERNAL] Re: SQL RPG and Web API Consumption

On Wed, Feb 9, 2022 at 12:47 PM Kelly Cookson via RPG400-L
<rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

We are a COBOL shop. I'm not sure HTTPAPI and YAJL will work for COBOL.

This is an interesting question to me. As COBOL has an ILE compiler,
it should in principle be possible to link in ILE modules written in
other languages. But I don't know whether that interface is "exposed"
in the implementation of COBOL, whereas it clearly is in RPG and C.
< /snip >
--
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

--
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.

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.