Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RMTCMD AS400 -> PC

1,720 views
Skip to first unread message

Marc Logemann

unread,
Jul 3, 1998, 3:00:00 AM7/3/98
to

Hello,

we use CA V3R1 SP2.

Is there a chance to initiate a RMTCMD from a PC batch file?
i must start a CL after a certain PC program is finished.

thx for help!

marc


Guillermo

unread,
Jul 3, 1998, 3:00:00 AM7/3/98
to

Marc:
You can use the rmtcmd in the PC provided you have the rexecd started in the
AS/400 ( strtcpsvr *rexec ) . I think that the rexecd started in V3R7 but
I'm not 100% sure.

hth

Guillermo

Marc Logemann wrote in message <359C832E...@osnabrueck.netsurf.de>...

Terry Vance

unread,
Jul 3, 1998, 3:00:00 AM7/3/98
to

Yes you can initiate a RMTCMD from a PC batch file. Here is an example
from a batch file that I use:

****************************************************************************
**
REM *** ROP upload to AS/400 ***
D:\ROP\UPLOAD\RFROMPCB D:\ROP\UPLOAD\PCPOROP0.TFR
REM *** Remote console command to start program ***
RMTCMD /I D:\ROP\UPLOAD\UPLDROP.JOB

****************************************************************************
***

The rfrompcb transfers the file(pcporop0.tfr) to the AS/400.

The RMTCMD /I tells it to use the commands found in the UPLDROP.JOB file.
Here is that file. CALL PGM(*LIBL/PCM0969)

I hope this helps.

Terry

Koos Bezemer

unread,
Jul 3, 1998, 3:00:00 AM7/3/98
to

Naah, you have to do a sign on from the PC. Better strategy I think is
to make the PC program create something to signal it's finished
(finished.now, e.g.). On the AS/400, you would have a job every now and
then checking the PC for that file. If it finds it, delete it and start
the AS/400 program that has to be executed.

Checking on the PC can be done via Client Access, but is more simple if
you make the PC an FTP-server. Then create a batch-FTP program on the
AS/400 to check for files, but also upload, download, delete.

wmb...@my-dejanews.com

unread,
Jul 6, 1998, 3:00:00 AM7/6/98
to

In article <359C832E...@osnabrueck.netsurf.de>,

Marc Logemann <m_log...@osnabrueck.netsurf.de> wrote:
>
> Hello,
>
> we use CA V3R1 SP2.
>
> Is there a chance to initiate a RMTCMD from a PC batch file?
> i must start a CL after a certain PC program is finished.
>
> thx for help!
>
> marc
>

Yes, You can do this easy from the PC with FTP.
Here is an example of a .BAT:
It first sends a message, then submits a job.

-lines-
ftp -n -s:c:\mylib\script.txt
-more lines-


The script.txt looks like this:

open 165.9.142.111
user as400user as400passw
quote rcmd sndmsg msg('Hi from my PC!') tousr(as400user)
quote rcmd sbmjob cmd(CALL PGM(MYLIB/MYPGM)) job(MYJOB) jobq(MYQUE)
quit

Regards,
Bengt Persson

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

wmb...@my-dejanews.com

unread,
Jul 6, 1998, 3:00:00 AM7/6/98
to

In article <359C832E...@osnabrueck.netsurf.de>,
Marc Logemann <m_log...@osnabrueck.netsurf.de> wrote:
>
> Hello,
>
> we use CA V3R1 SP2.
>
> Is there a chance to initiate a RMTCMD from a PC batch file?
> i must start a CL after a certain PC program is finished.
>
> thx for help!
>
> marc
>
Yes, You can do this with FTP!
In Your .BAT-file You insert a line like this:

ftp -n -s:c:\mylib\script.txt

In the file script.txt You put whatever commands You like.
For example:

open 111.222.333.444
user as400user as400passw
quote rcmd sndmsg msg('Starting CL-Prog Myprog!') tousr(as400user)
quote rcmd sbmjob cmd(call myprog) job(myjob) jobq(myjobq)
quit

Regards, Bengt Persson.

Richard Knechtel

unread,
Jul 6, 1998, 3:00:00 AM7/6/98
to

wmb...@my-dejanews.com wrote:
>
> Yes, You can do this with FTP!
> In Your .BAT-file You insert a line like this:
>
> ftp -n -s:c:\mylib\script.txt
>
> In the file script.txt You put whatever commands You like.
> For example:
>
> open 111.222.333.444
> user as400user as400passw
> quote rcmd sndmsg msg('Starting CL-Prog Myprog!') tousr(as400user)
> quote rcmd sbmjob cmd(call myprog) job(myjob) jobq(myjobq)
> quit
>

Question, isn't putting a user id and password in a script that sits
local on your PC a security risk? Someone could just copy the script and
have your login and password.

Just a thought.


--

Richard Knechtel
email(richard dot knechtel at eds dot com)
Centrobe
(Systems Engineer/System Administrator)
(Aspiring AS/400 GURU)
(Aspiring Linux GURU)
(Aspiring Visual Basic Programmer)

The contents of this message express only MY opinion.
This message does not necessarily reflect the policy or views of
my employer, Centrobe. All responsibility for the statements
made in this posting resides solely and completely with the
ME.
I Ex-Spaminate spammers!
See US Code Title 47, Sec.227(a)(2)(B), Sec.227(b)(1)(C)
and Sec.227(b)(3)(C).

Bengt Persson

unread,
Jul 7, 1998, 3:00:00 AM7/7/98
to
Yes, its a security risk. The issue was not how to do it in a
secure way! I'm afraid I dont know any secure way!

Regards, Bengt Persson.

> Question, isn't putting a user id and password in a script that sits
> local on your PC a security risk? Someone could just copy the script and
> have your login and password.
>
> Just a thought.
>

Koos Bezemer

unread,
Jul 7, 1998, 3:00:00 AM7/7/98
to
Listen, you don't want to do this: allow a batch file to sign on with a
userid/password that anybody can see ? Just initiate this stuff from the AS/400.
How ? make the PC an FTP server (with e.g. Microsoft personal web server, it
comes free with the internet browser). Then automatically run a batch-ftp job
from the AS/400 to check for a certain PC-file (which signals a process on the
PC is finished) every x minutes. Then, if you find the file, start the process
on the 400.
Good luck

boo...@ibm.net

unread,
Jul 7, 1998, 3:00:00 AM7/7/98
to
Another choice is to use a product like Visual Age RPG which runs on the
PC and can read/write from/to the local PC file and also the AS/400.
Therefore you could easily have the PC just add the records to the
appropriate AS/400 file as they are created.

just a thought.


In <35A2B6F7...@cura.net>, on 07/07/98


--
-----------------------------------------------------------
boo...@ibm.net
Booth Martin
-----------------------------------------------------------


Richard Knechtel

unread,
Jul 8, 1998, 3:00:00 AM7/8/98
to
Koos Bezemer wrote:
>
> Listen, you don't want to do this: allow a batch file to sign on with a
> userid/password that anybody can see ? Just initiate this stuff from the AS/400.
> How ? make the PC an FTP server (with e.g. Microsoft personal web server, it
> comes free with the internet browser). Then automatically run a batch-ftp job

I wouldn't trust a Microsoft product for security. I would just get
Apache (it's free also) and do it. You can set up a Linux partition over
a dos one and then use the Apache wed server and do the same thing, with
MUCH less security risk.

0 new messages