Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* new to VMS need help with indexed files
@ 1998-12-26  5:00 Dani Steinmetz
  1998-12-26  5:00 ` Steve Lionel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dani Steinmetz @ 1998-12-26  5:00 UTC (permalink / raw)


hi,

I'm new to OpenVms and Vax enviroment and I need some help with Indexed
files.
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.

Thanks in advance

Dani Steinmetz
Transtech Systems Inc.

dani@transtech.net
danis@cyberdude.com




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: new to VMS need help with indexed files
  1998-12-26  5:00 new to VMS need help with indexed files Dani Steinmetz
  1998-12-26  5:00 ` Steve Lionel
@ 1998-12-26  5:00 ` George Cornelius
  1998-12-28  5:00 ` Hoff Hoffman
  2 siblings, 0 replies; 4+ messages in thread
From: George Cornelius @ 1998-12-26  5:00 UTC (permalink / raw)


In article <36843058.415BB923@cyberdude.com>, Dani Steinmetz <danis@cyberdude.com> writes:
> 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.

I notice that on the 5.5-2 VMS system I am posting from there's a sample
program in SYS$EXAMPLES that has some indexed operations in it - see listing
below for some excerpts found with SEARCH.  I notice that this program is
no longer present as of Alpha VMS 7.1, though.

--
George Cornelius              cornelius@eisner.decus.org
                              cornelius@mayo.edu


******************************
SYS$COMMON:[SYSHLP.EXAMPLES]RUFEXAMPLE.FOR;1

      OPEN (UNIT=10, FILE= 'RUF$CHECKING.DAT', STATUS = 'OLD',
     1      ORGANIZATION = 'INDEXED', ACCESS = 'KEYED')     

      OPEN (UNIT=11, FILE= 'RUF$SAVINGS.DAT', STATUS = 'OLD',
     1      ORGANIZATION = 'INDEXED', ACCESS = 'KEYED')     
*
* Recovery unit to initialize savings and checking account files. 
* Note that any I/O errors in this recovery unit will be ignored.
***************
      READ (UNIT=10, IOSTAT=IOS, 
     1 KEYEQ = Checking_account.number,ERR = 9992) 
     2 Checking_account
*
* Subtract $10 from the checking account balance.
***************
*      
      REWRITE (UNIT=10, IOSTAT=IOS, ERR = 9993)  Checking_account
      
      TYPE *, 'Pausing for 5 seconds'
      CALL LIB$WAIT (5)
***************
      READ (UNIT=11, IOSTAT=IOS,
     1 KEYEQ = Savings_account.number,ERR = 9994) Savings_account
*
* Add $10 to the savings account.
*
***************
*      
      REWRITE (UNIT=11, IOSTAT=IOS, ERR = 9995) Savings_account
*
* End the recovery unit.
*



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: new to VMS need help with indexed files
  1998-12-26  5:00 new to VMS need help with indexed files Dani Steinmetz
@ 1998-12-26  5:00 ` Steve Lionel
  1998-12-26  5:00 ` George Cornelius
  1998-12-28  5:00 ` Hoff Hoffman
  2 siblings, 0 replies; 4+ messages in thread
From: Steve Lionel @ 1998-12-26  5:00 UTC (permalink / raw)


Dani Steinmetz <danis@cyberdude.com> wrote in message
news:36843058.415BB923@cyberdude.com...

>I'm new to OpenVms and Vax enviroment and I need some help with Indexed
>files.
>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.

There's an entire section of the DIGITAL Fortran User Manual for OpenVMS VAX
(and Alpha) which covers INDEXED files and gives examples.  (I wrote it some
19 years ago!)

Steve Lionel                   mailto:Steve.Lionel@digital.com
DIGITAL Fortran Development    http://www.digital.com/info/slionel.html
Compaq Computer Corporation
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698          "Free advice is worth every cent"

DIGITAL Fortran web site: http://www.digital.com/fortran







^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: new to VMS need help with indexed files
  1998-12-26  5:00 new to VMS need help with indexed files Dani Steinmetz
  1998-12-26  5:00 ` Steve Lionel
  1998-12-26  5:00 ` George Cornelius
@ 1998-12-28  5:00 ` Hoff Hoffman
  2 siblings, 0 replies; 4+ messages in thread
From: Hoff Hoffman @ 1998-12-28  5:00 UTC (permalink / raw)



In article <36843058.415BB923@cyberdude.com>, Dani Steinmetz <danis@cyberdude.com> 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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-12-28  5:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-26  5:00 new to VMS need help with indexed files Dani Steinmetz
1998-12-26  5:00 ` Steve Lionel
1998-12-26  5:00 ` George Cornelius
1998-12-28  5:00 ` Hoff Hoffman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox