Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Using FTP from a detached process.

SOLVED
Go to solution
The Brit
Honored Contributor

Using FTP from a detached process.

Hi Guys,
I know that one of you is going to jump on this and make me feel even dumber than normal, however, here goes.

I have short FTP script which is fairly self explanatory, i.e.

$ ftp ftp..com
cd out
dir
mget *.*
dir
bye
$!
$ Exit

This script runs fine interactively, and it runs fine in Batch, however when I try to run it from a detached process I get,

$ @FTP_Script
$ ftp ftp.rrd.com
%DCL-W-NUMBER, invalid numeric value - supply an integer
\\
cd out
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\CD\

(obviously I am providing the correct Username and Password above.)

Can anyone through any light on this (without humiliating me too much)

thanks

Dave.
15 REPLIES
labadie_1
Honored Contributor

Re: Using FTP from a detached process.

As it runs fine in batch, what is the plus of running as a detached process ?

Jim_McKinney
Honored Contributor

Re: Using FTP from a detached process.

How are you creating this detached process? Unless you execute LOGINOUT you won't have the DCL CLI, PPFs, etc... so you won't have the FTP verb. You need to execute some variation of the following (add additional command qualifiers as desired/needed).

$ RUN/DETACH/INPUT=FTP_SCRIPT.COM SY$SYSTEM:LOGINOUT
The Brit
Honored Contributor

Re: Using FTP from a detached process.

The creation command is

$ run sys$system:loginout.exe
/input=parent.com/out=parent.log

The ftp_script runs from within "parent.com"

All DCL commands upto the FTP script execution work correctly, and after the script fails, the remaining DCL commands work correctly.

the problem just seems to be that the detached process will not let me specify the username and password on the command line.

by the by, I am running this on an ES45, OVMS 7.3-2, TcpWare 5.7. (Although I got the same error on a node running TCPIP Services V5.4).

Thanks

Dave
Jim_McKinney
Honored Contributor

Re: Using FTP from a detached process.

Guess that I should have realized that the CLI was mapped - you did show the DCL error message in the initial post...

Is FTP invoked using a verb from the command tables or as a foreign command? Is there a logical name defined for the FTP image or a symbol for the verb that is present during batch or interactive use but not defined for detached jobs (either by SYS$SYLOGIN or the LGICMD)?
The Brit
Honored Contributor

Re: Using FTP from a detached process.

No symbols, No Logicals, Not Foreign!

D
Walter Miller_1
Valued Contributor

Re: Using FTP from a detached process.

Maybe try the DCL style of /USERNAME=username /PASSWORD=password in your command prodecure.
Steven Schweda
Honored Contributor

Re: Using FTP from a detached process.

> Can anyone through any light on this
> (without humiliating me too much)

Could be hard, one way or the other.

Around here, with that syntax, I _always_ get
an error:

alp $ tcpip show version

HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 6
on a COMPAQ Professional Workstation XP1000 running OpenVMS V7.3-2

alp $ ftp alp sms not_my_password
%DCL-W-NUMBER, invalid numeric value - supply an integer
\SMS\

Most likely because, as the HELP says:

UNIX Format

ftp [ host [ port ] ]

and most user names don't qualify as valid
port numbers.

Personally, if I wished to do a quick
wildcard FTP fetch, I'd probably use wget:

wget "ftp://user:pass@host/path/*.*"

although if you need ASCII mode, it could get
messy.
John Gillings
Honored Contributor

Re: Using FTP from a detached process.

Dave,
For the VMS style FTP command use qualifiers /USERNAME=username /PASSWORD=password

The FTP command is trying to interpret your username parameter as a port number (see HELP FTP)

I'd also strongly recommend you delimit your commands with $DECK and $EOD


$ ftp ftp..com /USERNAME= /PASSWORD=
$ DECK
cd out
dir
mget *.*
dir
bye
$ EOD
$!
$ EXIT

