Can RPG call a VB script

360 pts.
Tags:
AS/400 Parameters
RPG
VBScript
I know very little about anything on a PC. Is there some kind of interface that could be used to execute a VB script which performs a function which returns a parm and get that parm returned back to the RPG pgm.

Software/Hardware used:
AS/400 Windows

Answer Wiki

Thanks. We'll let you know when a new response is added.

There are almost always facilities available for cross-platform (remote) program calls. The calls are usually easier to set up and execute than the setup of the security configurations that are needed.

When a system allows external program calls, you should ensure that authentication and authorization is satisfied. You usually can’t risk allowing a system simply to run any remote command that comes into it.

The calls themselves can be the easy parts. But…

Commonly, the next problem to solve is to “get that parm returned back to the RPG pgm”. That usually requires some kind of structured environment like a stored procedure. Return parms need format definitions that are available on both sides. Related to this for your situation are ASCII/EBCDIC and details like big-/little-endian values.

Perhaps the best solution is to go with sockets. Java sockets make it fairly easy to make calls from RPG, but calling VBA from Java can be tricky. VBA isn’t quite as ‘open’ as it could be. So, maybe seek out one of the general tutorials on { VBA sockets programming } with Google.

Technically, RPG could use rexec() or even RUNRMTCMD to invoke a VBA process. There wouldn’t be a “parm” that could be returned, but with RUNRMTCMD at least the standard output from the called process is returned as a spooled file. RPG could always parse the value out. VBA could generate the output. I don’t know if any method is simpler.

In short, there are a variety of methods. Most of them require knowing the technology before expecting success. It won’t be easy unless you already have an environment that provides the framework such as database stored procedures.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following