Using FastSync 2780 and 3780 Commands

(3780 DOS Version)

The most popular package for 3780 File Transfers is the SyncPack2000e


Please note: because of the length of this document, you may want to consider just printing it off and then reviewing it afterward.


Here we discusses the FastSync 3780 commands on a functional basis.

GETTING HELP

There are several ways to get help when running FastSync. Some of the most important detailed information is obtained from this "mini" on-line manual.

You can get help when the program is running by pressing the F1 key. If you have at least 20 K of available memory, detailed help about individual commands is obtained by using a question mark (?) in place of the dot that precedes all commands. This extended help system is loaded into memory only when needed to reduce the memory requirements during normal operation.

For the Non-GUI, Text Based, 3780 program running under a DOS Window within Windows 95/98,Win2K, NT, or XP.

Pressing the F1 function key when the program is running brings up the HELP menu with a list of the subjects covered under the help system.

F1 - Welcome to the FastSync Help System

To obtain Help about a subject, enter the appropriate number

1 Exiting FastSync
2 Entering Commands
3 Calling the Remote Host System
4 Sending Data
5 Receiving Data
6 Command Files
7 DOS Access
8 Configuration
9 Remote Control Commands

To display information about a subject, press the number that precedes the appropriate title. Information about that subject appears on the screen.

When help information about a subject is displayed on the screen, you can return to the help menu by pressing any key except a dot (".") or a question mark ("?"). If you press a dot, FastSync assumes you want to enter a command and leaves the help information on the screen until you press the <ENTER> key. If you press a question mark, FastSync assumes you want information for a command and waits for you to complete the command and press <ENTER>.

To leave the Help Menu, press the <ESC> key. Back to previous page.

ENTERING COMMANDS

FastSync has three basic ways to enter commands:

1. Interactively using the Function Keys.

2. Interactively using the Dot (.) Scripting Command Language from the keyboard.

3. Invoking a command file that contains one FastSync command per line. When each command is finished, the next command is executed.

Using Function Keys To Enter Commands

You can enter commonly used commands with the Function Keys for easy, interactive use. A Table of the Function Keys and their commands are:

F1 HELP Get help information
F2 CALL Call a phone number
F3 SEND Send a text file
F4 RCVE Receive a file
F5 SENDB Send a binary file
F6 CMD Start a command file
F7 DOS Create a DOS shell
F8 CLS Turns configuration display on or off
F9 STOP Stop a command or command file
F10 EXIT Exit FastSync

If you use the Function Keys, the system prompts you for any options needed by the command. For example, if you press F3 (SEND), you are prompted for a file name.

We discuss the prompts and required responses for each Function Key command in detail under the specific command.

Use Of Function/Numeric Keys (Unix)

Since many Unix terminal systems may not have the usual Function Keys found on most PC oriented computer keyboards, it is important to note that the normal Function Keys (F1-F10) are replaced in the Unix version by the number keys (1-0)_ at the top of your keyboard.

Using The . "DOT" Scripting Command Language

Outlined below is the method used for entering the Dot Script Commands from the keyboard. When you enter commands from the keyboard, you must bring up the main menu by typing FastSync at the system prompt where your 3780 files are located and press the <ENTER> key. Use the following format:

.command[,plus necessary command parameter(s)]

where:

the dot ( . ) [Required as part of the syntax, this allows the system to distinguish between characters accidentally entered on the keyboard and legitimate commands].

command [Required (obviously)].

comma [(Or space) Required when parameters follow the command].

command parameter(s) [Any additional items needed to complete the command].

For example, the command to send the file MyFile.ext is: .SEND,MyFile.ext

Note

When an individual command is entered, a error message is shown on the screen and you will hear a one-half second beep from the computer speaker on your computer.

Spaces And Commas In FastSync Commands

Either spaces or commas may be used to separate the command key word from any command parameters. For example, the following two commands are identical:

.SEND,MyFile (comma used)

.SEND MyFile (space used in place of the comma)

EXITING FastSync

There are three ways to quit the FastSync program:

1. Press F10

2. Type in .EXIT <ENTER>

3. For DOS users, hold down the Ctrl key while pressing the Break key.

With any of these methods, FastSync tries to send an EOT (End of Transmission) to the remote computer, closes any open files, drops DTR (Data Terminal Ready) to force the modem to hang up the telephone, and exits to the operating system.

Back to previous page

NOTE For DOS Users

Unlike most software, pressing Ctrl Break does not immediately return you to your operating system. Instead, Ctrl Break is treated the same as a normal exit command. Ctrl Break, however, works where other commands aren't recognized. The Ctrl Break handler bypasses the normal operator input routines, which may not be active if the program is sending or receiving a block of data.

DOS users can make Ctrl Break even more effective if they include the "BREAK ON" DOS command in their AUTOEXEC.BAT file or enter it as a separate command on the DOS command line.

DEFAULT AUTO-ANSWER AND AUTO-RECEIVE

With the CTI internal SyncPacks, UDS Sync-Up modems, and some external modems, FastSync auto-answers incoming calls without being put into auto-answer mode.  Actually, it is the modem that answers the call by generating an answer tone. You will know if a remote system is calling your modem and bidding for the line when you see the status message "REMOTE BID ACTIVE" displayed on the screen.

If FastSync receives three successive ENQs (line bids) when there is no command file running and you have not pressed any keys during the three successive ENQs, FastSync creates a default receive file name "DATAFILE" with a unique numeric suffix, then responds to the line bid with an ACK0 and begins to receive the file. A message is displayed on the screen, along with the file name created by FastSync. The program waits for three ENQs before responding to give you time to begin entering a file name.

SENDING FILES

You can transmit files in two different formats -- either Binary (transparent), or Text. See "Data File Formats" in the Introduction chapter for more information on Text and Binary formats. Files are sent in the Text format with the ".SEND" command. Files are sent in the Binary format with the ".SENDB" command.

The format you use depends upon the file's contents. If the file has only text characters (i.e., alpha/numeric characters and punctuation characters), send it as a text file. If however, the file has bytes that are not text characters, send it as a binary file. Non-text characters are commonly found in executable program files (like WordPerfect's wp.exe program) or files containing binary data numbers such as spreadsheet or word processing files.

If files are sent as non-transparent, the normal protocol bytes are used and cannot be included in the file since the receiver interprets the bytes from the file as protocol bytes. Under the rules for transparent file transfers, protocol bytes are always preceded by a DLE (Data Link Escape) character (10h) to prevent confusion with data bytes.

If a 10h is in the source file, the transmitter inserts a second 10h to prevent the byte following the 10h from being interpreted as a protocol character. For example, if the source file contains the sequence "10h 26h," it is transmitted as "10h 10h 26h." The system receiving a binary transmission always removes the first DLE after checking to see that it is not followed by a protocol byte. Thus, all 256 possible data bytes are included within the file.

When sending binary files, transmissions are never translated to EBCDIC (mainframe code) before being sent to the remote system.

The send command you choose determines whether the file is sent in text (.SEND) or transparent (.SENDB) format. The function key F3 sends the file as a text file, while the F5 function key sends the file as a transparent file.

If you use the function key(s) F3 or F5, you are prompted for a file name. If you use keyboard entry, add a comma or a space after the ".SEND" or ".SENDB" command and then enter a file name. For example:

.SEND,MyFile.xxx [sends a text file] or

.SENDB,MyFile.xxx [sends a binary file]

There is another form of the ".SEND" command which allows you to specify the file name to be used by a remote computer running FastSync. The syntax for this modified ".SEND" command is:

.SEND,FileName1 AS FileName2 [or]

.SENDB,FileName1 AS FileName2

The key word "AS" causes FastSync to precede the transmission of FileName1 with a special record instructing the remote FastSync to use FileName2 as the receive file name. When the remote system sees the special record, it overrides any file name you entered.

Options To The .SEND Command

There are six options that can be added after the file name with the ".SEND" command to control the way files are sent by FastSync. More than one option can be used at a time, providing they are not mutually exclusive. The group of options must be surrounded by parentheses, with the first parenthesis separated from the file name by a space. Within the parentheses the options must be separated from each other by a space.

.SEND, MyFile.ext [(Option1 Option2)]

The options are:

noeot [Do not send an EOT (End of Transmission) after sending the file. The EOT is used by the transmitting computer to relinquish transmit status and give the other computer a chance to bid for the line (if it has anything to send). If you are sending more than one file, it is more efficient to not relinquish transmit status by sending an EOT. Normally, FastSync automatically sends an EOT after sending a file].

noirs [Omit Record Separators. Normally, records are separated from each other by a protocol character called an Inter Record Separator. These are added to the data stream when a CR/LF is encountered in the input file. If this option is used, record separators are omitted. NOTE: Without Record Separators, the receiving station might not know where one record ends and the next one begins unless some arrangements are made beforehand].

noetx [Suppress End of Text (ETX). Since an ETX marks the end of a file, the EOT is never sent when this option is used because an EOT not preceded by an ETX is considered a protocol error. Normally, the last data block of a transmitted file ends with an ETX (End of Text) character. After the block is acknowledged, an EOT (End of Transmission) character is sent. If this command modifier is used, both the ETX and EOT are omitted and the next file sent looks to the receiving system as if it is still part of the first file].

cons [Send the file and immediately afterward enter receive mode. Display any incoming data on the screen (console). Using this option allows you to know the status of a file if the remote system sends a response giving the status of the file you have just sent].

iferr nnn [The "iferr nnn" option allows you to target an error routine to be executed if the command fails. It has the same effect as using the ".IF...Then .GOTO nnn" statement as the next command in the command file. Substitute a numeric label for the "nnn" in the option. If the command fails, command file execution resumes with the statement following the label].

start ByteCount [After opening the file, place the file pointer ByteCount bytes into the file and begin sending the remainder of the file. For example, ".SEND, Megtest.dat (start 731463)" sends the file "Megtest.dat" starting with the 731463rd byte].

IRSETB option for the .SEND command.  It forces an Inter-record Separator before End of Block for hosts that require it.

Back to previous page

SENDING MESSAGES

Besides being able to send files, short messages can be sent with FastSync using the ".MESSAGE" command. The ".MESSAGE" command is often used in command files for signing-on to the remote system or for sending short inquiries to the remote system.

The format for the ".MESSAGE" command is:

.MESSAGE,YourUserMessage [(Options)]

If FastSync is not already connected to the remote system, a connection is established before the message is sent. If FastSync does not have transmit status on the line, FastSync bids for the line before sending the message.

Normally, the text sent with the ".MESSAGE" command ends with an ETX (End of Text) character. An EOT (End of Transmission) is then sent after the remote acknowledges the message. These defaults can be overridden with the following message options:

noeot [send an ETX, but do not send an EOT]

noetx [do not send either an ETX or an EOT at the end of the message]

noirs [do not send a record separator]

cons [display remote systems response on your Console (screen)]

iferr nnn [target an error routine to be executed if the command fails].

Back to previous page

WILDCARDS IN FILE NAMES

Wildcard characters ("*" and "?") can be used when specifying file names for transmission to the remote system. These special characters are used when the complete file name is not known or you want to send more than one file with a single ".SEND" command. When wildcards are used with the ".SEND" or ".SENDB" commands, all file names matching the non-wildcard characters are sent to the remote system. Wildcard characters are used within FastSync in the same way they are used in DOS commands.

To understand how wildcard characters are used in file names, you must first understand the way file names are used with DOS. Complete file names specify the drive letter, the path to the directory, a prefix and, finally, an extension. For example, the complete file name, "D:\SOMEDIR\FILENAME.EXT" contains:

D: [the drive letter]

\ [the root directory]

SOMEDIR [the directory]

\ [the directory separator]

FILENAME [the file name prefix]

. [the dot]

EXIT [the file name extension]

If the drive letter or the path are omitted, the current default drive and directory are used by DOS to create the complete file name.

Wildcard characters cannot be used for the drive letter or within the directory path. They can, however, be used within the file name prefix and the file name extension. The question mark ("?") wildcard character allows a match with any file name that matches all characters except the question mark. For example, the two files, "FILE1.TXT" and "FILE2.TXT," matches "FILE?.TXT."

The asterisk ("*") wildcard character finds all file names that match the characters up to (but not including) the asterisk in either the file name prefix, the file name extension or both. An asterisk ban be used in both the prefix and in the extension. The three files, "FILE1.TXT," "FILE2.TXT" and "FILE.NEW" all match "FILE*.*"

Wildcards In The ".SEND" Command

When wildcards are used in a ".SEND" command, all files that match are sent to the remote system. Each file ends with an ETX character, followed by an EOT protocol character unless one of the command modifiers ("noetx" to suppress ETX and EOT or "noeot" to suppress only the EOT) is used.

Wildcards In The ".SEND,LocalFile AS RemoteFile" Command

Wildcards are used in both local and remote file names. Before sending the file, FastSync replaces any wildcard characters used in RemoteFile with the characters found in the name of the file being sent (after finding a match on the local system). In other words, the command .SEND,*.* AS *.* sends all files on the local system to the remote system. The file names used by the remote system are the same as the file names on the local system. Remember however, that FastSync does not overwrite files and will create a default receive file name if the file already exists on the remote system.

Wildcards In The ".GET,RemoteFile AS LocalFile" Command

Wildcards are used in remote file names with the ".GET" command, but they cannot be used in local file names. If you are expecting more than one file, use a local file name not containing a dot so that the files are numbered sequentially when they are received.

NOTE: The order in which files are sent from the remote system is the order whereby DOS finds a match with the wildcards. There is no way to control the order in which DOS finds a match. If you need to know the order the files are sent back to you, use ".REMOTE,DIR RemoteFile > LocalFile" to get a directory of the files. Use the same file name (including wildcards) for RemoteFile in both the ".GET" and the ".REMOTE" commands. The files in the directory listing are in the same order as the files transmitted by the remote system, since DOS uses the same file allocation tables for both the DIR command and for matching the wildcards.

Back to previous page

RECEIVING FILES

When you are receiving files, there is no need to worry about transparency. FastSync detects transparent mode and treats the file accordingly. However, when receiving files, more file name formats merit concern (they are discussed below).

Receive commands are entered either as function key commands or as dot commands. The F4 function key starts receiving files. After you press the F4 key, you are prompted for the file name.

The dot command format for entering receive commands with the keyboard is:

.RCVE,FileName [(Options)].

File Name Formats For Receiving Files

FastSync does not overwrite files already on the disk unless the "overwrite" options is used. If you enter a receive command and specify a file already existing, an error message is displayed and the received data is written to the default file name, DATAFILE.nnn, where "nnn" is replaced by a numeric suffix starting with "000" and incremented until a file name not already appearing in the directory is created. The newly created unique receive file name is then displayed on the console.

In addition to the safety mechanism for preventing accidental overwriting of files, there are two formats for entering receive file names, with or without a dot (".") in the file name.

