* FTP problem from VAX to SPARC...
@ 1996-05-29 4:00 speck
1996-05-29 4:00 ` Aaron Leonard
0 siblings, 1 reply; 2+ messages in thread
From: speck @ 1996-05-29 4:00 UTC (permalink / raw)
I am having the following problem, trying to FTP a file from a VAX machine
to a SUN/SOLARIS machine.
The file is named: gsrs04973.bak
This file shows up as being 24 blocks long on the VAX. Performing a
DIRECTORY/FULL on the file yields:
GSRS04973.BAK;1 File ID: (44411,26,0)
Size: 24/27 Owner: [SPECK]
Created: 28-MAY-1996 09:58:57.28
Revised: 28-MAY-1996 09:58:57.43 (1)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
File organization: Sequential
Shelved state: Online
File attributes: Allocation: 27, Extend: 0, Global buffer count: 0
No version limit, Contiguous best try
Record format: Variable length, maximum 512 bytes
Record attributes: None
RMS attributes: None
Journaling enabled: None
File protection: System:RWE, Owner:RWED, Group:RE, World:E
Access Cntrl List: None
The name of the SUN to which I am trying to perform the FTP is "anakin".
From the VAX, I perform "ftp anakin". I then log in to anakin.
Next, to transfer the file as a binary file, I issue the command "binary".
Next, I perform "put gsrs04973.bak". Following the file transfer, I
perform an rlogin on anakin and check the size of the file "gsrs04973.bak",
which I have just transfered to the UNIX disk from the VAX disk. I find
that the file is 24 bytes SHORTER on the UNIX disk than it was on the VAX
disk. Note that, on the VAX, the file was 24 BLOCKS long. Thus, it appears
that one byte-per-block is being lost in the VAX -> UNIX transfer. When
I type the file on the VAX, I find that the file consists of 24 records, each
consisting of 512 bytes, and each ending with a carrige-return character.
When I cat the file on ANAKIN, I find that these carriage-returns are MISSING.
Do you know how I can properly transfer the entire file from VAX
to UNIX? Keep in mind that I must keep the carriage returns in the file.
The program which reads the file requires the presence of the carriage
returns.
Thanks for any help,
Scott
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: FTP problem from VAX to SPARC...
1996-05-29 4:00 FTP problem from VAX to SPARC speck
@ 1996-05-29 4:00 ` Aaron Leonard
0 siblings, 0 replies; 2+ messages in thread
From: Aaron Leonard @ 1996-05-29 4:00 UTC (permalink / raw)
In article <1996May29.132154@stsci.edu>, speck@stsci.edu writes:
|
|
|I am having the following problem, trying to FTP a file from a VAX machine
|to a SUN/SOLARIS machine.
|
|The file is named: gsrs04973.bak
|
|This file shows up as being 24 blocks long on the VAX. Performing a
|DIRECTORY/FULL on the file yields:
|
| GSRS04973.BAK;1 File ID: (44411,26,0)
| Size: 24/27 Owner: [SPECK]
| Created: 28-MAY-1996 09:58:57.28
| Revised: 28-MAY-1996 09:58:57.43 (1)
| Expires: <None specified>
| Backup: <No backup recorded>
| Effective: <None specified>
| Recording: <None specified>
| File organization: Sequential
| Shelved state: Online
| File attributes: Allocation: 27, Extend: 0, Global buffer count: 0
| No version limit, Contiguous best try
| Record format: Variable length, maximum 512 bytes
| Record attributes: None
| RMS attributes: None
| Journaling enabled: None
| File protection: System:RWE, Owner:RWED, Group:RE, World:E
| Access Cntrl List: None
The relevant part of the above DIR/FULL is the "Record format:
Variable length" (shorthand: "RFM:VAR"). This means that the
each record is actually stored on disk with a 16-bit byte
count, then the record contents, then possibly a null byte to
pad the record out to a word boundary.
Use DUMP on this file to see what's REALLY in it. One thing that
you'll find that their AIN'T no carriage return record separators.
| The name of the SUN to which I am trying to perform the FTP is "anakin".
|
| From the VAX, I perform "ftp anakin". I then log in to anakin.
|Next, to transfer the file as a binary file, I issue the command "binary".
|Next, I perform "put gsrs04973.bak". Following the file transfer, I
|perform an rlogin on anakin and check the size of the file "gsrs04973.bak",
|which I have just transfered to the UNIX disk from the VAX disk. I find
|that the file is 24 bytes SHORTER on the UNIX disk than it was on the VAX
|disk. Note that, on the VAX, the file was 24 BLOCKS long. Thus, it appears
|that one byte-per-block is being lost in the VAX -> UNIX transfer. When
|I type the file on the VAX, I find that the file consists of 24 records, each
|consisting of 512 bytes, and each ending with a carrige-return character.
TYPE doesn't show you what's REALLY in the file. If you look
at the file as such, you'll find that each record is really
514 bytes (2-byte prefix + 512 byte payload). NO carriage
returns at the end of each record.
|When I cat the file on ANAKIN, I find that these carriage-returns are MISSING.
Sounds like your FTP client (by the way, what TCP/IP package are
you running on the VMS side?) is, when you send this file as
TYPE IMAGE (i.e. "binary") sends just the record contents, not
the 2-byte prefixes (which you don't want anyway.) It doesn't
send any carriage returns 'cause they're not in the file and
you didn't ask for TYPE ASCII anyway.
| Do you know how I can properly transfer the entire file from VAX
|to UNIX? Keep in mind that I must keep the carriage returns in the file.
|The program which reads the file requires the presence of the carriage
|returns.
I'm sensing some serious confusion here -
1. You don't really WANT the entire original file (2-byte record
prefixes and all) to be transfered to Unix, do you? Does your
program on Unix know what to do with these record prefixes?
2. There are no carriage returns at the ends of the records in this
file on the VAX in the first place - DUMP it and see.
3. Unix doesn't even WANT to see any carriage returns at the ends
of records anyway - it likes LINE FEEDs.
4. You didn't let us know what TCP/IP package you're using on VMS.
5. You didn't tell us what happened when you used TYPE ASCII,
which is the default.
My hunch is that, if you just use TYPE ASCII, the file will
transfer the way that you want it. Or maybe you might have
to set the CR record attribute ( SET FILE /ATT=(RAT:CR) if
you're running V6.0 or better) on the file before FTPing it.
Here's a hint:
On the VMS side, DUMP tells you what's really on disk. DUMP/RECORD
shows what's really in each record. On the Unix side, od tells
you what's on disk (Unix has no concept of records.) If you have
TCPDUMP (which comes with MultiNet and which is available for Unix),
you can watch the FTP data packets and ind out what's REALLY
going across the wire.
Figure out what your original file REALLY looks like, how you
REALLY want it to look on the Unix side, what is REALLY going
across the wire, and what TCP/IP (and OS) software you're actually
running, and we might be able to puzzle this out.
Cheers,
Aaron
Aaron Leonard aaron@cisco.com [ work ]
Aaron@Leonard.Tucson.AZ.US [ home ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-05-29 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-05-29 4:00 FTP problem from VAX to SPARC speck
1996-05-29 4:00 ` Aaron Leonard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox