[Info-vax] difference in files being copied by scp from Unix to VMS
Sumir
sumirmehta at gmail.com
Tue Apr 28 10:14:26 EDT 2009
On Apr 28, 12:28 am, JF Mezei <jfmezei.spam... at vaxination.ca> wrote:
> Sumir wrote:
> > 00000000 00000000 00000000 00000A20 0A200A20 0A200A20 4D4F2020 2020204E N OM . . . . ............... 0000A0
> > 00000000 00000000 00000000 00000A20 0A200A20 0A200A20 4D4F2020 2020204E N OM . . . . ............... 0000A0
>
> The actual data in both files appears identical. So the logical
> conclusion is that the applicaion receiving thefileends up specifying
> the wrong number of bytes to write for the last block reulting inVMS
> including a bunch ofnullsinside thefileinstead of ending it at the
> last 0A (line feed).
>
> However, this still leaves a number of possible culprits:
>
> *whenVMSsends thefileto the remote system, it might tag on those
> extra bytes
>
> *when theunixsystem receives thefile, it might tag on those extra bytes
>
> *when theunixsystem transmits thefileback toVMS, it may tag on
> those extra bytes
>
> *whenVMSreceives thefile, it might tag on those extra bytes.
>
> Knowing the exact number of bytes that are stored on theunixversion of
> thefilewould help narrow down to either the first or last 2
> possibilities by comparing it with the exact number of bytes in the
> originalVMSfile.
>
> > its kind of confusing to see that both have the same contents in the
> > last block, butdiffshows a difference in both the files.
>
> This is normal because the secondfileis bigger than the first one, so
> any data in file2 that is beyond the end offilefor file1 will show up
> as a difference.
>
> > So, is there a way to just ignore this set ofnullsinvms. or some
> > kind of setting inunixto ensure that these are not inserted ?
>
> VMSwas told that those extranullsare part of thefile'scontent.
>
> You would need to write a small program to process thefileand find the
> logical end offile(the last linefeed in the last block of thefile)
> and then truncate thefileat that point to reset the end offilemarker
> to the right location.
>
> When accessing thatfile,VMShas no wait to know that thosenulls
> shouldn't be there.
>
> Knowing what sort of IO is used by theVMSsoftware (the sending and
> receiving programs) might lead to a clue. You'd probably have to callVMSsupport to try to extract this from them. It might be doing raw
> block io with SYS$READ and SYS$WRITE, it could be doing RMS record IO
> with SYS$GET and SYS$PUT, or it would be doing C io with either
> read/write or fgets/fputs, or even character io with fgetc and fputc.
I am using scp2 for my file transfers... it has the following options
(for the verison that i have)
CURESOPER> scp2
SCP2: warning: Missing source and destination files.
SCP2: Reflection for Secure IT 6.1.0.16 on Process Software SSH for
OpenVMS (OpenVMS-VAX)
Copyright (c) 1999-2002 SSH Communications Security Corp (www.ssh.com)
All rights reserved.
Usage: SCP2 [host[#port]::]file [host[#port]::]file [switches]
or
Usage: SCP2 "[user at host[#port]::]file" "[user at host[#port]::]
file" [switches]
Switches:
/ASCII[=newline_convention]
Transfer file as text instead of binary.
/BATCH Starts SSH2 in batch mode.
/BUFFER_SIZE=integer Number of bytes to transfer in a buffer.
(default=7500)
/CIPHER=(cipher-1,...,cipher-n)
Select encryption algorithm(s).
/COMPRESS Enable SSH data compression.
/CONCURRENT_REQUESTS=integer
Number of concurrent read requests to post
to the
source (default=4)
/DEBUG=level Set debug level. (0-99)
/DIRECTORY Force target to be a directory.
/HELP Display this help.
/IDENTITY_FILE=file Identity file for public key
authentication.
/PORT Tell scp2 which port sshd2 listens to on
the remote
machine.
/PRESERVE Preserve file attributes and timestamps.
/NOPROGRESS Don't show progress indicator.
/OVERWRITE Overwrite existing file instead of deleting
first.
/QUIET Quiet; don't display any warning messages.
/RECURSIVE Process entire directory tree.
/REMOVE Remove source files after copying.
/STATISTICS=(NO, YES, SIMPLE)
/TRANSLATE_VMS=(ALL, NONE, VARIABLE, FIXED, VFC) (default=ALL)
Select VMS text files to be translated
/VMS and /TRANSLATE_VMS are mutually
exclusive
/VERBOSE Display verbose debugging messages.
Equal to "/debug=2".
/VERSION Display version number only.
/VMS Negotiate ability to transfer VMS file
information.
/VMS and /TRANSLATE_VMS are mutually
exclusive
could any of these be used to ensure that the transfer does not cause
the issue of incorrect padding ?
More information about the Info-vax
mailing list