Uploading A Text File To A Host Computer - HP 82718A Expansion Pod Reference Manual

For use with the hp-75
Hide thumbs Also See for HP 82718A Expansion Pod:
Table of Contents

Advertisement

s
:l
[l
.s
e
g
rt
;Y
rt
re
ot
re
Software Usage and Examples
response. If the BUSY response is not all read at once by
t'1OD I t·U,
the response will be identified wrong.
If only loBU is read, for example, the check for the response would be identified as the short form of %BAD
ANS-loB. To avoid this conflict, the program should look for either long or short responses, but not both.
If the result of dialing is the BUSY response, detected on line 40, the program redials with the R command
on line 50. Since the D command on line 20 stored the dial string, the dial string is optional for the R
command. The
R
command will dial the string a maximum of 10 times. Variable
E:
keeps track of the
number of BUSY responses reported while redialing; after 10, the program stops.
If the result of dialing is CONNECT, detected at line 1010, the program will inform the user and proceed
starting at line 110. If the result of dialing is BAD ANS or NO ANS, detected at lines 1020-1030, the
program halts.
Uploading a Text File to a Host Computer
One of the most common applications using the modem is to upload a file from the HP-75 to a host
computer. The file could be bar code data collected during inventory, data typed in while running an
application program, a memo, or whatever you happen to have. This example will outline a simple,
straightforward procedure for uploading an HP-7 5 text file to an arbitrary host.
To upload a file, you will need two programs. The first program, which will reside on the HP-75, will
transmit the file. You can write this program by following the sample which is shown in this section.
The second program, which will reside on the host computer, must accept input from the HP-75 as a
remote terminal, and place the input in a file.
Fortunately, you will not have to write this program,
because every host computer has a program already available to perform this function--an editor. The
purpose of any editor is to accept input from a remote terminal and place the input in a file. For this file
upload procedure, a simple line editor is all that is needed.
Below is the general procedure to upload a file usmg a line editor. The numbers in parentheses correspond
to the line numbers in the sample program. This procedure will work with any host; you only need to
change the commands in the sample program to accommodate the syntax of your system. (The sample
program illustrates the syntax for the HP 3000.)
GENERAL FILE UPLOAD PROCEDURE
1)
Find out what file is to be uploaded (lines 30-60).
2) Set up protocol to match your host, and establish connection (lines 70-80).
3) Log on (line 90).
4)
Purge any file with the same name as the file to be uploaded off the host system (line 100).
5) Invoke the line editor (line 110).
6)
Enter the mode for inserting data into the editor workspace (line 120).
7)
Read lines from the HP-75 text file and transmit them to the host (lines 130-150). Each line
should be followed by the end -of -line indicator (line 20) for the host.
8)
End the data insertion mode (line 160).
43

Advertisement

Table of Contents
loading

Table of Contents