home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 20116 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  3.8 KB

  1. Path: sparky!uunet!gatech!concert!ais.com!bruce
  2. From: bruce@ais.com (Bruce C. Wright)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Convert MSDOS or UNIX text format to VMS format
  5. Message-ID: <1992Dec30.131006.5923@ais.com>
  6. Date: 30 Dec 92 13:10:06 GMT
  7. References: <1992Dec30.085139.3959@cerberus.ulaval.ca>
  8. Organization: Applied Information Systems, Chapel Hill, NC
  9. Lines: 72
  10.  
  11. In article <1992Dec30.085139.3959@cerberus.ulaval.ca>, 2020211@SAPHIR.ULAVAL.CA (Sylvain Chamberland) writes:
  12. > Here's my problem: I don't have any archive utility on my system here so I went
  13. > to get a C source for "zip" by anonymous ftp. The source was written so it could
  14. > be portable, and I got the VMS supplementary files.
  15. > But it appears the source is not in a VMS format, because the VAX EDIT editor
  16. > will not accept any of the *.c or *.h files as files containing many lines. It
  17. > appears to me a whole file is considered as being composed of one or a few
  18. > lines by the editor or the compiler. The VAX C compiler ("CC") won't compile
  19. > the source, it does not seem to recognize the format.
  20. > [...]
  21. > I tried to transfer some files back and forth my IBM PC clone using the ymodem
  22. > protocol I just told about, then compared two versions of the same file with
  23. > the command ANALYZE/RMS_FILE: the original file, and one which went to my
  24. > computer and back. The "record type" had changed from "fixed" to "stream-LF",
  25. > [...]
  26.  
  27. Carl has already mentioned several things you might be able to do to
  28. get the program to work, and I had suggested some of the same things in
  29. an e-mail message I sent.
  30.  
  31. But it's clear you don't understand what the VMS record type that we're
  32. talking about is, and I think it might be worthwhile to give a brief
  33. outline of just what it means.
  34.  
  35. Unlike Unix, VMS (actually RMS, the Record Management Services, which is
  36. the file I/O library that is used for most I/O on VMS) has a concept of
  37. file and record types.  A file can have a type of:
  38.  
  39.     o    Indexed - an indexed-seqeuential file.  Records are logically
  40.     kept in a specific order depending on `keys' in the record, and
  41.     RMS does the necessary internal bookkeeping to make this both
  42.     reasonably efficient and transparent to the user (in general
  43.     the records will NOT be stored in physically sequential order).
  44.  
  45.     o    Relative - A type of direct-access file where records are
  46.     retrieved by record number, and which has a concept of a
  47.     `deleted record'.
  48.  
  49.     o    Sequential - A file which is a collection of records that are
  50.     both logically and physically sequential.  This is the most
  51.     like a Unix file organization.
  52.  
  53. Record types on VMS include:
  54.  
  55.     o    Fixed-length records.  All records in the file have the same
  56.     length, which is kept along with the file and record types in
  57.     the file header (sort of like a Unix inode).  There are no
  58.     delimiters or other information `between' records.
  59.  
  60.     o    Variable-length records.  Records can have a length up to
  61.     some maximum value;  the length for each record is contained
  62.     in a 2-byte word in front of each record.  This is probably
  63.     what you're seeing as the `00' byte between some records in a
  64.     VMS text file -- it's the high order byte of the length word.
  65.     This is the most common format for a VMS text file.
  66.  
  67.     o    Stream files.  These are files where records are delimited by
  68.     some kind of line delimiter.  The possibilities are STREAM_LF,
  69.     where the line delimiter is a line feed (LF);  STREAM_CR, where
  70.     the line delimiter is a carriage return (CR);  and STREAM_CRLF,
  71.     where the line delimiter is a carriage return/line feed pair
  72.     (CR/LF).  STREAM_LF is nearly identical to the usual Unix text
  73.     file format, and STREAM_CRLF is nearly identical to the usual
  74.     MS-DOS text file format.  Stream files are always sequential.
  75.  
  76. This gives you the major categories of files, but it is somewhat of a
  77. simplification -- there are several additional options that I've left
  78. out, but this covers the major types.
  79.  
  80. Bruce C. Wright
  81.