.ps 60,78 .nhy .title VAXNET File Transfer Examples .c ;VAXNET File Transfer Examples .c ;----------------------------- .lm +5;.rm -3 .hl 1 Introduction VAXNET supports two types of file transfer protocols. The first is a primitive ASCII protocol which came with the original VAXNET program. The VAXNET protocol communicates with the SNDRCV program on the remote system. The second protocol supported is XMODEM. This protocol supports both ASCII and BINARY file transfers. The XMODEM protocol communciates with the VMODEM program on a remote VMS system or UMODEM on UNIX systems. The XMODEM protocol is supported by many other systems as well. .s This file shows examples of using both type of protocols. The VMODEM program is recommended for use on VMS systems instead of SNDRCV since it has better error checking. Also since VMODEM accepts binary files created by the MISH program using the /XMODEM qualifier, the file transfer will take less time. .hl 1 Starting VAXNET To get started, you must define the various VAXNET symbols. This is done on our system by typing the following DCL command: .rm +5 .lit $ @vaxnet$command .end literal .rm -5 The command procedure executed define the DCL symbols for VAXNET, MISH, REF, SNDRCV, and VMODEM. .hl 1 Test Files The REF executable file is used in our examples. The MISH program was used to create both an ASCII (.MIS) and BINARY (.MSH) copy of REF for file transfers. The test files were created in my home directory and the VMODEM subdirectory was used for transferred files. .rm +5 .lit $ dir ref.exe Directory $1$DUA2:[MILLER] REF.EXE;1 15/15 1-APR-1985 10:41 (RWED,RWED,RE,RE) Total of 1 file, 15/15 blocks. $ mish ref.exe %MISH-I-DONE, File: REF.MIS, total blocks = 15, total records = 84 $ mish ref.exe/xmodem %MASH-I-DONE, File: REF.MSH, total blocks = 15, total records = 32 $ dir ref.* Directory $1$DUA2:[MILLER] REF.EXE;1 15/15 1-APR-1985 10:41 (RWED,RWED,RE,RE) REF.MIS;1 13/15 25-AUG-1985 11:00 (RWED,RWED,RE,RE) REF.MSH;1 9/9 25-AUG-1985 11:00 (RWED,RWED,RE,RE) Total of 3 files, 37/39 blocks. .end literal .rm -5 .hl 1 SNDRCV Example The first example shows the commands neccessary to send and get a file using the SNDRCV program. Since the SNDRCV protocol only supports ASCII files, the .MIS files created by the MISH program is used. .rm +5 .lit $ set default [.vmodem] $ sndrcv SNDRCV Version 2.1 started ... Type CTRL/X and RETURN to abort. Vaxnet> SEND REF.MIS * *** Type CTRL/C to abort the file transmission. *** %SEND- File "REF.MIS;1" copied to "REF.MIS" (84 records, 5970 bytes) *** ELAPSED: 00:01:06.67 CPU: 0:00:02.40 *** VAXNET Status Report: Total records: 84, total bytes: 5970, timeouts: 0 Framing errors: 0, overruns: 0, parity errors: 0 SNDRCV Status Report: Total records: 84, total bytes: 5970, timeouts: 0 Framing errors: 0, overruns: 0, parity errors: 0 $ $ diff ref.mis home:ref.mis Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER.VMODEM]REF.MIS;1- $1$DUA2:[MILLER]REF.MIS;1 $ $ mish ref/decompress %MISH-I-DONE, File: REF.EXE, total blocks = 15, total records = 84 $ $ diff ref.exe home:ref.exe Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER.VMODEM]REF.EXE;1- $1$DUA2:[MILLER]REF.EXE;1 $ $ dir ref.* Directory $1$DUA2:[MILLER.VMODEM] REF.EXE;1 15/15 25-AUG-1985 11:04 (RWED,RWED,RE,RE) REF.MIS;1 13/15 25-AUG-1985 11:02 (RWED,RWED,RE,RE) Total of 2 files, 28/30 blocks. $ $ sndrcv SNDRCV Version 2.1 started ... Type CTRL/X and RETURN to abort. Vaxnet> GET REF.MIS REF.AAA *** Type CTRL/C to abort the file transmission. *** %GET - File "REF.MIS" copied to "REF.AAA" (84 records, 5970 bytes) *** ELAPSED: 00:01:07.12 CPU: 0:00:02.54 *** VAXNET Status Report: Total records: 84, total bytes: 5970, timeouts: 0 Framing errors: 0, overruns: 0, parity errors: 0 SNDRCV Status Report: Total records: 84, total bytes: 5970, timeouts: 0 Framing errors: 0, overruns: 0, parity errors: 0 $ $ diff home:ref.aaa home:ref.mis Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER]REF.AAA;1- $1$DUA2:[MILLER]REF.MIS;1 $ $ del ref.*;* .end literal .rm -5 .hl 1 XMODEM Example This example shows the commands neccessary to send and get a file using the VMODEM program. Since the VMODEM protocol supports both ASCII and BINARY, both the .MIS and .MSH files are transferred during the example. Notice that the protocol had to be changed to XMODEM since the default is the normal VAXNET protocol. .rm +5 .lit Vaxnet> SET PROTOCOL XMODEM Vaxnet> SHOW PROTOCOL Protocol type: XMODEM Vaxnet> SHOW FILE_TYPE File type: ASCII Vaxnet> SHOW BITS Number of bits: 8 Vaxnet> $ vmodem VMODEM Version 2.9 -- VAX/VMS-Based Remote File Transfer Facility Usage: vmodem -[rb!rt!sb!st][l][p][y][7] filename rb <-- Receive Binary. rt <-- Receive Text. sb <-- Send Binary. st <-- Send Text. d <-- Create vmodem.log else append to existing. l <-- (ell) Turn OFF LOG File Entries. y <-- Display file status (size) information only. 7 <-- Enable 7-bit transfer mask. $ vmodem -rt ref.mis VMODEM Version 2.9 -- VAX/VMS-Based Remote File Transfer Facility VMODEM: LOG File 'vmodem.log' is Open VMODEM: File Name: ref.mis VMODEM: Text Mode Selected VMODEM: 8-Bit Transmission Enabled VMODEM: Ready to RECEIVE File Vaxnet> SEND REF.MIS *** Type CTRL/C to abort the file transmission. *** *** File "REF.MIS;1" successfully transferred. *** *** ELAPSED: 00:01:02.05 CPU: 0:00:01.93 *** XMODEM Status Report: Total blocks: 48, total records: 84, total bytes: 5970 Parity errors: 0, overruns: 0, timeouts: 0 $ type vmodem.log ++++++++ VMODEM Version 2.9 ---- VMODEM Receive Function File Name: ref.mis TERM II File Transfer Protocol 3 (CP/M UG) Selected Text Mode Selected 8-Bit Transmission Enabled Timeout on Sector 0 Receive Complete Number of Received CP/M Records is 48 $ $ diff ref.mis home:ref.mis Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER.VMODEM]REF.MIS;1- $1$DUA2:[MILLER]REF.MIS;1 $ $ mish ref/decompress %MISH-I-DONE, File: REF.EXE, total blocks = 15, total records = 84 $ $ diff ref.exe home:ref.exe Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER.VMODEM]REF.EXE;1- $1$DUA2:[MILLER]REF.EXE;1 $ $ run ref Enter the input file name: ^Z $ $ del home:ref.aaa;0 $ $ vmodem -std ref.mis VMODEM Version 2.9 -- VAX/VMS-Based Remote File Transfer Facility VMODEM: LOG File 'vmodem.log' is Open VMODEM: Estimated File Size 6K, 48 Records, 6053 Bytes Estimated transfer time at 1200 baud: 0 min, 51 sec. VMODEM: File Name: ref.mis VMODEM: Text Mode Selected VMODEM: 8-Bit Transmission Enabled VMODEM: Ready to SEND File Vaxnet> GET REF.AAA *** Type CTRL/C to abort the file transmission. *** *** File "REF.AAA" successfully transferred. *** *** ELAPSED: 00:01:01.25 CPU: 0:00:02.47 *** XMODEM Status Report: Total blocks: 48, total records: 84, total bytes: 5970 Parity errors: 0, overruns: 0, timeouts: 0 $ diff ref.mis home:ref.aaa Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER.VMODEM]REF.MIS;1- $1$DUA2:[MILLER]REF.AAA;1 $ $ type vmodem.log ++++++++ VMODEM Version 2.9 ---- VMODEM Send Function File Name: ref.mis Estimated File Size 6K, 48 Records, 6053 Bytes TERM II File Transfer Protocol 3 (CP/M UG) Selected Text Mode Selected 8-Bit Transmission Enabled Send Complete $ $ del ref.*;* $ del home:ref.aaa;0 $ Vaxnet> SET FILE_TYPE BINARY Vaxnet> $ vmodem -rbd ref.msh VMODEM Version 2.9 -- VAX/VMS-Based Remote File Transfer Facility VMODEM: LOG File 'vmodem.log' is Open VMODEM: File Name: ref.msh VMODEM: Binary Mode Selected VMODEM: 8-Bit Transmission Enabled VMODEM: Ready to RECEIVE File Vaxnet> SEND REF.MSH *** Type CTRL/C to abort the file transmission. *** *** File "REF.MSH;1" successfully transferred. *** *** ELAPSED: 00:00:41.92 CPU: 0:00:01.35 *** XMODEM Status Report: Total blocks: 32, total records: 32, total bytes: 4096 Parity errors: 0, overruns: 0, timeouts: 0 $ type vmodem.log ++++++++ VMODEM Version 2.9 ---- VMODEM Receive Function File Name: ref.msh TERM II File Transfer Protocol 3 (CP/M UG) Selected Binary Mode Selected 8-Bit Transmission Enabled Timeout on Sector 0 Receive Complete Number of Received CP/M Records is 32 $ $ diff ref.msh home:ref.msh Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER.VMODEM]REF.MSH;1- $1$DUA2:[MILLER]REF.MSH;1 $ $ mish ref/decompress/xmodem %MASH-I-DONE, File: REF.EXE, total blocks = 15, total records = 32 $ $ diff ref.exe home:ref.exe Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER.VMODEM]REF.EXE;1- $1$DUA2:[MILLER]REF.EXE;1 $ $ run ref Enter the input file name: ^Z $ $ vmodem -sbd ref.msh VMODEM Version 2.9 -- VAX/VMS-Based Remote File Transfer Facility VMODEM: LOG File 'vmodem.log' is Open VMODEM: Estimated File Size 4K, 32 Records, 4095 Bytes Estimated transfer time at 1200 baud: 0 min, 35 sec. VMODEM: File Name: ref.msh VMODEM: Binary Mode Selected VMODEM: 8-Bit Transmission Enabled VMODEM: Ready to SEND File Vaxnet> GET REF.BBB *** Type CTRL/C to abort the file transmission. *** *** File "REF.BBB" successfully transferred. *** *** ELAPSED: 00:00:40.15 CPU: 0:00:01.53 *** XMODEM Status Report: Total blocks: 32, total records: 32, total bytes: 4096 Parity errors: 0, overruns: 0, timeouts: 0 $ type vmodem.log ++++++++ VMODEM Version 2.9 ---- VMODEM Send Function File Name: ref.msh Estimated File Size 4K, 32 Records, 4095 Bytes TERM II File Transfer Protocol 3 (CP/M UG) Selected Binary Mode Selected 8-Bit Transmission Enabled Send Complete $ $ diff ref.msh home:ref.bbb Number of difference sections found: 0 Number of difference records found: 0 DIFFERENCES /IGNORE=()/MERGED=1- $1$DUA2:[MILLER.VMODEM]REF.MSH;1- $1$DUA2:[MILLER]REF.BBB;1 $ $ anal/rms ref.msh Check RMS File Integrity 25-AUG-1985 11:18:08.13 Page 1 $1$DUA2:[MILLER.VMODEM]REF.MSH;1 FILE HEADER File Spec: $1$DUA2:[MILLER.VMODEM]REF.MSH;1 File ID: (5118,29,0) Owner UIC: [022,021] Protection: System: RWD, Owner: RWD, Group: R, World: R Creation Date: 25-AUG-1985 11:13:57.58 Revision Date: 25-AUG-1985 11:14:46.27, Number: 1 Expiration Date: none specified Backup Date: none posted Contiguity Options: none Performance Options: none Reliability Options: none Journaling Enabled: none RMS FILE ATTRIBUTES File Organization: sequential Record Format: fixed Record Attributes: Maximum Record Size: 128 Longest Record: 128 Blocks Allocated: 9, Default Extend Size: 0 End-of-File VBN: 9, Offset: %X'0000' Global Buffer Count: 0 The analysis uncovered NO errors. ANAL/RMS REF.MSH $ del ref.*;* .end literal .rm -5