Bisync,3780,SNA/RJE,3770,FTP and Async File Transfer Solutions Bisync,3780,SNA/RJE,3770,FTP and Async File Transfer Solutions
Call: 512.345.2211
     Home | Contact Us | About Us | Careers | Site Map [email protected]
Bisync 3780 protocol emulation & communications software Bisync 3780 RJE Emulation Software

3780Link First-Time User's Guide


Table of Contents

Intro

3780Link is a full-featured IBM 3780/2780 RJE data terminal emulator with many advanced features. However, most customers' requirements are limited to the following:

  1. Connect to a host system (via dial-up or leased-line connection)
  2. Send files to the host
  3. Receive files from the host
  4. Disconnect
  5. Exit

The purpose of this document is to walk the first-time user through the basic steps needed to install, register, configure, and run 3780Link with the goal of automating these tasks.

Back to TOC

Registration

Software-based registration is used for the AutoSync version of 3780Link. This version of the software uses a Hayes Optima modem connected directly to a COM port.

Screen Shot

A separate program called "License Manager" is used to manage the software license and can be launched from the Windows Start Menu. The shortcut is Start | Programs | 3780Link | License Manager. After the program is first installed, run License Manager and click the "First Run Authorization" button. This starts a temporary license which enables the software for a period of thirty days. This gives the user a substantial grace period to complete the full authorization process. Click the "License Manager Instructions" button for details regarding the full authorization process.

Back to TOC

Writing Scripts

3780Link provides a full-featured GUI that enables the user to complete all communications tasks. However, in most cases the goal is to develop an automated process that can be scheduled or launched from a desktop icon. 3780Link has a powerful script language that makes this possible.

Script files are just plain text files that may be created and edited with Windows Notepad (or any other text editor). Start by creating a file called "myScript.s" and saving it in the 3780Link directory (by default this is C:\Program Files\3780Link).

This tutorial steps through the process of accomplishing the following tasks:

  1. Dial the host
  2. Send all files in the C:\Uploads directory, deleting each file after it is sent
  3. Receive any files the host may send, storing them in the C:\Downloads directory
  4. Disconnect
  5. Exit

Here is the script: Download myScript.s


; myScript.s

LOOPCOUNT 3
:dialloop
DIAL 555-5555
IF dialloop, connect
GOTO exit

:connect
; Set path and file name for incoming data
PTR "C:\Downloads\printerfile" /s

; Send all files in C:\Uploads
:getfile
GETNEXTFILE "C:\Uploads\*.*" /t=5
IF recv
SENDL "C:\Uploads\%nextfile%"
IF getfile, delete
:delete
DEL "C:\Uploads\%nextfile%"
GOTO getfile

; Receive any files the host may send
:recv
RCV /s=10
IF done
GOTO recv

:done
DISC

:exit
QUIT /x

Here is a line-by-line break-down of what each script command does:

; myScript.s

Any lines that begin with a semi-colon are comments which are ignored by the script processor. White-space is also ignored, so blank lines, spaces, and tabs may be used to make a script look more readable.

LOOPCOUNT 3

This command is used in conjunction with the IF command to determine the number of times a command sequence should be repeated

:dialloop

Any lines that begin with a colon are labels. Labels are used in conjunction with branching commands (such as the IF command)

DIAL 555-5555

The DIAL command causes 3780Link to dial the number and establish a connection.

IF getfile, delete

The IF command checks the outcome of the previous command (in this case the DIAL command). If the previous command failed, it branches to the first label listed (in this case the 'getfile' label). If this first label is followed by a comma and another label, then the IF command branches to this second label if the previous command did not fail. If a second label is not listed, the script simply flows to the next command in the script if the previous command did not fail.

Since the LOOPCOUNT command was used to limit the number of times the IF command branches back to the 'getfile' label, script execution will simply flow to the next script command instead of branching to 'getfile' if the DIAL command fails on the third try.

GOTO exit

This command tells 3780Link to branch to a label (in this case the 'exit' label).

PTR "C:\Downloads\printerfile" /s

This command probably confuses more first-time users than any other. It is important to understand that when a host sends data to a 3780 terminal, it thinks it is sending to a printer device (or a punch device, but this is less common). 3780Link can be configured to route incoming 'printer' data to an actual Windows printer or to a text file (the latter being the more common scenario). The PTR command is used to specify the path and file name where 3780Link will store incoming 'printer' data. The /s option is used to tell 3780Link to use sequential 3-digit numbers for the file name extension. In this case incoming data will be saved to files named "printerfile.001", "printerfile.002", "printerfile.003", etc. in the "C:\Downloads" directory.

GETNEXTFILE "C:\Uploads\*.*" /t=5

This command tells 3780Link to look in the "C:\Uploads" directory for any file (a specific file name could be used instead of the wildcard characters "*.*"). If a file is found, the file name is stored in a variable called %nextfile% which can be used elsewhere in the script. If no file is found, the command returns an error.

IF recv

This is the simpler form of the IF command. It checks the outcome of the previous command (in this case GETNEXTFILE). If the previous command returned an error, the script branches to a label (in this case, the 'recv' label). If the previous command did not return an error, the script simply flows to the next script command.

SENDL "C:\Uploads\%nextfile%"

This command tells 3780Link to send the specified file to the host. The %nextfile% variable contains the name of the file found earlier by the GETNEXTFILE command.

DEL "C:\Uploads\%nextfile%"

This command tells 3780Link to delete the specified file from the local file system. The %nextfile% variable contains the name of the file found earlier by the GETNEXTFILE command.

RCV /s=10

This command puts 3780Link into receive mode. It will receive any incoming 'printer' data (or less commonly, 'punch' data) and route it to whatever location was previously specified by the PTR command.

DISC

This command causes 3780Link to disconnect.

QUIT /x

This command tells 3780Link to stop processing script commands. The /x option is used to tell 3780Link to exit once the script is complete.

There are many more commands available. Consult the 3780Link Help File for a complete list of commands as well as more details and examples involving the commands used in this script.

Back to TOC

Launching Scripts

Scripts may be launched several different ways, but the most common way is via the command line. Use the following command line to launch the 3780Link script processor and have it run the "myScript.s" script:

"C:\Program Files\3780Link\w3780so.exe" -s"myScript.s"

A common way to have Windows run this command is to create a shortcut. One way to do this is to use the Windows Shortcut Wizard. Here are the steps to follow:

  1. Right-click on the desktop
  2. Select "New"
  3. Select "Shortcut"
    Screen Shot
  4. Type (or copy 'n' paste) the command line listed above into the dialog box that pops up
    Screen Shot
  5. Click "Next"
  6. Type "My Script" (or some other descriptive name) into the next dialog box
    Screen Shot
  7. Click "Finish"
    Screen Shot

Clicking the resulting shortcut will launch the 3780Link script processor and run the specified script

Screen Shot
Back to TOC

Logging Results

By default, 3780Link creates a log file called "3780link.log" which it stores in the 3780Link directory (C:\Program Files\3780Link by default). This log shows each script command that was executed and the results of that command. This file may be viewed in Windows Notepad (or any other text editor) to review the outcome of running a script. This file is over-written each time 3780Link is launched.

Back to TOC

  More Info...

  3780Link

  Documentation

  Technical Support

  What is Bisync?

    © 1994-2005 Serengeti Systems Incorporated. All Rights Reserved. Legal | Privacy