Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 263,195 of 264,096    |
|    =?UTF-8?Q?Arne_Vajh=C3=B8j?= to All    |
|    Re: Binutils    |
|    04 Sep 25 19:25:48    |
   
   From: arne@vajhoej.dk   
      
   On 9/4/2025 6:57 PM, Arne Vajhøj wrote:   
   > On 9/4/2025 12:52 PM, hb0815 wrote:   
   >> On 9/4/25 00:38, Johnny Billquist wrote:   
   >>> Really? The length bytes are not actually any data in the file. Same   
   >>> with padding. I would say it would be a very bad bug to actually   
   >>> include them.   
   >>>   
   >>>> And here I thought “binary” meant “transfer all the bytes in the   
   >>>> file as   
   >>>> is” ...   
   >>>   
   >>> And it does. All the bytes of the file. Not all the metadata that   
   >>> exists outside of the data content.   
   >>   
   >> Although the length and padding bytes are not data, they are still   
   >> bytes of the file. What was shown indicates that only the data, not   
   >> all the bytes, were transferred. I don't think that this makes sense   
   >> or is useful. But, VMS users very likely use the (unsupported) zip and   
   >> unzip utility to ensure that they get transferred what they really   
   >> want/need.   
   >   
   > Discussing binary ftp of text files is a bit odd, because it   
   > is not expected to work.   
   >   
   > Binary FTP from VMS to Linux loose line structure. But even   
   > if it did transfer all bytes Linux would just see a bunch   
   > of bytes not making any sense as lines.   
   >   
   > But that not working is not unique for VMS-*nix. Between   
   > Windows and *nix you can end up with text files with a   
   > trailing CR on all lines on *nix or lines not recognized   
   > due to missing CR in older Windows apps.   
   >   
   > I still think the FIX odd record length is a much better   
   > example.   
   >   
   > It is something that could happen in real world.   
   >   
   > The expectation would be that it could be FTP'ed   
   > binary.   
   >   
   > And I would say that the least surprising handling   
   > is what FTP actually does: loose the padding zero.   
   >   
   > It would be quite confusing to write a FIX 1 file   
   > on VMS, binary FTP it to Linux and see those   
   > null bytes.   
      
   To illustrate.   
      
   On VMS:   
      
   ...   
   type   
    myrec = packed record   
    code : char;   
    val : integer;   
    end;   
      
   var   
    f : file of myrec;   
    r : myrec;   
      
   begin   
    open(f, 'fix.dat', new);   
    rewrite(f);   
   ...   
      
   On Windows:   
      
   ...   
   {$mode ISO}   
      
   type   
    myrec = packed record   
    code : char;   
    val : integer;   
    end;   
      
   var   
    f : file of myrec;   
    r : myrec;   
      
   begin   
    assign(f, 'fix.dat');   
    reset(f);   
   ...   
      
   Arne   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca