TcpLink 3000 CS
INAC Computer
Innovative Netzwerkanwendungen
 Benutzerhandbuch TcpLink 3000 CS in englischer Sprache


Chapter 9

Initializing a File Tranfer from a Host Station



The previous chapters decribed how to access a network or an archive by operating the TCP program from the ASPECT keyboard.

Your TCPLINK unit provides in addition to that the capability of initializing a data transfer from any remote UNIX station or DOS PC connected to the network. In principle you need not learn anything new. The command input from a host station is nearly the same as from the ASPECT since everything is handled by the TCP program which will now receive its commands not from the arguments typed in on the ASPECT keyboard, but from those entered on the host.

Before you can start you must set up the text file poll.tcp on the ASPECT using a convenient text editor. This file must contain the list of stations from where you want to initialize data transfers from or to the ASPECT . The following provides an example of a poll.tcp file:

1

sun.tcp

indigo.tcp

ax32.tcp

dospc.tcp

exit

The meaning of the number in the first line is discussed at the end of this chapter.

From the names in this file you will notice that the poll.tcp contents are not the host station names themselves as they occur in the hosts.tcp file. Instead, the corresponding destination files containing user login id, password, etc. are listed. Refer to the chapter Software Installation for details.

Now, in order to make the ASPECT ready for remote data transfer initialization, start the program TCP from the ASPECT keyboard by typing one of these commands:

TCP W

TCP W (e.g. TCP W 20)

You may do that from ADAKOS region 1, or from region 2 if you want to run DISNMR in region 1. TCP will start up, but never terminate unless you enforce it via CTRL/E.

TCP is now executing an infinite loop over all stations contained in the poll.tcp file. It polls the first computer in the list for a command to execute and carries that out if present. Otherwise, it proceeds to the next computer of the list. At the end of the list, TCP waits for 10 seconds (or another period if you specified the waiting time explicitely), and then returns to the beginning of the list.

After these preparations assume now you are sitting in front of a terminal connected to one of the stations in the poll file, and you want to set up a file transfer. You would do that by changing to your home directory (type cd if you are not there yet), and then type in a command of the form

echo <TCP command> > cmd.tcp
where <TCP command< is exactly an argument of the type you would enter at the ASPECT keyboard when calling the program TCP, as described in the former chapters. This is illustrated by the following example:

echo sun:s spec*.* > cmd.tcp
The echo command of this example puts the command argument sun:s spec*.* into the file cmd.tcp. If the host station you are currently logged in is contained in the file poll.tcp set up on the ASPECT , the station will be polled for a command by the program TCP on the ASPECT . TCP recognizes a command by searching for a file cmd.tcp in the home directory of the user (on DOS PCs in the directory from where the ftp server was started). The contents of cmd.tcp will be taken as command specification line for TCP, just as if you had typed TCP SUN:S SPEC*.* on the ASPECT . If you are currently logged to sun, you will receive all files SPEC*.* from the ASPECT . If you are logged to another computer, you have initialized a file transfer from the ASPECT to SUN from your computer.

How can you control whether your cmd.tcp file was found by TCPLINK for execution? TCPLINK will rename cmd.tcp to lastcmd.tcp after extracting the command from the file for two reasons. Firstly this gives an indication that your command was recognized, and secondly it will prevent the same command from being executed twice.

If you find the echo command described so far difficult to enter, you can make life easier by setting up a UNIX shell script or \dos batch file called tcp or tcp.bat, respectively, of the following contents:

echo $* > cmd.tcp (for UNIX)

echo %1 %2 > cmd.tcp (for DOS)

Then, in order to execute the example you would simply type
tcp sun:s spec*.*
The command syntax now looks exactly like what you would enter on the ASPECT keyboard, and it has exactly the same effect.

Handling of error messages

The first line of the file poll.tcp must contain a 1 or a 0. Inserting a 1 has the following meaning. When an error occurs during the execution of TCP , the program puts the error message in the file prot.tcp, and then lists this file on the console. If the number is 0 instead, the error message still goes to the file, but is not printed. Note that the file poll.tcp is only read by the program when started with the w option.



© 1999 INAC Computer GmbH    Gestaltung: Dr. Lutz Schneider    Letzte Änderung am 11.01.99