If the file name contains a dot, the file name is used the way you entered it unless the file already exists. The dot is used to separate the file name prefix from the extension or to terminate the prefix (create the file without an extension). For example:

.RCVE,MyFile.ext [receives incoming data to MyFile.ext] and

.RCVE,MyFile. [receives incoming data to MyFile].

If you enter a file name without an extension and without a terminating dot, FastSync adds a numeric extension (000, 001, 002, 003, et cetera) to the prefix to create a unique file name. If a file with the same name (same prefix and extension) exists, the numeric extension is incremented and checked to see if there is still a conflict. When a unique file name is created, that file name is used as the receive file name.

Receiving File(s) To The Console (Screen)

FastSync, in addition to receiving files to disk, can receive data either to the screen, or to a printer. The format for receiving a file to the Console (Screen) is:

.RCVE,CONS [CONS is the program's name for CONSOLE (Screen)].

Receiving Files To A Printer

The format for receiving data to the printer is:

.RCVE,LPT1 [for receiving to a PC printer, or]

.RCVE,LPT0 [for receiving to a printer connected to the back of a DCP-88 card].

Options For The .RCVE Command

Similar to the ".SEND" command, there are options that can be added to the end of the ".RCVE" command that affect the default behavior of the command.

More than one option can be used at a time, providing they are not mutually exclusive. The group of options must be surrounded by parentheses, with the first parenthesis separated from the file name by a space. Within the parentheses the options must be separated from each other by a space.

Examples:

.RCVE,FileName (echo) [or]

.RCVE,FileName (noeot)

echo [Echo receives data to the screen at the same time it is being written to the file. This unique feature of the FastSync software allows you to view the data as it is being received].

noetx [Receive all incoming files into one file. Under 3780 protocols, files are separated from one another by an End of Text (ETX) protocol character].

noxlat for receive command.  The received file will be in EBCDIC

Normally, if the receive file name does not contain a dot, a new file is opened when FastSync detects an ETX (End of Text) protocol character. Use of the (noetx) suffix causes the data to continue to be written to the original file until an EOT (End of Transmission) protocol character is received.

nodev [When the "nodev" option follows a receive command, FastSync does not examine the first record of an incoming file for device selection characters. Any device selection characters are written to the data file].

append [When the "append" option follows a receive command, FastSync appends all received data to the end of the named file. If the file does not exist, a new one is created].

overwrite [When the "overwrite" option follows a receive command, FastSync overwrites the existing file with the incoming data].

retries n [Normally an EOT (End of Transmission) signal indicates the remote computer has no more data to send. Some 3780 software available on mainframes sends an EOT after the line bid while waiting for the operating system to make a data file available, even though an EOT means that there is no data to send].

If the "retries n" parameter is used (with a number in the range of 2 - 256 in place of the "n"), FastSync ignores any EOT following the line bid up to n times.

max nnn [Normally, FastSync receives files until it detects an EOT (End of Transmission). When an ETX (End of Text) is detected, the current file is closed and a new file is opened. The "max nnn" command allows you to limit the number of files so that you can direct data to different file names. For example, if the remote sends a response file and then the data file with no EOT between them, the following command sequence allows you to use one file name for the response and another for the data: .RCVE, Response (max 1) or .RCVE, Datafile].

iferr nnn [This option allows you to target an error routine to be executed if the command fails. It has the same effect as using an ".IF...Then .GOTO nnn" statement in the command file immediately after the ".RCVE" command].

Substitute a numeric label for the "nnn" in the option. If the command fails, execution resumes with the statement following the label.

formfeed [The "formfeed" option is used when receiving files to a printer. A command is sent to the printer to advance to the beginning of the next page before FastSync begins printing the incoming file].

start ByteCount [When this parameter is used, FastSync begins writing data to the file at the specified location in the file (assuming the file exists). If the file length is greater than the specified start position, data written to the file overwrites the existing data from the start position. The option is similar to the "append" option in that the data is written to a pre-existing file].

Back to previous page

AUTODIALING

The ".CALL" command uses the autodialing feature of modems that have this capability and are supported by FastSync.

If you used the SETCARD.EXE program to select a modem type NOT having an autodial feature or not currently supported by FastSync as an autodial modem, you will be prompted to manually dial the phone number.

Autodial Modems

Here are a few external modems supporting the SADL autodial standard: UDS 201c/d & 208b/d modems; Racal-Vadic 4850PA & 9650PA modems; and the OKIDATA 4800 CLD modem.

While only a few external synchronous modems support Autodial, all internal synchronous modems support both Auto Answer and Autodial.

Almost all known V.32 type modems support some type of autodialing. Typically, they support the "Hayes AT" asynchronous dialing commands or the international V.25bis synchronous autodialing standard. Some V.32 modems however, do not support synchronous communications.

If you have any questions about using your particular autodial modem with FastSync, contact CTI.

Autodial Calling Format

The command format is:

.CALL,PhoneNumString [(Option)]

PhoneNumString may have any of the dialing characters described below:

0 through 9 [dial digits]

A,B,C,D,*,# [valid tone digits]

, (comma) [force dial tone check]

: (colon) [5 second pause]

T [force tone dialing]

P [force pulse dialing]

F [force on-line with no answer tone]

slash, dash, parentheses, and period [you can include these characters to improve readability of the command, e.g., 248-540-4600]

Options for the ".CALL" command are:

(Retries nn) [controls the number of times the program tries to dial the number if it detects a busy signal or gets no answer. The "nn" is your number of retries. If the optional (Retries nn) parameter is NOT included, the program defaults to 3 retries].

Error nnn or "iferr nnn" option [instructs FastSync to jump to the line in the command file starting with the numeric label you use in place of "nnn" if there is no answer tone].

Example:

.CALL,1-810-594-4736 (retries 4) [dials the number until an answer tone is detected, or until four attempts to connect are made].

Back to previous page

SIGNING-ON TO THE REMOTE SYSTEM

If you requested automatic sign-on when you ran the program RJECFG.EXE, FastSync signs-on for you automatically whenever:

1. You use a .SEND command,

2. You use a .SENDB command,

3. You use a .CONNECT command, or

4. You use a .RCVE command.

You can also send your sign-on record with the command: .SIGNON [sends the contents of the sign-on record you entered during configuration].

NOTE

If you will be communicating with more than one remote system, it is usually easier to put your sign-on into separate files and send the files rather than changing configurations each time you want to change sign-on.

Terminal Identification

Some remote systems require that you send terminal identification bytes before the initial ENQ (Enquiry) or ACK0 during the line connect sequence. Terminal Identifications are entered as part of the configuration process, or with the ".TERMID" command. See the chapter with the alphabetical listing of COMMANDS for more information about the ".TERMID" command.

AWAITING INCOMING CALL

As mentioned earlier, internal modems from CTI automatically answer any incoming calls. However, this default method of answering calls is not satisfactory when running a command file, since FastSync executes commands in the command file without waiting for the modem to answer a call. In addition, if the telephone line is not connected, send or receive commands time out and are never executed.

The ".WAIT" command provides a way around this. When FastSync encounters a ".WAIT" command, it waits for an indication from the modem that an incoming call is detected. If you want to prevent the program from remaining in auto answer mode indefinitely, add a maximum time to wait for the incoming call to the ".WAIT" command.

If the time entered expires, the program marks the ".WAIT" command as completed, but the variable, CONNECTED remains set to false. If your command file uses an ".IF" command (discussed later) to check the value of CONNECTED, you can take appropriate action should the call fail to come in.

The format for the ".WAIT" command is:

.WAIT[,mmm] [(iferr nnn)] [where "mmm" is the time (in minutes) to wait for an incoming call].

If the optional "iferr nnn" is used, FastSync jumps to the command file entry that begins with the numeric label you substitute for "nnn."

Back to previous page

CONTROLLING THE MODEM

There are several commands that give you control over the modem. The modem is placed into DATA mode or into TALK (voice) mode through keyboard commands although this is done automatically during the execution of FastSync. A special ".MODEM" command is also available to provide even more control over selected modems.

To place the modem into DATA or TALK mode, use the ".DTR" command as follows:

.DTR,ON [places the modem into DATA mode, and]

.DTR,OFF [places the modem into TALK (Voice) mode].

NOTE

The modem is normally placed into DATA mode whenever the program is started. The modem is normally placed back to TALK (Voice) mode when you exit the program.

Special features of some modems (NOT the Hayes OPTIMA modems) are activated through the ".MODEM" command. The examples shown below demonstrate a few of these features:

.MODEM,201 [places a dual speed modem into 201 (2400 bps) mode]

.MODEM,RS232 [hh] [if the optional "hh" is used, the two digit hex code for the external modem should replace "hh"]

.MODEM,HEX HexString [sends HexString to the modem]

.MODEM,AUTO [puts the SyncPack model 2020 (not the SyncPack2000e) into "auto" mode. In auto mode, the SyncPack automatically detects whether the remote modem is 201, 208 or V.32 and adjusts itself accordingly]

CONNECTING TO THE REMOTE SYSTEM

Connection to the remote system is normally done automatically whenever you enter a ".SEND," ".SENDB," ".RCVE," ".MESSAGE" or ".SIGNON" command. You can however, cause FastSync to send a line bid to the remote system (connect with it) by entering the ".CONNECT" command:

.CONNECT [causes FastSync to send line bids to the remote system]

Back to previous page

SENDING AN EOT (End of Transmission)

An End of Transmission (EOT) protocol byte is normally sent to the remote system automatically after a ".MESSAGE," ".SEND" or ".SENDB" command, but is suppressed with either the "(noeot)" or "(noetx)" command line option after the file name.

If you use the "(noeot)" option to suppress the EOT with the last file name, you can send an EOT with the ".SENDEOT" command:

.SENDEOT [sends an End of Transmission (EOT) protocol byte to the remote system]

Back to previous page

CONTROLLING THE DISPLAY SCREEN

With the normal FastSync display, the top half of the screen contains status and configuration information. Operator messages appear in the lower half and "scroll off" when they reach the top half of the screen. You can suppress the status and configuration display in the top half of the screen, thereby allowing operator messages to scroll up the entire screen and thus remain visible longer.

The on/off switch for the "status and configuration display" in the top half of the screen is the F8 key or the keyboard command ".CLS." Pressing the F8 or entering ".CLS" causes the top half of the screen to blank, suppressing the normal FastSync display. Pressing F8 or entering ".CLS" again, restores the normal FastSync display.

There is also a command line option that makes the entire screen invisible, the ".quiet" (Quiet Mode) command. See Chapter 4 under Command Line Options for more information regarding the ".quiet" command.

NOTE

When using the ".quiet" option, you should also use the report file option on the command line so that you have a record of any operator messages which would have been displayed.

Finally, there are special commands that display a message on the screen, even in Quiet Mode. The ".ECHO" command displays whatever message follows the command.

.ECHO,This is a User Message [displays "This is a User Message"]

The ".PROMPT" command displays whatever message follows the command and waits for you to press a key in response:

.PROMPT,Press Any Key [displays the message "Press Any Key" and waits for a key to be pressed]

When used with the ".IF" command (discussed later), the ".ECHO" and ".PROMPT" commands are used to customize the information seen on screen, even in Quiet Mode! The key pressed in response to the ".PROMPT" command is checked through the ".IF" command.

DEFAULT PRINTER AND PUNCH DEVICE NAMES

Device selection is a feature of 2780 and 3780 protocols which is a holdover from days past when these protocols were used to communicate with key punches and card readers. Using device selection, files could be directed from a card reader to a printer for creating hard copies of data or to a key punch for creating decks of punch cards.

Although key punches and card readers are meaningless on IBM PCs, some hosts still use device selection characters when sending files. Some third party software is designed to make use of these device selection characters.

The default for FastSync is to strip off device selection characters and treat all incoming files as print files by adding a Carriage Return/Line Feed after each record. The default can be overridden with special commands discussed below.

The ".PUNCH" command enables FastSync to receive punch files as punch files by padding all incoming records to 80 characters and out-putting fixed length records without Carriage Return/Line Feed combinations. The format for the ".PUNCH" command is:

.PUNCH,ON [punch files have fixed length records and no CR/LF, or]

.PUNCH,OFF [punch files have variable length records and include CR/LF, or]

.PUNCH [the current setting is reported]

In addition to the keyboard commands, a ".punch" on the command line turns PUNCH ON (default is PUNCH OFF).

FastSync also allows you to specify that all files received from the remote system containing punch or printer device selection bytes are written to special file names.

To assign all incoming files containing Punch Device selection characters to a special file name, use the command:

.PUNDEV,FileName [causes all incoming Punch Files to be written to FileName.000, FileName.001, et cetera, or]

.PUNDEV,OFF [turns off the automatic naming of incoming Punch Files, or]

.PUNDEV [causes FastSync to report the Punch File Name or OFF].

To assign all incoming files containing Printer Device selection characters, use the command:

.PTRDEV,FileName [causes all incoming Printer Files to be written to FileName.000, FileName.001, et cetera, and]

.PTRDEV,OFF [turns off the automatic naming of incoming Printer Files, and]

.PTRDEV [causes FastSync to report the Printer File Name, or OFF].

A file name entered after either the ".PTRDEV" or ".PUNDEV" command should be a file name prefix only. This allows FastSync to create unique numeric suffixes for the file name.

The default printer or punch file names override the receive file name entered in the ".RCVE" command.

Back to previous page

BUILT-IN LINE MONITOR (Solves Line Problems)

FastSync contains a built-in line monitor that provides a hexadecimal listing of all data and protocol bytes sent and received. Such listings are invaluable when solving communication problems.

The format for invoking the built-in line monitor is:

.TRACE,TraceFileName [writes all line activity to TraceFileName, or]

.TRACE,ON [starts the line monitor after prompting you to enter a TraceFileName, or]

.TRACE,OFF [turns off the line monitor].

In addition to the dot commands for starting a line monitor, you can also invoke the trace facility by entering ".trace(TraceFileName)" on the command line when starting FastSync. For example: fastsync .trace(test.trc).

CONTROLLING CARRIAGE RETURNS/LINE FEEDS

IBM 2780 and 3780 protocols define a data block as consisting of one or more data records. If there is more than one data record in a data block, the records are separated by an Inter Record Separator (IRS) in 3780 or an Inter Unit Separator (IUS) in 2780 mode. Some third party software expects each record in the receive file to end with a CR/LF. Other third party software expects the CR/LF to be suppressed.

FastSync gives you several ways to control when and whether a CR/LF is written to the file when receiving data. There are individual commands to control whether a CR/LF is substituted for IRS/IUS, or for ETB (End of Transmission Block).

To control CR/LF substitution for IRS or IUS:

.IRS,ON [substitutes CR/LF for IRS or IUS, or]

.IRS,OFF [does not write CR/LF for IRS or IUS also suppresses transmission of IRS, or]

.IRS [reports the current state].

To control CR/LF substitution for ETB (End of Transmission Block):

.ETB,ON [substitutes CR/LF for ETB, or]

.ETB,OFF[does not write CR/LF for ETB, or]

.ETB [reports the current state].

In addition, the ".CRLF" command is used to control Carriage Return/Line Feeds. See the ".CRLF" command in Chapter 6 for the correct Unix/Xenix syntax.

.CRLF,IRS ON [substitutes CR/LF for IRS or IUS]

.CRLF,IRS OFF [does not write CR/LF for IRS or IUS]

.CRLF,IRS [reports the current state]

.CRLF,ETB ON [substitutes CR/LF for ETB]

.CRLF,ETB OFF [does not write CR/LF for ETB]

.CRLF,ETB [reports the current state]

.CRLF,NL ON [substitutes CR/LF for New Line Characters]

.CRLF,NL OFF [does not write CR/LF for New Line Characters]

.CRLF,NL [reports the current state].

Back to previous page

COMMAND FILES

Command files (also called Batch files, Job Files, or Script files) are files with sequences of valid FastSync keyboard commands. You create these files with a text editor such as EDIT.COM that comes with DOS, or the VI editor program that comes with Unix/Xenix.

Command files are very useful when you want to execute the same sequence of commands a number of times. If you put commands into a command file, you can execute them later simply by running the command file rather than by typing each command individually.

The FastSync program allows you to run a command file from within another command file. Although control does not return to the earlier command file, this capability is useful to application software houses.

Three Methods To Run Command Files

There are three ways to run a command file:

1. You can include a ".cmd" followed by the command file name in the command line. The command file starts running right after the program begins. For example: fastsync .cmd(test.cmd).

2. You can also start command files by pressing F6 and entering the name of the command file at the prompt: F6 test.cmd

3. Or, you could use the keyboard command ".CMD" by typing in: .CMD,CommandFileName

Comments In Command Files (A Special Feature)

Any line in a command file beginning with an exclamation point ("!") is considered a comment and is neither displayed nor executed by FastSync.

FastSync allows very complex operations to be performed by command files. It is a good idea to document these operations so that you (or your successor after your promotion) can understand what you are doing with these advanced commands. By including comments in your command files, the documentation is readily available to anyone trying to understand the contents of the command file.

In particular, you should include comments with any ".IF," or ".SHELL" commands as well as describing the anticipated contents of any variables in the command file. In the following command file, lower case letters are used in comments to further distinguish them from command file commands (upper case is also satisfactory). The following command file example includes comments:

! answer the telephone

.WAIT,10

! receive the first record

.RCVE,SIGNON

! see if the SIGNON is valid

.SHELL,CHK_SGON.EXE

! if the shell exit code = 0, the signon is valid

! so go ahead and receive the file

.IF, SHELL = 0 .RCVE,DATAFILE

! now exit

.EXIT

Special Command File Commands

There are several commands (like the ".IF" command) that only make sense in a command file, although they are entered from the keyboard. Normally, entries in a command file are executed sequentially. Use of special commands actually allows FastSync to check the results of the last operation and go to a different section of the command file based upon those results.

Labels In Command Files

Numeric labels provide a way to identify lines in a command file. All commands in a command file can be preceded by a sequence of up to three numeric digits (characters '0' thru '9'). These digits provide a "target" when you want to use a ".GOTO" command. Labels (line numbers) are used in the explanation of the ".IF" and ".GOTO" commands.

Variables In Command Files

The use of variables in FastSync is a very powerful feature. Variables are used anywhere in a command file if portions of a command are not known when the command file is developed. The value that substitutes for the variable during execution is either read from a file, read from the DOS command line, read from keyboard input you entered or, in some cases, created by FastSync.

There are three types of variables: user-defined variables are given values with explicit commands, percent variables are given values from the DOS command line, and system variables are pre-defined by FastSync.

User-Defined Variables

User-defined variables are only used in command files. Since the value of a variable should be known when FastSync is used in interactive mode, variables are not accepted once commands are entered from the keyboard. The value of a variable replaces the variable name after the command is read from the command file and before the command is actually processed, so you can use variables anywhere in a command, even as the key word for the command!

User-defined variables are always preceded by the "@" character when they are used in a command, but not when they are given a value. Read the "@" character as "the value of" when reading command files. User-defined variables are given a value with the ".SET," ".READ" or ".CONSOLE" commands. There are two types of user-defined variables. String variables are identified with a preceding "$" and numeric variables are preceded by a leading "#" character.

There are three ways to declare a user-defined variable and to give it a value. You can use the ".SET" command to declare the value as follows:

To give the variable $TEST the value of "fun," use the command:

.SET,$TEST = fun

Later, when you want to use the value of the variable, $TEST, precede the variable name with the "@" character for example:

.ECHO,Using Variables is @$TEST, prints out the text string: "Using Variables is fun"

The percent variables can be combined with user-defined variables as follows:

.SET,$VARIABLE = %3

It is also important to note that there is a trailing space after the variable name in the ".SET" command. This space is required, since the space character is used by FastSync to determine the end of a variable name.

You can use the ".READ" command to declare and give the variable a value:

.OPEN,1,VARIABLE.DAT [and then]

.READ,1 $VARIABLE

Or you can use the ".CONSOLE" command that allows you to enter the value of the variable at run time:

.ECHO [enter the value of the variable...press <ENTER> when done]

.CONSOLE,$VARIABLE

String And Numeric Variables

Up to twelve string or numeric variables are created with keyboard commands, either interactively or through a command file by using either the ".SET," ".READ" or a ".CONSOLE" command. Each variable name is up to twelve characters long. String variables can have a maximum length of 80 characters.

String variables are declared by preceding the variable name with a dollar sign ("$"). Numeric variables are declared by preceding the variable name with a number sign ("#"). The value assigned to a string variable can contain spaces and continues to the end of the command. Numeric variables have a maximum value of 65,536.

Portions of variable strings (substrings) can also be used. Whenever a variable is used in a command, a substring of the variable is indicated by enclosing the starting and ending position of the substring in parentheses. Separate the starting and ending positions with a colon. The first position in the original string is position zero. For example, if the variable $TEST_VAR is set to equal "This is a test string," the following results are obtained with the ".ECHO" command:

.ECHO, @$TEST_VAR (0:3) [displays "This," and]

.ECHO, @$TEST_VAR (10:13) [displays "test"].

This method of extracting substrings can also be used with the ".SET" command. For example, ".SET, $VARIABLE = @$TEST_VAR (10:13)" gives the variable $VARIABLE the value of "test."

The INSTRING operator is provided for use with the ".SET" command to allow substrings to be extracted from string constants and percent variables passed from the DOS command line. The INSTRING operator can also be used with previously defined variables. For example, the command, ".SET, $VARIABLE = INSTRING (10:13) @$TEST_VAR" gives the variable $VARIABLE the value of "test."

The Percent (%) Variable

Percent variables are used within a command file by using a "%" sign, followed by a number referencing the position of the variable in the list of variables that follows the command file name on the DOS command line.

Percent variables contain two parts, the percent sign ("%") and a number referencing the position of the variable in the list of variable arguments that follows the command file name. For example, "%1" references the first variable, "%2" references the second variable, and so forth.

To illustrate this concept, assume that the command file, TEST.CMD appears like this:

.CALL,%1

.SEND,%2

.RCVE,%3 (%4)

.EXIT

On the DOS command line, the example command file above is invoked with the command line:

FASTSYNC .CMD(TEST.CMD) (540-0468 LOGON.DAT RECEIVE.FIL ECHO)

The values for the variables %1, %2, %3 and %4 follow the command file name (TEST.CMD). The entire variable list must be enclosed in parentheses. Spaces are used to separate variables, so percent variables cannot include spaces. If you need to use spaces, the spaces must appear in the command file, not in the variable.

Since parentheses are used to mark the beginning and end of the variable list, they cannot appear in the variable.

The telephone number "540-0468" replaces %1 in the command file. The file name "LOGON.DAT" replaces %2. The file name "RECEIVE.FIL" replaces %3 and the string "ECHO" replaces %4. The command file, TEST.CMD, looks like this if the percent variables are replaced with the variables below:

.CALL,540-0468

.SEND,LOGON.DAT

.RCVE,RECEIVE.FIL (ECHO)

.EXIT

System Variables

System variables are pre-defined by FastSync and, like user-defined variables, are always preceded by the "@" character when they are used in a command. There are six system variables:

@DATE [The current system date on the PC]

@TIME [The current system time on the PC]

@BLOCKS [The number of blocks sent or received in the last ".SEND," ".SENDB" or ".RCVE" command]

@BYTES [The number of bytes sent or received in the last ".SEND," ".SENDB" or ".RCVE" command]

@LAST_FILE [The name of the last file sent or received]

@RECORDS [The number of records sent or received in the last ".SEND," ".SENDB" or ".RCVE" command].

Conditions Where You May Want To Use Variables

So now that you know how to use variables, you are probably wondering why use them. There are many conditions where you might want to use variables. Below, we mention a few of them.

Suppose that you are sending files around the country. Some people have to dial the area code when they call the remote computer, while others do not use an area code. You can put the phone number into a "control" file and then use the ".READ" command to read the variable. You could then change the phone number without attempting to change your command file.

If you do not know in advance what (or how many) files will be sent, you could put the list of files into a file and again use the ".READ" command to read the list of files. You could use the "error" option on the ".READ" command to branch around the ".SEND" command when the end of the file is reached.

Or your customer might not want their password stored in a file for anyone to read. You could use the ".CONSOLE" command to enter the password manually. Please note that if you do this you should prompt for the password before dialing the remote system so a slow typist does not cause the remote system to "time out" while waiting for the password.

You might have a text file with comments to send to a remote system that does not want to receive the comments. You could use the ".READ" command along with the ".IF" command to check the contents of each line before sending the line with the ".MESSAGE" command (use the variable name in place of the text string normally used with the ".MESSAGE" command).

There are many other uses for variables. They could be used to create JCL files containing variable information, they are used to create custom report files, and so forth. In general, use variables when an item in a command file is subject to change.

Back to previous page

The ".IF [..THEN]" Command

The ".IF" command is a very powerful command designed to give greater control over the execution of command files. The syntax of the ".IF" command is complex. In order to make understanding the syntax as easy as possible, the following conventions are used when the syntax of the command is given. The general syntax for the ".IF" command is:

.IF, [NOT] Condition [THEN] .Command

where:

The command word ".IF" is required.

"NOT" is optional. When used, this means that the condition is satisfied if it evaluates as false.

Condition is either a single word or a phrase. Allowable Conditions are listed later. If just a single word is used, FastSync assumes that the remainder of the phrase is "= TRUE." Some conditions test for values other than true or false. When the condition tests for a value other than true or false, the symbols "=" (equals), "<" (less than) or ">" (greater than), along with a value to be tested against, are used.

The word "THEN" is optional. It has no effect on FastSync's evaluation of the ".IF" command, but is used to improve readability.

".Command" is any FastSync command. Note that the leading dot is required.

CONDITIONS CHECKED BY THE ".IF" COMMAND:

ANSWERTONE [evaluates to TRUE if an answer back tone was detected after dialing the remote modem]

BUSY [evaluates to TRUE if the ".CALL" command was not completed because a busy signal was detected at the remote system]

CARRIER [evaluates to TRUE if a data carrier is present on the line]

COMPARE Variable [(nn:nn)] = UserString [compares any user-defined Variable with UserString]

CONNECTED [evaluates to TRUE after a successful line bid sequence]

DIALTONE [evaluates to TRUE if a dial tone was detected while calling the remote system through compatible autodial modems]

DIALERROR [evaluates to TRUE if the attempt to call the remote modem was not successful]

DLE_EOT [evaluates to TRUE if a DLE-EOT (hangup) protocol sequence was received from the remote system]

EOT [returns TRUE if the last receive operation ended with an End of Transmission (EOT) received from the remote system]

ERROR [becomes TRUE if an error prevented the successful completion of a ".SEND," ".SENDB," ".MESSAGE," ".RCVE," ".CALL" or ".WAIT" command]

EXIST_FILE FileName [evaluates to TRUE if "FileName" exists on the disk]

FILENOTFOUND [evaluates to TRUE if FastSync was unable to find the specified file]

FILES_RCVD {= | < | >} N [contains the number of files received as a result of the last ".RCVE" command]

FILES_SENT {= | < | >} N [contains the number of files sent as a result of the last ".SEND" command (especially useful when wildcards are used in the file name)]

FILESIZE FileName {= | < | >} S [contains the size of the specified disk file]

IOERROR [evaluates to TRUE if an I/O error was encountered writing the received data to the disk, screen or printer]

KEY = ? [checks the key struck in response to the last ".PROMPT" command. The test is not case sensitive. Use the actual letters you are testing for in place of "?"]

LAST_FILE [=] FileName [contains the name of the last file received from the remote system]

LAST_SUFFIX = String [evaluates to TRUE if the suffix of the last file received matches String]

LASTFILESIZE {= | < | >} ? [compares the size of the last file received against the value specified in place of the question mark]

LIMIT [evaluates to TRUE if the bid limit, retransmission limit or receive limit is exceeded]

NOBID [evaluates to TRUE if the remote system did not respond to the line bid]

NOCARRIER [returns TRUE if a carrier signal is not present on the data line]

RCV_ERROR [evaluates to TRUE if an error prevented FastSync from completely receiving a file]

RECORDS {= | < | >} nn ... [the number of records sent or received as a result of the last ".SEND," ".SENDB" or ".RCVE" command]

RMT_HANGUP [evaluates to TRUE if a DLE-EOT (Data Link Escape - End of Transmission) was received from the remote system]

RVI [evaluates to TRUE if a reverse interrupt was received from the remote system]

SHELL = ? [checks the exit code of the last program executed through the ".SHELL" command and jumps to LABEL if the exit code matches the code being tested. Use the actual letters you are testing for in place of "?." Applies to DOS users only]

SND_ERROR [evaluates to TRUE if an error prevented FastSync from completely sending a file]

STRLEN VariableName { = | > | < } [takes a string variable as an argument. The string variable is either a percent variable or a variable created with either the ".SET," ".CONSOLE" or ".READ" command]

TEXTDATA [evaluates to TRUE if the last file received was in text mode]

TIMEOUT [evaluates to TRUE if the transmit or receive timeout limit is exceeded]

TRANSDATA [evaluates to TRUE if the last file received was in transparent mode].

Back to previous page

The ".GOTO" Command

The ".GOTO,nnn" command causes FastSync to find the label "nnn" in the command file and execute the command there.

The sample command file listed below makes use of the ".IF" command and some of the other commands discussed above. The command file first puts the SyncPack 2020 modem into Bell 201 (2400 bps) mode, then attempts to dial a number and send a log-on file. If the dial command (or the attempt to send the file) fails, the modem is put into 208 (4800 bps) mode, a second number is dialed and the command file again attempts to send the log-on file. If either attempt to send the log-on file succeeds, another file (a data file) is sent and the program ends. If the second attempt to send the log-on file fails, the program is ended without sending the data file.  Note - the above example will not work with the SyncPack2000e (Hayes OPTIMA modem) since it does not support either the Bell 201 or Bell 208 standards.

Sample command [.CMD] file:

COMMANDS

.DTR,OFF [makes sure the modem is not on-line (off-hook)]

.MODEM,201 [set up SyncPack 2020 modem as 2400 bps]

1.CALL,594-4736 (Retries 3) [autodial command]

.IF,NOT ANSWERTONE .GOTO 22 [if autodial failed, go to 22]

.SEND,LOGIN.DAT [send the file LOGIN.DAT]

.IF,SND_ERROR .GOTO 22 [jump to 22 if file not sent]

.GOTO 33 [jump to 33]

22.DTR,OFF [put the modem into talk/voice mode]

.DTR,ON [put the modem into data mode]

.MODEM,208 [set up SyncPack 2020 modem as 4800 bps]

.CALL,3224448 (Retries 3) [dial this phone number]

.IF, NOT ANSWERTONE .GOTO 99 [jump to 99 if file not sent]

.SEND,LOGIN.DAT [send the file LOGIN.DAT]

.IF, SND_ERROR THEN .GOTO 99 [jump to 99 if file not sent]

33.SEND,FILE.DAT [send the file FILE.DAT]

99.EXIT [exits the program].

Back to previous page

RENAMING AND ERASING FILES

Disk files are renamed with the ".RENAME" command, or they are erased with the ".ERASE" command. These two commands operate the same as their equivalent DOS commands:

.RENAME,FileName1 FileName2 [gives FileName1 the name of FileName2. If FileName2 already exists or if FileName1 cannot be found, an error message is displayed and the ".RENAME" command fails]

.ERASE,FileName [deletes FileName. If FileName cannot be found or if the erase command fails (i.e., if a write protect tab prevents the erasure) an error message is displayed].

USING SYSTEM COMMANDS WITHIN FastSync

System commands and other programs are executed while FastSync is connected to a remote system. There are three ways to access your operating systems commands from within FastSync:

1. with the ".DOS" (for DOS users) or with the A.sh@ (for Unix/Xenix users) keyboard command,

2. by pressing function key F7, or

3. with the ".SHELL" command.

If you press F7, the FastSync screen is cleared and your normal DOS screen appears. You can execute any commands or programs that fit into the remaining memory on your computer. To return to FastSync, type in "EXIT."

To execute a program or system command and return immediately to FastSync, follow the keyboard command, ".DOS" [or .sh], with the name of the command or program. The example below is for DOS users:

.DOS,DIR *.* [displays a directory and returns immediately to FastSync. NOTE: since you return immediately after the command, you should, in this case, add the /p (pause) parameter -- .DOS, DIR*.*/p] and

.DOS,EDIT FileName [runs the DOS Edit program for FileName. You are returned to FastSync when you enter "EXIT"].

The ".SHELL" command is used with programs only (not DOS commands). The complete program name including the ".EXE" or ".COM" extension must be specified. For more information about the ".SHELL" command, see the Alphabetical Listing of all Commands in Chapter 6.

If there is not enough memory to run the requested program, or if your computer does not have enough available memory to create a DOS shell, an error message will be displayed.

Back to previous page

REMOTE CONTROL COMMANDS

There are several options available when FastSync is being used to communicate with another system running FastSync. You can send a file and specify the name the remote system uses when receiving the file (Remote Naming). You can also ask the remote system to send a specified file (Remote File Request). You can even execute DOS commands and some programs on the remote computer and have the screen output sent back to you (Remote Access).

Before we discuss the remote commands, however, we should discuss the ".UNLOCK" command. This command sets an internal flag that allows remote computers to use DOS on your computer. If you do not set the UNLOCK flag with either an ".unlock" command line option when FastSync is initially started or with the ".UNLOCK" command, the remote computer cannot use DOS on your computer.

The UNLOCK flag has one additional effect. Normally, FastSync waits for three line bids from the remote computer before responding with a positive acknowledgment and using the default file name (DATAFILE.nnn) to receive data the remote might be trying to send. This delay is provided to give you time to enter a ".RCVE" command so that you can supply a receive file name. If the UNLOCK flag is ON, however, FastSync responds to the first ENQ.

To set the UNLOCK flag from the command line, include ".unlock" on the command line. Of course, you can still include other parameters on the command line. To use the ".UNLOCK" command when FastSync is running, enter:

.UNLOCK,ON [allows the remote computer to run DOS commands or programs on your computer or responds to the first incoming ENQ]

.UNLOCK,OFF [prevents the remote computer from running DOS commands or programs on your computer. Also, delays for three ENQs before going into receive mode automatically]

.UNLOCK [reports the current state of the UNLOCK flag].

Remote Naming

With this feature you can specify what name the remote FastSync system uses when receiving a file. The file name you provide in the special REMOTE NAMING record overrides the default receive file name or any file name entered by the operator at the remote system.

REMOTE NAMING is actually an option on both the ".SEND" and the ".SENDB" commands. The ".SEND" command sends a text file, and ".SENDB" sends a binary file. After the name of the file you wish to send, add a space, the key word, "AS," another space, and the file name to be used by the remote system. For example:

.SEND,MyFile AS YourFile [sends the text file, MyFile from the local system to the remote system where it is received as YourFile]

.SENDB,MyFile AS YourFile [sends the binary file, MyFile from the local system to the remote system where it is received as YourFile].

Remote File Request

REMOTE FILE REQUEST allows you to ask a remote FastSync system to send you a specified file. These files are always returned in binary mode so that you receive an exact copy of the file as it exists on the remote system.

The ".GET" command is used to request files from the remote system. The syntax is:

.GET,YourFile AS MyFile [asks the remote system to send YourFile and receive it as MyFile].

The normal options for the receive file name are included as options for MyFile. For example, you could add the option "(echo)" after "MyFile" to have the incoming data appear on the screen as well as written to MyFile.000.

Remote Access

REMOTE ACCESS gives FastSync users access to operating system resources and programs on remote computers using FastSync. This feature is very valuable when technical support is being provided either by CTI or by a software company using FastSync as part of their product.

There is a limitation on the use of REMOTE ACCESS. Interactive commands or programs that prompt you for input and then wait for that input cannot be run using REMOTE ACCESS. This is because a REMOTE command that includes a request for the program's screen output to be returned prevents that program from sending messages to the screen. Without messages prompting you for input, there is no way of knowing what input to expect.

REMOTE ACCESS is invoked with the ".REMOTE" command. The command or program name that you want to have executed on the remote computer follows the comma after ".REMOTE." If you want the results of the command sent back to you, follow the command name and parameters with a space, a greater than sign (">"), another space and the name of the file that is to receive the results. The syntax for the command is:

.REMOTE,DIR *.* > MyFile [asks the remote system to execute the DOS command DIR *.* and send the results back to a file called MyFile]

.REMOTE,DIR *.* > MyFile (echo) [asks the remote system to execute the DIR command and send the results back to a file called MyFile. The directory information is displayed on the screen when it is written to the file (echo option)]

.REMOTE,DIR *.* > CONS [asks the remote system to execute the DIR command and send the results back to your system's monitor console. The results are displayed only on the screen (CONS) and not written to a file]

.REMOTE,BOX message [uses the program BOX.COM (included as part of your FastSync install procedure) to display a message. Since there is no "greater than" symbol (">"), the output is displayed only on the remote computer and returned to you].

For example, to leave a message on the screen that looks like this:

WE HAVE LOOKED OVER YOUR COMPUTER SYSTEM

AND HAVE FIXED YOUR PROBLEM

HAVE A NICE DAY

enter the following command:

.REMOTE,BOX WE HAVE LOOKED OVER YOUR COMPUTER SYSTEM & AND HAVE FIXED YOUR PROBLEM & HAVE A NICE DAY

NOTE: The "&" sign converts to a carriage return when used with BOX.COM.

Back to previous page

STOPPING AND EXITING FastSync

The ".STOP" command is provided as a way to interrupt the command or command file currently in progress. If, for example, you entered a ".CALL" command and then realized that you were dialing the wrong number, you can enter either the ".STOP" keyboard command or press the F9 key to stop the ".CALL" command.

If you want to terminate a command file but do not wish to leave FastSync, again either press F9 or enter the ".STOP" command to terminate the command file.

The ".EXIT" command ends the execution of FastSync. You can either enter the keyboard command, ".EXIT" or press F10.

There are occasions when FastSync cannot check for keyboard input because it is busy processing incoming characters and does not have the time to keep checking the keyboard. In most of these cases, hold down the CTRL key while pressing either the BREAK key or the "C" key. The combination of CTRL and BREAK or CTRL and C have special meanings to DOS. FastSync alters the address of the routine DOS normally uses to process these keys and ends gracefully.

Back to previous page

CONFIGURATION OPTIONS

There are two general ways to change the FastSync configuration after the program has started:

1. you can load an entirely new configuration file or change the default configuration file and load the changes, or

2. you can change configuration parameters one at a time.

To load a new configuration file, follow the ".CFG" command with a file name . To change the default configuration file and load the changed file, use the command ".CFG" without a file name.

.CFG,NewConfigFile [loads NewConfigFile as the new configuration file]

.CFG [calls up the configuration program and gives you an opportunity to make changes. When you finish with the configuration program, the altered configuration file is read into memory].

Alternatively, all of the configuration parameters can be changed individually while FastSync is running. The special configuration commands all work basically the same way. If parameters do not follow the command, the current value is displayed. If parameters do follow the command, the current value is changed to the new value and a message is displayed. The following commands change the value of individual configuration parameters:

.BIDS [This command allows you to change the bid retry count listed in the configuration file. The current setting is shown in the LIMITS window on your screen as Line Bids].

The syntax for this command is: .BIDS,nn [where nn is the new Bid Retry Count].

.BLOCKSIZE [This command allows you to change the block size listed in the configuration file].

The syntax for this command is: .BLOCKSIZE,nnnn [where nnnn is the new block size].

.CMPRES [This command controls whether space compression is on or off for files being sent (transmitted). This command is very useful when the remote system requires a signon that does not use space compression but accepts files that use space compression after the program has signed on to the host computer. The ".CMPRES" command is entered either from the keyboard interactively or through a command file]. The syntax for the ".CMPRES" command is:

.CMPRES,ON [turns space compression on, or]

.CMPRES,OFF [turns space compression off].

As indicated above, the space compression parameter only affects files being transmitted by FastSync. However, when the program is receiving text files, any space compression being received is automatically converted to the appropriate number of spaces, regardless of whether space compression is on or off.

.EMULATOR [This command allows you to change the emulator type (2780 or 3780) listed in the configuration file]. The syntax is:

.EMULATOR,2780 [puts FastSync into 2780 mode, or]

.EMULATOR,3780 [puts FastSync into 3780 mode].

.MULT_RECS [This command allows you to change the setting for Multiple Records Per Block from the value in the configuration file. The syntax for this command is:

.MULT_RECS,ON [transmits Multiple Records Per Block, or]

.MULT_RECS,OFF [transmits a Single Record Per Block].

.RECSIZE [This command allows you to change the maximum transmission size]. The syntax for this command is:

.RECSIZE,nnn [where nnn is the record size].

.RETRANS [This command allows you to change the Retransmissions value listed in the configuration file]. The syntax for this command is:

.RETRANS,nn [where nn is the Retransmissions value].

.TERMID [This Terminal ID command allows you to change or check the current value of the Terminal ID. Terminal IDs can consist of up to six alpha/numeric characters and are used in place of signon cards with some hosts to identify the remote 3780 emulator. During the line bid sequence, the Terminal ID precedes the line bid (ENQ) and the response to the line bid (ACK0).

If this command is not followed by a comma, FastSync reports the current value of the Terminal ID. If the command is followed by a comma, the alpha/numeric string that follows becomes the new Terminal ID. Note that Terminal IDs are translated from ASCII to EBCDIC before transmission to the host].

.TERMID [reports the current value of the Terminal ID]

.TERMID,123456 [changes the Terminal ID to the string "123456"]

TERMINAL [This command allows you to change the terminal type (master or slave) listed in the configuration file].

.TERMINAL,master [puts FastSync into master mode, or]

.TERMINAL,slave [puts FastSync into slave mode].

.T_TIMEOUTS [This command allows you to change the Transmit Timeouts listed in the configuration file]. The syntax for this command is:

.T_TIMEOUTS,nn [where nn is the new Transmit Timeouts value].

.R_TIMEOUTS [This command allows you to change the Receive Timeouts listed in the configuration file]. The syntax for this command is:

.R_TIMEOUTS,nn [where nn is the new Receive Timeouts value].

SLEEP (TIMER) PROGRAM (For DOS Users, but this will not operate under a DOS Window)

This special program is not an internal FastSync command. The program SLEEP.EXE delays the execution of FastSync until a specified time. The program installs itself in memory and runs in the background so that you can continue to use your computer. When the specified time is reached, FastSync begins execution. If you are running another application when the specified time is reached, the execution of FastSync is delayed until you return to DOS. The syntax for this command is:

SLEEP DAY HH:MM [AM | PM].

The first command line argument for the SLEEP program is the day of the week to execute FastSync. Use one of the standard days of the week, "Today" or "Tomorrow."

The second argument for the SLEEP program is the time to execute FastSync. A single digit is allowable for the hour, but the minutes must be specified using two digits. You can use either "AM" or "PM," or you can express the time in 24 hour format if you prefer. For example, the following are allowable entries for the first two arguments:

TODAY 6:05 AM [Today at five past six in the morning]

TOMORROW 6:05 [Tomorrow at five past six in the morning]

WEDNESDAY 18:15 [Wednesday at fifteen past six in the evening]

FRIDAY 12:30 [Friday at half past midnight]

MONDAY 0:30 [Monday at half past midnight (24 hour clock)].

If the day is omitted TODAY is assumed.

Follow the kickoff time with command line arguments the same way as if you are using FastSync directly. For example:

SLEEP FRIDAY 12:15 AM .REPORT .CMD(TEST4800.CMD) [runs FastSync on Friday at fifteen past midnight, creates a report file and executes the command file "TEST4800.CMD"].

You can use the SLEEP program more than once to schedule multiple executions of FastSync. For example, you can schedule FastSync to run at 12:15 AM and again at 12:30 AM with a different command file each time!

You should always use the report (log) file feature when using SLEEP so that you can later check the report file to make sure your job ran properly. Remember to use the append (.reporta) option when scheduling multiple sessions to avoid overwriting earlier report files.

SLEEP is removed from memory and cancels the next scheduled execution by entering "EXIT" at the DOS prompt. Simply schedule another execution or enter a dot (.) in place of the time to recover the other previously scheduled executions. SLEEP maintains its schedule in the file, SLEEP.CTL. To cancel all executions, delete the file SLEEP.CTL.

 

For details on FastSync 3780 commands and how to use them, Click Here.