Operating System - OpenVMS
1820733 Members
3143 Online
109627 Solutions
New Discussion юеВ

FTP in batch vs interactive

 
Dieter Rossbach
Regular Advisor

FTP in batch vs interactive

Situation:

Ftp procedure to transfer data to a local system:

$ open/write tmp ftp_command_zks.tmp
$!
$ write tmp "set error_level error"
$ write tmp "cd zkss1::sys$specific:[decnet]"
$ write tmp "get file1.dat
$ write tmp "get file2.dat
$ write tmp "quit"
$ close tmp
$!
$ ftp 'tcpipa' /user="remuser" /passw="rempasswd" /input=ftp_command_zks.tmp

This works fine in interactive mode, but it fails in batch with:

%TCPIP-E-FTP_OUTPROCF, error processing output file DKB0:[localdir]file1.dat;
-RMS-E-CRE, ACP file create failed
-SYSTEM-F-NOSUCHNODE, remote node is unknown

This looks like ftp adds the decnet node name to the output file in batch mode. Changing the get command to

get file1.dat 0::file1.dat

make the procedure running in batch AND interactive mode.

Yes, it is strange to go to node 1 to get data via DECnet from node 2 and I recommended to use I direct connection but nevertheless: I'm a bit surprised by the way, ftp works different in batch and interactive mode.
Is there something I missed, logical, switch, with ftp?

Environment:
VMS 7.3-1
TCPIP Version 5.3

Regards

Dieter
8 REPLIES 8
Lokesh_2
Esteemed Contributor

Re: FTP in batch vs interactive

Hi Dieter,

can you replace zkss1::sys$specific:[decnet] with simple sys$specific:[decnet] ?

Best regard,
Lokesh
What would you do with your life if you knew you could not fail?
Willem Grooters
Honored Contributor

Re: FTP in batch vs interactive

Odd route, indeed, I would have put the files using FTP (or even better: have used DecNet FAL)

Anyway:
The difference could be caused by different paths in SYLOGIN.COM and LOGIN.COM on ZKSS1 for modes BATCH and INTERACTIVE (quite usual, in fact) and that these differences hold the shown result.

It looks as if TCPIPA doesn't recognize ZSKK1 on GET in batch. What happens (in batch) if you do a DIR after CD?

I tried this and found a simlar problem interactively:

Assume, I'm on VMS1.

BPS2004A> crea dka0:[sys0]x.x
test

>>> so the file exists. Then (interactively):

BPS2004A> ftp vxso05
220 VXSO05 FTP Server (Version 4.2) Ready.
Connected to VXSO05.
Name (VXSO05:otwillem):
331 Username OTWILLEM requires a Password
Password:
230 User logged in.
FTP> cd npolvms1::dka0:[sys0]
250-CWD command successful.
250 New default directory is NPOLVMS1::DKA0:[SYS0]

>>> Ok.

FTP> dir
200 PORT command successful.
150 Opening data connection for NPOLVMS1::DKA0:[SYS0]*.*;* (10.100.51.232,54804)

550 ACP file or directory lookup failed


>>> ??? but I'm sure it exists.

FTP> get x.x
200 TYPE set to IMAGE.
200 PORT command successful.
550-Unable to determine the file type for NPOLVMS1::DKA0:[SYS0]X.X;
550 ACP file or directory lookup failed
FTP>

>>> is now quite obvious...
>>> Just tried one thing more:

FTP> lcd 0::sys$login
%TCPIP-E-FTP_NOSUCHFILE, no such file 0::sys$login
%Failed to set default directory to [.0::sys$login]
Local directory now DKA0:[USERS.OTWILLEM]

>>> is NOT able to handle this!

FTP> get x.x
200 PORT command successful.
550-Unable to determine the file type for NPOLVMS1::DKA0:[SYS0]X.X;
550 ACP file or directory lookup failed
FTP>

My guess: a clash between DecNet and TCPIP. Don't mix them...
Willem Grooters
OpenVMS Developer & System Manager
Dieter Rossbach
Regular Advisor

Re: FTP in batch vs interactive


@Lokesh

simple ftp to local files works fine in all modes.

@Willem Grooters

> My guess: a clash between DecNet and TCPIP. Don't mix them...

Right, that was my first idea, too. But you know how costumers are: they might have to change their firewall setup!
Martin P.J. Zinser
Honored Contributor

Re: FTP in batch vs interactive

Two suggestions:

* Does anything change if you do replace the name with the numeric DECnet address?

* You might want to enable set watch before
calling the procedure, so you can see exactly what file VMS tries to access.
Antoniov.
Honored Contributor

Re: FTP in batch vs interactive

Hi Ditier,
I read your thread only today.
Sometime also I have trouble using batch commands instead interactive mode and I question me because: no may be no difference between batch or interactive but batch run quicky.
I remember some months ago I worked fine interactivly with a modem but wrong in batch; after a lot of try I added a wait and procedure worked fine in batch mode too.
I don't know if you have same problem, but you could try add a pause in ftp procedure.
$!
$ open/write tmp ftp_command_zks.tmp
$ write tmp "set error_level error"
$ write tmp "cd zkss1::sys$specific:[decnet]"
$ write tmp "! wait 00:00:02
$ write tmp "get file1.dat
$ write tmp "! wait 00:00:02
$ write tmp "get file2.dat
$ write tmp "quit"
$ close tmp
$!
Perhaps may appear stupip but you can try spend only five minutes.

Bye
Antoniov
Antonio Maria Vigliotti
Dieter Rossbach
Regular Advisor

Re: FTP in batch vs interactive

I'll do that on monday

Regards

Dieter
Dieter Rossbach
Regular Advisor

Re: FTP in batch vs interactive

@A.

adding a pause makes no difference.


Regards

Dieter
Antoniov.
Honored Contributor

Re: FTP in batch vs interactive

Ok Didier,
now you could see SYLOGIN.COM and look for any difference between interactive and batch mode.

Bye
Antoniov
Antonio Maria Vigliotti