home *** CD-ROM | disk | FTP | other *** search
- Q COMMAND ON
- DISPLAY "^[H^[J^m"
- DISPLAY "Uploading the UNIX host file transfer program:^m^j^j"
- DISPLAY "The upload process is controlled by a command file which you are^m^j"
- DISPLAY "currently executing. It is designed to do two things; upload^m^j"
- DISPLAY "the host file transfer program, and configure REFLECTION for^m^j"
- DISPLAY "subsequent file transfers to and from a UNIX host. The host file^m^j"
- DISPLAY "transfer program, called unixlink.c, must reside on the current^m^j"
- DISPLAY "drive of your computer. It should only need to be uploaded^m^j"
- DISPLAY "to the host once; the following procedure is used by this com-^m^j"
- DISPLAY "mand file to upload unixlink.c.^m^j^j"
- DISPLAY "Press Return to continue."
- ACCEPT V5
- DISPLAY "^[H^[J^m"
- DISPLAY "1. The following configuration parameters are set for the^m^j"
- DISPLAY " upload of unixlink.c:^m^j^j"
- DISPLAY " RECEIVE-PACING : XON/XOFF^m^j"
- DISPLAY " TRANSMIT-PACING: XON/XOFF^m^j"
- DISPLAY " HOST-PROMPT : NONE^m^j"
- DISPLAY " TABS-TO-SPACES : NO^m^j"
- DISPLAY " SPACES-TO-TABS : NO^m^j"
- DISPLAY " BLOCK-SIZE : 80^m^j"
- DISPLAY " CHARACTER-DELAY: 1^m^j^j"
- DISPLAY " Also, Inhibit DC1 and Inhibit Handshake are turned on.^m^j^j"
- DISPLAY "2. The sh command is transmitted to the host to change the host^m^j"
- DISPLAY " prompt. PS1='|' allows the command file to look for this^m^j"
- DISPLAY " prompt from the host at any time during the upload process.^m^j^j"
- DISPLAY "3. File concatenation is invoked on the UNIX system using the^m^j"
- DISPLAY " file name unixlink.c as the destination file.^m^j^j"
- DISPLAY "4. The source file, unixlink.c, is then transmitted to the host^m^j"
- DISPLAY " followed by a control-D to end concatenation.^m^j^j"
- DISPLAY "Press Return to continue."
- ACCEPT V5
- DISPLAY "^[H^[J^m"
- DISPLAY "5. After a pause, file concatenation is invoked a second time^m^j"
- DISPLAY " using the name XXXX.XXX as the destination file. The UNIX^m^j"
- DISPLAY " source file is uploaded a second time to the host in order^m^j"
- DISPLAY " to check the transfer.^m^j^j"
- DISPLAY "6. CMP is invoked on the host to compare unixlink.c to XXXX.XXX.^m^j"
- DISPLAY " If any differences exist, the command file is terminated.^m^j"
- DISPLAY " At this point you should check configuration values for^m^j"
- DISPLAY " possible errors and then try to upload the program again.^m^j^j"
- DISPLAY "7. If the files are identical, unixlink.c is compiled. Then^m^j"
- DISPLAY " XXXX.XXX is deleted using rm.^m^j^j"
- DISPLAY "8. The Host Startup Sequence field on the File Transfer^m^j"
- DISPLAY " Configuration menu is configured for you. With unixlink in^m^j"
- DISPLAY " this field, the correct host program is invoked whenever^m^j"
- DISPLAY " file transfers are done.^m^j^j"
- DISPLAY "The entire upload can take up to 12 minutes. You can use CTRL-Y ^m^j"
- DISPLAY "to terminate the upload after it has begun if necessary.^m^j^j"
- DISPLAY "Press Y [Return] to start the upload; anything else will exit: "
- ACCEPT V1
- ;goto config
- IF UPPER(V1)<>"Y"
- DISPLAY "^m^jCommand file execution terminated without doing anything!^g^m^j"
- Q COMMAND OFF
- STOP
- ENDIF
- ; turn on inhibit DC1 and inhibit handshake
- DISPLAY "^[&s1G"
- DISPLAY "^[&s1H"
- ;The next five commands are relevant to HP emulation only.
- SET RECEIVE-PACING XON/XOFF
- SET TRANSMIT-PACING XON/XOFF
- SET HOST-PROMPT "^@"
- SET SPACES-TO-TABS NO
- SET TABS-TO-SPACES NO
- SET HOST-STARTUP "unixlink"
- SET BLOCK-SIZE 80
- SET CHARACTER-DELAY 3
- TRANSMIT "^m"
- TRANSMIT "sh^m"
- WAIT 00:00:2
- TRANSMIT "PS1='|' ^m"
- WAIT FOR "|"
- WAIT FOR "|"
- ; set unix kill & erase characters to ctrl-U and ctrl-H, respectively.
- TRANSMIT "stty -kill \"\^\U\" ^M"
- WAIT 00:00:2
- TRANSMIT "stty -erase \"\^\H\" ^M"
- WAIT 00:00:2
- TRANSMIT "cat > unixlink.c^M"
- WAIT 00:00:2
- TRANSMIT unixlink.c PAUSE 2
- TRANSMIT "^D"
- WAIT FOR "|"
- TRANSMIT "cat > XXXX.XXX^m"
- WAIT 00:00:2
- TRANSMIT unixlink.c PAUSE 2
- TRANSMIT "^D"
- WAIT FOR "|"
- TRANSMIT "cmp unixlink.c XXXX.XXX^M"
- READHOST V1 UNTIL "|"
- IF FIND("DIFFER",UPPER(V1)) > 0
- DISPLAY "Unsuccessful upload. Check configuration and try again.^m^j^g"
- LET V1 = "Retry"
- ;change as of 10/23/86
- ELSE
- DISPLAY "Are you using Unix System 5? (Y/N): "
- ACCEPT V1 LIMIT 1
- IF PACK(UPPER(V1))='Y'
- DISPLAY "^M^J PROCESSING - PLEASE WAIT"
- Q DISPLAY ON
- TRANSMIT "if cc -DSYSTEM5 -o unixlink unixlink.c ; then echo 'Successful Upload';^m"
- READHOST V1
- TRANSMIT "else echo 'Unsuccessful Upload - Retry' ; fi^m"
- ELSE
- DISPLAY "^M^J PROCESSING - PLEASE WAIT"
- Q DISPLAY ON
- TRANSMIT "if cc -o unixlink unixlink.c ; then echo 'Successful Upload';^m"
- READHOST V1
- TRANSMIT "else echo 'Unsuccessful Upload - Retry' ; fi^m"
- ENDIF
- READHOST V1
- Q DISPLAY OFF
- READHOST V1 UNTIL "|"
- ENDIF
- TRANSMIT "rm XXXX.XXX^m"
- WAIT FOR "|"
- TRANSMIT "^D"
- IF FIND("Retry",V1) > 0
- TRANSMIT "^m"
- Q COMMAND OFF
- STOP
- ENDIF
- WAIT 0:0:2
- DISPLAY " ^[H^[J^m^j"
- DISPLAY " Now that the host file transfer program has been successfully^m^j"
- DISPLAY " uploaded, REFLECTION must be configured for file transfers. The^m^j"
- DISPLAY " following parameters affect the speed and success of transfers,^m^j"
- DISPLAY " they vary depending on the UNIX host you are connected to:^m^j^j"
- DISPLAY " BLOCK-SIZE : can range from 64 to 512.^m^j"
- DISPLAY " SUB-BLOCK-LENGTH : can be from 100 to 240, or not needed^m^j"
- DISPLAY " CHARACTER-DELAY : might need to be set to 1, 2, or 3^m^j^j"
- DISPLAY " Once you indicate what type of host you are communicating with,^m^j"
- DISPLAY " this command file will preset these parameters to values which^m^j"
- DISPLAY " should work under most conditions. These values are saved to^m^j"
- DISPLAY " the default configuration file for later use. If you have^m^j"
- DISPLAY " trouble successfully transferring files, you may need to make^m^j"
- DISPLAY " further changes.^m^j^j"
- DISPLAY "Press Return to continue"
- ACCEPT V5
- DISPLAY "^[H^[J^m^j"
- :hp
- DISPLAY " Is your host an HP9000 (with SYSTEMV HPUX) (Y/N): ? "
- ACCEPT V1 LIMIT 1
- DISPLAY "^m^j"
- IF PACK(UPPER(V1))='Y'
- DISPLAY "^m^j^j"
- DISPLAY "For file transfers to the HP 9000, the following parameters^m^j"
- DISPLAY "are set^m^j^j"
- DISPLAY " BLOCK-SIZE : 256^m^j"
- DISPLAY " SUB-BLOCK-LENGTH : 0^m^j"
- DISPLAY " CHARACTER-DELAY : 0^m^j^j"
- SET BLOCK-SIZE 256
- SET CHARACTER-DELAY 0
- SET SUB-BLOCK-LENGTH 0
- ELSE
- IF PACK(UPPER(V1))<>'N'
- DISPLAY "^m^j"
- DISPLAY "You must enter Y or N^m^j"
- goto hp
- ENDIF
- DISPLAY "^m^j"
- DISPLAY " Is your host a VAX (Berkeley 4.2 or SYSTEM3) (Y/N): ? "
- ACCEPT V2 LIMIT 1
- DISPLAY "^M^J"
- IF PACK(UPPER(V2))='Y'
- DISPLAY "^m^j^j"
- DISPLAY "For file transfers to VAX hosts, the following parameters^m^j"
- DISPLAY "are set:^m^j^j"
- DISPLAY " BLOCK-SIZE : 80^m^j"
- DISPLAY " SUB-BLOCK-LENGTH : 0^m^j"
- DISPLAY " CHARACTER-DELAY : 0^m^j"
- SET BLOCK-SIZE 80
- SET SUB-BLOCK-LENGTH 0
- SET CHARACTER-DELAY 0
- ELSE
- IF PACK(UPPER(V2)) <> 'N'
- DISPLAY "^m^j"
- DISPLAY "You must press Y or N^m^j"
- GOTO hp
- ENDIF
- DISPLAY "^m^j^j"
- DISPLAY "If you are not using an HP 9000 or a VAX host, these are^m^j"
- DISPLAY "the parameters that are set. However, you may have to^m^j"
- DISPLAY "experiment if you have trouble.^m^j^j"
- DISPLAY " BLOCK-SIZE : 80^m^j"
- DISPLAY " SUB-BLOCK-LENGTH : 0^m^j"
- DISPLAY " CHARACTER-DELAY : 3^m^j^j"
- SET BLOCK-SIZE 80
- SET SUB-BLOCK-LENGTH 0
- SET CHARACTER-DELAY 3
- ENDIF
- ENDIF
- DISPLAY "^[H^[J^m^j^j"
- DISPLAY "If you want to save the configuration values set with this file,^m^j"
- DISPLAY "but preserve the default configuration file, enter a unique file^m^j"
- DISPLAY "name below, such as UNIX.CFG. This file can then be loaded when^m^j"
- DISPLAY "you want to transfer files to UNIX systems.^m^j^j"
- DISPLAY "Press Return to save to the current default configuration file^m^j"
- DISPLAY "or enter a file name: "
- ACCEPT V1
- IF PACK(UPPER(V1))=''
- SAVE
- CONTINUE
- LET V2 = MID($SERIAL,3,3)
- IF ERROR
- DISPLAY "Configuration Saved"
- GOTO end
- ENDIF
- IF V2 = 0
- ; next line is for MAC users only
- DISPLAY "^j^m^jConfiguration Saved to CONFIG^m^j"
- ENDIF
- DISPLAY "^j^m^jConfiguration Saved to R$2.CFG^m^j"
- ELSE
- SAVE $1 DELETE
- DISPLAY "^j^m^jConfiguration Saved to " & UPPER(V1) & "^m^j"
- ENDIF
- :end
- TRANSMIT "^m"
- Q COMMAND OFF
- STOP