From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,1670c267b7f4262d X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,1670c267b7f4262d X-Google-Attributes: gid1164f8,public X-Google-Thread: 1094ba,1670c267b7f4262d X-Google-Attributes: gid1094ba,public From: hoffman@xdelta.enet.dec.nospam (Hoff Hoffman) Subject: Re: new to VMS need help with indexed files Date: 1998/12/28 Message-ID: <76951p$bbk@usenet.pa.dec.com>#1/1 X-Deja-AN: 426595994 Distribution: world References: <36843058.415BB923@cyberdude.com> Organization: Compaq Computer Corporation Reply-To: hoffman@xdelta.zko.dec.nospam Newsgroups: comp.sys.dec,comp.os.vms,comp.lang.fortran In article <36843058.415BB923@cyberdude.com>, Dani Steinmetz writes: :I'm new to OpenVms and Vax enviroment and I need some help with Indexed :files. In general, they're easier than they look. They're a whole lot easier than the first look at the (admittedly quite intimidating) RMS reference manuals might initially make them out to be, too... You are responsible for the organization of the records stored in the file, and for defining (using EDIT/FDL or similar) the file and the key structure. You then write records to the file, and RMS takes care of tracking the keys. When you want to read records, you can specify a particular target key or a particular starting key, and you can specify sequential access by any key. :If anyone has examples of indexed file processing that they can share, I :would greatly appreciate it. I'm coding in Fortran so that would be :best. but I'll take anything if it's commented. Using some simple DCL procedures calling commands such as OPEN, READ, READ/KEY, WRITE, CLOSE, and CREATE/FDL might well be the easiest approach to learning more about the basic operation of indexed files. You can use EDIT/FDL to interactively create or alter the file definition language (FDL) file required by the CREATE/FDL command, and you can use ANALYZE/RMS/FDL to generate an FDL file based on the specified (existing) file. (There are callable routines -- such as fdl$create -- that allow a program to perform similar operations.) For examples of indexed file access, check the OpenVMS Freeware. Also see the Guide to OpenVMS File Applications in the documentation set for background information. Both the first and second editions of the _Guide to Writing Real Programs in DCL_ book (available from http://www.bh.com) have examples and related text, there were various updates made in the file-related chapters for the second edition. If your site has access to DSNlink, consider looking around online for various source code examples -- I'd fully expect a number of Fortran examples of accessing indexed files can be found in the DSNlink support databases. You may well find a few examples using the http://www.dejanews.com/ or INFO-VAX newsgroup archives, as well. -------------------------- pure personal opinion --------------------------- Hoff (Stephen) Hoffman OpenVMS Engineering hoffman@xdelta.ZZenet.dec.com note to those folks not contributing spam -- there is no ZZ in my address