$DECK protects you from nasty side effects if your command doesn't consume all the input (as in your case - imagine if your first FTP command had been DELETE rather than CD!)

Also check out COPY/FTP. It would look something like:

$ COPY/FTP ftp..com"username password"::"/out/*.*" []

A crucible of informative mistakes
The Brit
Honored Contributor

Re: Using FTP from a detached process.

To Walter,
TCPWARE doesn't recognise the "/username=... /password=..." syntax.

To Steven,
As a reminder, I am running TCPWARE 5.7, not TCPIP Services (sad to say!).

I think a point is being missed here, and that is that the FTP syntax I am using works fine either INTERACTIVELY or in BATCH, it only fails (and gives the above error) when it is running from a detached process.

This is what has me tearing my hair out. (and at my age there aint much left to begin with).

To John,
Thanks for the reminder about the Deck command, I will incorporate it, (really don't use it as much as I probably should).

Dave.
Steven Schweda
Honored Contributor

Re: Using FTP from a detached process.

> As a reminder, I am running TCPWARE 5.7,
> not TCPIP Services (sad to say!).

As a reminder, someone said:

> (Although I got the same error on a node
> running TCPIP Services V5.4).

As a TCPIP user, it's hard to imagine why
you'd be sad to say that you're not using it.

It sure does sound as if there's some
difference in the symbols or command tables
in the different environments. Perhaps you
could throw in a VERB command as well as a
SHOW SYMBOL F*. It sure looks as if you're
getting the TCPIP syntax checking instead of
whetever TCPware does.

> I think a point is being missed here, [...]

No, I think that I got that point.

Is there some TCPware-specific magic in a
[SY]LOGIN.COM which gets used in one case but
not the other?
Walter Miller_1
Valued Contributor
Solution

Re: Using FTP from a detached process.

The following works in TCPware V5.3-2 running as a detached process.

$ ftp
open
cd out
dir
mget *.*
dir
bye
$ exit


Walter
The Brit
Honored Contributor

Re: Using FTP from a detached process.

I also forgot to mention that the TCPIP Services node give the error message under ALL modes, INTERACTIVE, BATCH, or DETACHed.

> As a TCPIP user, it's hard to imagine why
>you'd be sad to say that you're not using >it.

I'm not sure what you mean by this. I personally mean that I would rather use TCPIP Services. TCPWare "HELP" leaves something to be desired.

As for the possible differences between TCPWare and other stacks, it runs a completely different FTP image than TCPIP Services.

Dave.

Daniel Fernandez Illan
Trusted Contributor

Re: Using FTP from a detached process.

Dave
Are you check to run detached process using /AUTHORIZE qualifier. By default run command use /NOAUTHORIZE and detached process runs under the control of command interpreter.
With /AUTHO and LOGINOUT.EXE searches the UAF to validate the process.

Saludos.
Daniel.
Martin Vorlaender
Honored Contributor

Re: Using FTP from a detached process.

Dave,

in TCPware, the FTP client always is called by a symbol:

$ sho symbol ftp
FTP == "$TCPWARE:FTP"
$ netcu show version
TCPware(R) V5.6-2 Copyright (c) 2002 Process Software

OpenVMS version V7.3-2 booted on 4-APR-2008 10:47:18.00,
running on a AlphaServer 4000 5/300 2MB.
$

usually defined by calling TCPWARE:TCPWARE_COMMANDS.COM from (SY)LOGIN.COM.

This definition is missing, of course, when running detached. Then the TCP/IP Services verb FTP from DCLtables is used, giving the "%DCL-W-NUMBER" error because of different syntax.

That'd be my explanation.

cu,
Martin
The Brit
Honored Contributor

Re: Using FTP from a detached process.

As predicted, the solution is too embarassing to discus in detail, and the solution was included in Jim McKinney's first response.

I leave it to anyone interest to determine the solution (by comparing Jim's post, and my response - The answer is right there)

Having said that, thank you all for the discussion, always a learning experience no matter what.

Dave.

(Hint: "/detach")