Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ucbvax!UTMEM1.BITNET!JGILL From: JGILL@UTMEM1.BITNET.UUCP Newsgroups: mod.computers.vax Subject: ACCESSING SYSUAF.DAT FROM PASCAL Message-ID: <8702110231.AA26553@ucbvax.Berkeley.EDU> Date: Tue, 10-Feb-87 12:57:00 EST Article-I.D.: ucbvax.8702110231.AA26553 Posted: Tue Feb 10 12:57:00 1987 Date-Received: Thu, 12-Feb-87 01:49:43 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 31 Approved: info-vax@sri-kl.arpa If you have VMS 4.4 or later, you should use the $GETUAI system service. If you have VMS 4.3 or earlier, you can access it from PASCAL with the following: var sysuaf_file : file of varying [1500] of char; sysuaf_rec = record case integer of 1 : (s:varying [1500] of char); 2 : (r:record rlen : [word] $byte; { this has the actual length of the record } { fill in the rest of the record layout here} end) end; begin open(file_variable := sysuaf_file, file_name := 'sys$system:sysuaf.dat', history := old, sharing := readwrite, access_method := keyed, error := continue); { rest of program } end. Reading from the file is no problem, but to write a true variable length record, you must use the WRITEV statement to write all the fields into a variable (in the above example, this would be writev(sysuaf_rec.s,field1, field2, ...); sysuaf_file^ := sysuaf_rec.s; update(sysuaf_file); John Gill JGILL@UTMEM1 University of Tennessee, Memphis