Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!YALE.ARPA!LEICHTER-JERRY From: LEICHTER-JERRY@YALE.ARPA.UUCP Newsgroups: comp.os.vms Subject: RE: Batch log files and EDT Message-ID: <8704171755.AA06468@ucbvax.Berkeley.EDU> Date: Fri, 17-Apr-87 12:55:31 EST Article-I.D.: ucbvax.8704171755.AA06468 Posted: Fri Apr 17 12:55:31 1987 Date-Received: Sat, 18-Apr-87 06:07:25 EST Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Distribution: world Organization: The ARPA Internet Lines: 43 This whole area (the multitude of formats for "simple text files", and the incompatible handling of such files by various utilities) is probably the single worst feature of VMS. It is not, however, totally without rhyme or reason: For some reason, DCL insists on writing text files as VFC files (variable with fixed control) with the record attribute as "Print File Carriage Control". This is true for batch logs (I did a DIR/FULL on a .LOG file for this information), or files written with OPEN/WRITE. In this VFC file, the control bytes (2) contain the carriage control information (1 byte for spacing before printing the line and 1 byte for spacing after printing the line). There's a very simple reason why DCL creates process-permanent files with print file carriage control: Images can write to the PPF using any of the supported record formats, and the print file format is the only one that is a superset of all the rest - i.e., can model the rest correctly without a lot of elaborate, and potentially high-overhead, hacking. The VAX C library is pretty good at converting all the various arcane formats into simple ASCII streams, and is quite capable of writing those streams out as "vanilla" VMS text files (variable length, carriage return carriage con- trol) - though you have to ask it to do so, since its default is STREAM_LF format. An fopen call of the form: fopen(fspec,"w","rfm=var","rat=cr") will do the trick. The traditional tool for "normalizing" file formats, however, is TECO - it will read damn near anything correctly, and write a "vanilla" file. There's no need to actually do any editing: Just type: $ EDIT/TECO *EX$$ where the "*" is TECO's prompt, and the "$"'s are ESCAPE's - CTRL/[ for those with ESCAPE-proof keyboards. (Those of you on VAXes without PDP-11 compatibi- lity mode, and also without the PDP-11 simulator that comes with the VAX RSX product, will have to wait for V5's native-mode TECO....) -- Jerry -------