|
Scott,point
Thank you for your help. After reading your e-mail I've decided to go
with webservices, it seems the simplest way to go. Can you please
me to some articles.
Thank you again.
Isa
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: October 06, 2009 2:55 PM
To: RPG programming on the IBM i / System i
Subject: Re: Calling dll/exe program from AS400
Hello Isa,
How do you call a dll on the IFS From an AS/400 passing it various
Parameters and then wait until a return value is received?
You can't run a DLL or EXE under IBM i (aka OS/400). They are Windows
programs that can only run on Windows.network.
With appropriate set-up, you can call a Windows program over a
However, unlike i, when Windows passes a parameter to a program, it'sreturn
input-only. You can't use a Windows parameter (to a program) to
data back to the caller. That's a limitation of the way Windows (andutility
DOS, and Unix) work.
A better solution is a web service. Put a web service on the Windows
box that calls the EXE/DLL and gets the output, etc. These are the
modern way to do this type of work.
An older approach is to use a remote call mechanism. These work, but
they make error handling much more difficult, and the call mechanism
isn't standardized, so you pretty much have to write custom code for
each command you want to call. That might not matter in your case,
since you probably have only one thing to call...
IBM i Access (aka iSeries Access or Client Access) comes with a
for Windows called "Incoming Remote Command". If you configure thatand
set it up, you can use it to serve out remote program calls over aresponse
network.
From the IBM i, you'd either use RUNRMTCMD (which outputs it's
rexec
to a spooled file -- maybe not optimal) or the rexec() API, or the
isn't
QShell command. All three of these use the same underlying network
protocol to connect to the Windows box and run a remote command.
This method is, however, fraught with security problems. If you
configure Windows to not expect a password, then ANYONE can issue a
remote command against your PC without any sort of password, which
hard-coding
good. If Windows requires a password, then you often end up
protected
the password into the calling program, so anyone who gets your source
code or program object can get your password. Plus, the password is
sent over the network in clear text, so anyone with a network sniffer
can see your password. Not good for security except in
highly-controlled environments.
Finally, there's SSH, which has a remote call mechanism that's
nicely by encryption and digital keys that replace passwords. A much
better (but more complicated) scenario. I've never used an SSH server
on Windows, so I don't know how well it works in that scenario. Works
nicely on FreeBSD and Linux, though :)web
So, you can see, there are a lot of choices with pros and cons. The
made
service is definitely the way to go if it's available, as it can be
secure, and solves all of the problems of the other mechanisms.
If you need more info on any of these options, let me know, and I'll
point you to articles.
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.