From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: 3717dac89a,a975f64b947c122 X-Google-Attributes: gid3717dac89a,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!howard From: Howard S Shubs Newsgroups: comp.sys.dec,comp.os.vms Subject: Re: RMS internals? Date: Sat, 08 Aug 2009 22:14:48 -0400 Organization: = 'INDEXED' Message-ID: References: <4a7c4310$1@flight> <4a7dbb58$0$295$14726298@news.sunsite.dk> <4a7dc34a$0$299$14726298@news.sunsite.dk> <0036d9be$0$5027$c3e8da3@news.astraweb.com> NNTP-Posting-Host: p1a289c32189ca66ed786e2f739ade5dac512fb6155f43068.newsdawg.com Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.5.3b3 (PPC Mac OS X) X-Face: "S"r{U%bs].&Ud}Pc~~~0a]M:t5l>>EN\1Faw10M9NK1Xq59wo7-"s0S+[{etQorO /Nf-Ci"i9v'MT!R8)J]N[4|2&x1r^Iq&{SB"6dknr0=+6UFb.>+{zMn_1=rw&/V+"d@* ZS5\LoW_ Xref: g2news2.google.com comp.sys.dec:1259 comp.os.vms:20627 In article <0036d9be$0$5027$c3e8da3@news.astraweb.com>, JF Mezei wrote: > You have files created on Windows. Transfered to VMS in some fashion, > but transfered in binary mode. Only after I requested it. They were originally transferred using ASCII mode, which is what our end users will actually do. With what I saw, I'm not going to worry about it. If the users transfer using binary mode, the program they're using just won't work properly. If my client wants me to fix it, I'm sure they'll let me know. > And you then want to write an application that can parse the file's > internal structure. I've done it for UNDEFINED and VARIABLE, yes. > This may soun stupid, but what is wrong with doing standard file IO and > letting RMS parse the file ? This will give you your records and you > don't have to worry about whatever internal structure the file was > stored in. Actual record length of this file is 33097 bytes. I don't know why. I'm neither the 3rd party who wrote the software emitting it, nor my programmer who needs to update the software to read it. I'm just trying to help him out. If I'd understood ahead of time how the records were being written, I'd have told him, and he'd have dealt with it, but now I've given him this little library and he doesn't have to mess with it. > Also, if, once in production, you always use the same type of file > transfer software, then the files on VMS will always be created the same > way. Yes. Twenty-twenty hindsight is wonderful, isn't it? RMS encodes the long records in a form which I had to figure out. And that's the key. > For records that are too large to fit in the $GET buffer, if I remember > correctly, you can stecify that the rest of the record be provided in > the next SYS$GET call, or that it be truncated (lost). I suppose we could have done it with two $GETs, yes. Unfortunately, without knowing for sure how the file was being written by FTP, we didn't know that. FTP is saving it as two records, one of 32767 bytes, and one of 330 bytes. I only found that out once I looked at the blocks while debugging my routines. And I can't be sure it'll always work this way. We're using MULTINET. What if we switch to UCX (unlikely) and it does things differently? I like the idea of having a library around which will read any record length, anyway. I'd suggest that RMS get with the times, but honestly this is the first time I can think of where this has been an issue. And RAB64 helped, so I've got no kick. The upshot of all this is that I will likely speak to the programmer, tell him this, and see if he wants to continue using this library or not. If not, so be it. If so, I'll fix the padding thing. Otherwise, I'll probably not bother with the rest of the record formats. Either way, I've had fun writing it, and it seemed like a good idea at the time. If it ends up being set aside for now, fine. -- Don't bother with piddly crap like "gun control". Life is 100% fatal. Ban it.