Discussion:
Calling an RPG program from the PC desktop using an icon
(too old to reply)
k***@gmail.com
2006-02-28 19:42:49 UTC
Permalink
Hi, all! Me again! Here's my question:

Is it possible to create an icon on my PC desktop (the PC has Client
Access/iSeries Access installed) that will call an RPG program on the
AS/400 when I double-click the icon? I know that a PC program can be
executed on a PC by using RMTCMD, but is there a method to do this the
other way around? I am not expecting any parameters back from the
called RPG program nor am I passing any parameters to the RPG program.
Basically, I just want the RPG program to execute when the icon is
double-clicked.

I initially thought that I would write a small Java program to call the
RPG program on the AS/400, but I was concerned that the users that
eventually get this functionality won't have the IBM Java Toolbox
installed on their PC. That would make my method of connecting to the
AS400 through Java impossible (I think) unless I load the JT400 on each
and every PC that will be using this icon.

Any ideas or advice on this particular conundrum?

Thanks,

Korto
Pjotr
2006-02-28 19:55:45 UTC
Permalink
Yes, possible.

Try: quote rcmd sbmjob cmd(your command to submit here)

Cheers,
Pjotr
Post by k***@gmail.com
Is it possible to create an icon on my PC desktop (the PC has Client
Access/iSeries Access installed) that will call an RPG program on the
AS/400 when I double-click the icon? I know that a PC program can be
executed on a PC by using RMTCMD, but is there a method to do this the
other way around? I am not expecting any parameters back from the
called RPG program nor am I passing any parameters to the RPG program.
Basically, I just want the RPG program to execute when the icon is
double-clicked.
I initially thought that I would write a small Java program to call
the RPG program on the AS/400, but I was concerned that the users that
eventually get this functionality won't have the IBM Java Toolbox
installed on their PC. That would make my method of connecting to the
AS400 through Java impossible (I think) unless I load the JT400 on
each and every PC that will be using this icon.
Any ideas or advice on this particular conundrum?
Thanks,
Korto
Korto
2006-02-28 20:29:02 UTC
Permalink
Thank you, thank you, thank you!! That was exactly what I was looking
for. Heh, the only problem is it seems that our admins here have
deemed that rcmd is a security risk so it isn't on any of our PCs in
the office. Bummer.

Oh well, thanks again, though.

Korto
Pjotr
2006-02-28 21:13:46 UTC
Permalink
rcmd is not on your PC. It is part of a FTP command. It should always work
and is not dependend of PC software. The only thing you need is FTP.EXE
--
Pjotr
Post by Korto
Thank you, thank you, thank you!! That was exactly what I was looking
for. Heh, the only problem is it seems that our admins here have
deemed that rcmd is a security risk so it isn't on any of our PCs in
the office. Bummer.
Oh well, thanks again, though.
Korto
wildfish
2006-03-01 00:12:22 UTC
Permalink
you may write a webservice.and build a program to get the webservice.
I think it's a good way to solve your problem
Korto
2006-03-01 16:09:46 UTC
Permalink
Webservice, eh? While I'm comfortable writing a Java program, I'm am
not versed at all in writing a webservice. Actually, I don't even know
what a webservice is! LOL! I see that word a lot, but I've never
encountered a need to understand what it is or what it does. Heh,
maybe now is the time for me to find out, eh?

Thanks!

Korto
Jonas Temple
2006-03-01 16:45:37 UTC
Permalink
If you're comfortable with Java, why not just write a Java program to
call the AS/400 program using the iSeries Toolbox for Java?
Korto
2006-03-01 17:07:07 UTC
Permalink
Hi, Jonas! You might've missed it in my original post, but here is why
I don't want to write a Java program to accomplish this:

"I initially thought that I would write a small Java program to call
the
RPG program on the AS/400, but I was concerned that the users that
eventually get this functionality won't have the IBM Java Toolbox
installed on their PC. That would make my method of connecting to the
AS400 through Java impossible (I think) unless I load the JT400 on each

and every PC that will be using this icon. "

As I understand it, the iSeries Toolbox for Java has to be loaded onto
each PC that I want to run this
program on. Logistically, it would be a nightmare for me to try and
update each user's PC with the Toolbox
in order for them to be able to use the icon that calls an RPG program.


Korto
Korto
2006-03-01 17:10:55 UTC
Permalink
Hi, Jonas! You might've missed it in my original post, but here is why
I don't want to write a Java program to accomplish this:

"I initially thought that I would write a small Java program to call
the
RPG program on the AS/400, but I was concerned that the users that
eventually get this functionality won't have the IBM Java Toolbox
installed on their PC. That would make my method of connecting to the
AS400 through Java impossible (I think) unless I load the JT400 on each

and every PC that will be using this icon. "

As I understand it, the iSeries Toolbox for Java has to be loaded onto
each PC that I want to run this
program on. Logistically, it would be a nightmare for me to try and
update each user's PC with the Toolbox
in order for them to be able to use the icon that calls an RPG program.


Korto
Dieter Bender
2006-03-01 17:05:54 UTC
Permalink
Hi,

if you use Java, why should you use the toolbox? java has all it needs to do
this.

Dieter Bender
Post by Jonas Temple
If you're comfortable with Java, why not just write a Java program to
call the AS/400 program using the iSeries Toolbox for Java?
Korto
2006-03-01 17:52:19 UTC
Permalink
Pjotr,

It works! I was actually able to run the program on the AS/400 from my
command window in Windows XP. So, now I just need to create a script
that will do it for me and attach an icon to it.

Thank you very much!

Kevin
Korto
2006-03-01 16:13:38 UTC
Permalink
Ack! RCMD is part of FTP? I knew it looked familiar, but it has been
a long time since I've used FTP on a PC and even then I never used
RCMD. But, I vaguely remember it being a part of FTP now. When I
talked with the admin guy about this yesterday, I guess he didn't
understand what I was talking about.

Anyway, thank you for the clarification!

Korto
Dieter Bender
2006-03-01 17:03:00 UTC
Permalink
Hi,

rexec should do the trick, but there might be a problem with asking for a
password.

Dieter Bender
Post by k***@gmail.com
Is it possible to create an icon on my PC desktop (the PC has Client
Access/iSeries Access installed) that will call an RPG program on the
AS/400 when I double-click the icon? I know that a PC program can be
executed on a PC by using RMTCMD, but is there a method to do this the
other way around? I am not expecting any parameters back from the
called RPG program nor am I passing any parameters to the RPG program.
Basically, I just want the RPG program to execute when the icon is
double-clicked.
I initially thought that I would write a small Java program to call the
RPG program on the AS/400, but I was concerned that the users that
eventually get this functionality won't have the IBM Java Toolbox
installed on their PC. That would make my method of connecting to the
AS400 through Java impossible (I think) unless I load the JT400 on each
and every PC that will be using this icon.
Any ideas or advice on this particular conundrum?
Thanks,
Korto
Korto
2006-03-01 17:13:09 UTC
Permalink
Dieter,

I'll check it out and see if I can use it. Thank you so much for the
info!

Korto
Thorbjørn Ravn Andersen
2006-06-04 07:18:12 UTC
Permalink
Post by k***@gmail.com
I initially thought that I would write a small Java program to call the
RPG program on the AS/400, but I was concerned that the users that
eventually get this functionality won't have the IBM Java Toolbox
installed on their PC. That would make my method of connecting to the
AS400 through Java impossible (I think) unless I load the JT400 on each
and every PC that will be using this icon.
If you need to do this in Java, you may want to do what I have ended up
doing for deploying Java code:

Use "one jar" to bundle third party jar-files (like jt400) with your
code. If you use eclipse the fjep plugin (fjep.sf.net) you can do this
easily from within eclipse. This is immediately clickable for a user
with Java installed, but does not allow a fancy icon.

Any "jar to exe" converter to create an executable file, which may have
an icon etc.
--
Thorbjørn

Continue reading on narkive:
Loading...