How to call BSFN from the AS/400

twolliston

Member
Hey fellow Oneworld developers,

I'm having trouble calling a business function from a RPG or CL
program running on the AS/400. The BSFN will be running on a Unix box or it may run on a Microsoft server.

anyone willing to take a stab at this?
 
What kind of "trouble" are you having? Are you using the "RUNUBE" command from a CL that calls a BSFN? Or, are you attempting to call a BSFN directly from RPG or CL?
 
I'd use Interoperability to do this Tim

It sounds like you have an application on one platform (AS/400) that needs to send information to OneWorld on another platform (NT/Unix) - have that information processed, and optionally have the results returned.

To do this, I would investigate the use of xmlCallObject (also called "Thinnet") on the OneWorld machine. I'd use a middleware application such as XPi or, preferably, MQ Series, to manage the transaction between the two servers. All of this is documented in the Interoperability Guide - available on the Knowledge Garden.

There are probably shortcuts, possible using API's to directly pass the information into OneWorld - but they would be extremely unstable. By using a message-based middleware, you'd have far more control with regards to failed messages etc.

Alternatively, if this is a simple "fire and forget" you can have the information pass directly xmlCallObkect as a formatted XML document without the need for the middleware...
 
yes I trying to call a business function from RPG or CL
passing the BSFN parms......

Have you done this before?
 
Hi there
Am I right in thinking you have managed to establish a OneWorld session using external procedure calls in ILE RPG? I tried this out myself, but couldn't get beyond the user handle (I forget exactly how far I got, to be honest). I know that without this, you can't use the business functions. The problem I found is that you need to define the exact data types for the RPG prototypes (integer, unsigned integer etc.) that are defined automatically in C by just including the right files. How far did you get?

Interoperability is still probably the way to go, but I'd be interested if anyone has found a way to do it in RPG.

Regards,
Ian
 
Hi,

I did this once before. However I had to write an interface in C that was simple minded that took simple (ILE RPG) parameters then created the 3 parameters a JDE business function needs namely lpBhvrCom, lpVoid and your lpDS. This was a not trivial excercise.

The interface also had a mode that allowed the caller to "log-in" to OneWorld and naturally this needed to be called first.

I think if I had to write it again in 2004 I would look at the XML interfaces to OneWorld.

Regards
Mike
 
Back
Top