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

Running an AS400 command from an FTP Script

2,670 views
Skip to first unread message

John

unread,
Dec 2, 2002, 12:51:02 PM12/2/02
to
I was wondering if it is possible to run an AS400 command (one created
my me!) from an FTP script.
I've tried "quote rcmd" but it only seems to work for IBM Commands.

Any ideas?

Cheers
John

Grzegorz Goryszewski

unread,
Dec 2, 2002, 1:04:47 PM12/2/02
to

Użytkownik "John" <john_pre...@hotmail.com> napisał w wiadomości
news:f84b1305.02120...@posting.google.com...

> I was wondering if it is possible to run an AS400 command (one created
> my me!) from an FTP script.
> I've tried "quote rcmd" but it only seems to work for IBM Commands.

quote rcmd LIB/command

or for pgms

quote rcmd Call PGM(LIB/PGM)

Regards.

Grzegorz Goryszewski

Martin Rowe

unread,
Dec 2, 2002, 1:11:31 PM12/2/02
to

Hi John

quote rcmd will work for any command, but the ftp session needs to be able
to find it. Unless you've changed it, the library list for FTP will be
quite minimal. Qualify the command name with the library your command is
in, and make sure your command object has that library as its product
library (or that the CPP adds any required libraries the routine needs)

CHGCMD CMD(MYLIB/MYCMD) PRDLIB(MYLIB)

ftp remotesys
...
quote rcmd mylib/mycmd
...

Regards, Martin
--
mar...@dbg400.net (plain text emails only) http://www.dbg400.net /"\
DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open \ /
Source free test environment tools and others (file/spool/misc) X
Debian GNU/Linux | ASCII Ribbon Campaign against HTML mail & news / \

Terrence Enger

unread,
Dec 2, 2002, 2:30:26 PM12/2/02
to
Martin Rowe wrote:

> On Monday 02 December 2002 5:51 pm John wrote:
>
>
>>I was wondering if it is possible to run an AS400 command (one created
>>my me!) from an FTP script.
>>I've tried "quote rcmd" but it only seems to work for IBM Commands.
>>
>>Any ideas?
>>
>
> Hi John
>
> quote rcmd will work for any command, but the ftp session needs to be able
> to find it. Unless you've changed it, the library list for FTP will be


Note that it *is* possible to change it within the ftp job. E.g.,
quote rcmd addlible yourlib
To verify the result ...
quote rcmd dspjob option(*libl)
and look at the spool file.

HTH,
Terry.


> quite minimal. Qualify the command name with the library your command is
> in, and make sure your command object has that library as its product
> library (or that the CPP adds any required libraries the routine needs)
>
> CHGCMD CMD(MYLIB/MYCMD) PRDLIB(MYLIB)
>
> ftp remotesys

> ....
> quote rcmd mylib/mycmd
> ....
>
> Regards, Martin
>


Dave

unread,
Dec 2, 2002, 4:25:22 PM12/2/02
to
Hello,

Could you tell if it's possible to increase the times if the call is very
long with a FTP.
because I have a timeout with my call
thank you for your help

"Martin Rowe" <ne...@dbg400.net> a écrit dans le message de news:
asg7o9$r4ni6$1...@ID-141705.news.dfncis.de...

Martin Rowe

unread,
Dec 2, 2002, 5:15:22 PM12/2/02
to
On Monday 02 December 2002 9:25 pm Dave wrote:

> Hello,
>
> Could you tell if it's possible to increase the times if the call is very
> long with a FTP.
> because I have a timeout with my call
> thank you for your help

Dave

If the call doesn't need to be completed before the next set of ftp
instructions, you could always submit the call instead. That would free up
your session immediately to either continue or quit.

ftp ...
...
quote rcmd sbmjob cmd(call mylib/mypgm)

John

unread,
Dec 3, 2002, 3:22:55 AM12/3/02
to
Folks
Thanks for all that, its sorted my problem out!
Now I gotta actually do some work ;-)
Cheers again

John

"Grzegorz Goryszewski" <j2...@interia.pl> wrote in message news:<asg790$cq6$1...@news.tpi.pl>...

Phil

unread,
Dec 3, 2002, 4:19:06 AM12/3/02
to
Dave,

I think you want to transfer back a file updated or created on the remote
system by the call command ?
phil


"Dave" <frsi...@ifrance.com> a écrit dans le message de news:
asgj3q$r93$1...@news-reader10.wanadoo.fr...

Dan Hicks

unread,
Dec 4, 2002, 10:35:20 PM12/4/02
to
There is a way, but I can't recall the details. I'm thinking it's a
"time" command or some such.

--
Dan Hicks
It is difficult to say what is impossible, for the dream of
yesterday is the hope of today and the reality of tomorrow.
--Robert H. Goddard

John

unread,
Dec 5, 2002, 7:33:44 AM12/5/02
to
Thanks Martin
My ftp is working fine now (I've tested it by outputing the library
list to a spool file).
But I think I have another problem. The user that I log on as has its
own Job Description setup with its own library list. The spool file
that I output (see above) does not seem to recognise the library list
that I have setup, it just shows a default library list (ie QSYS,
QGPL, QTEMP etc). When I actually sign on to the AS400 under my user
name the library list is fine. Might there be something wrong, or do
you think it's just ftp not showing the correct info and the library
list is OK?

Thanks

John

Martin Rowe <ne...@dbg400.net> wrote in message news:<asg7o9$r4ni6$1...@ID-141705.news.dfncis.de>...

Terrence Enger

unread,
Dec 5, 2002, 10:51:09 AM12/5/02
to
John wrote:

> Thanks Martin
> My ftp is working fine now (I've tested it by outputing the library
> list to a spool file).
> But I think I have another problem. The user that I log on as has its
> own Job Description setup with its own library list. The spool file
> that I output (see above) does not seem to recognise the library list
> that I have setup, it just shows a default library list (ie QSYS,
> QGPL, QTEMP etc). When I actually sign on to the AS400 under my user
> name the library list is fine. Might there be something wrong, or do
> you think it's just ftp not showing the correct info and the library
> list is OK?
>


I have more experience using ftp than setting it up on the iSeries, so
what I have observed may be dependent on some setup parameters. Anyway,
...

The ftp server job does make some effort to acknowledge the userid you
sign on with. For example, it assigns generated spool files to you. It
does not go so far as to pick up your default library list. However,
once connected, you can adjust your library list using the usual iSeries
commands (wrapped with quote rcmd, of course).

[snip]

0 new messages