1827881 Members
1524 Online
109969 Solutions
New Discussion

About RMS and FDL

 
SOLVED
Go to solution
Sathyaswarupa
Contributor

About RMS and FDL

Hi All,
I'm new to this RMS and the FDL in VMS.
Can anyone give me an introduction to RMS and FDL and some of the scenarios where we use the RMS and the FDLs???
6 REPLIES 6
Robert Brooks_1
Honored Contributor

Re: About RMS and FDL

How familiar are you with the VMS documentation set? If you are new to RMS, then you can learn a staggering amount of great information from the doc set.

Start with the Guide to File Applications

http://h71000.www7.hp.com/doc/731FINAL/4506/4506PRO.HTML

The RMS Utilities manual is quite good, also

http://h71000.www7.hp.com/doc/73final/6027/6027PRO.HTML


-- Rob
Hein van den Heuvel
Honored Contributor

Re: About RMS and FDL

As Rober write... RTFM: Read The Fine Manuals!

And as always for VMS: Use HELP
For example:
HELP RMS
RMS
"OpenVMS Record Management Services (RMS) are generalized routines that assist user programs in processing and managing files and records."

$ HELP FDL

FDL
File Definition Language (FDL) files define the attributes of RMS files. You can use FDL to specify RMS options and parameters that can be used when creating a file. "


RMS if often largely transparent. Programs or scripts just 'read' and 'write' and deep down RMS functions take care of actually doing so. RMS, and notably INDEXED files, can also be very explicit and visible and be used pretty much as a DATABASE. For those the FDL files (themselve simple text files) are most critical as they are the easiest, and clearest, way to describe for example KEYs (position, length, type).

There is lots of information on OpenVMS on the web. Some (Basic)+RMS examples:
http://www3.sympatico.ca/n.rieck/links/openvms_demos.html
http://www3.sympatico.ca/n.rieck/links/openvms_mini_faq.html

Have fun reading up!
Come back when you have a specific, detail, question.

Cheers,
Hein.
comarow
Trusted Contributor
Solution

Re: About RMS and FDL

RMS is a file system.
FDL is file description language. It
describes a file.
Analyze = reads a file, and we can tell
it to create an FDL description from
a file.

Convert can read in a file and create a new
one.

We often Analyze a file and create an FDL
We optimize that FDL script.
We convert that file, using the FDL script
to tell the convert utility how to create
the new version of the file.


The most common reason we use FDLs is related to file optimization of ISAM files.

I'll try and give you a feeling for the most common reason we use the FDL utility.

An ISAM file is an Indexed file.

As we add and remove records from the file,
a pointer is kept in the index, for each key of the file. If we have an index "bucket" that is filled, and we add a record, the bucket gets split, and we get pointers to pointers.

As records are removed, the record isn't actually deleted, but it is marked deleted.

Over time, with these bucket splits, records marked deleted and such, the file performance begins to slow down. Many additional I/Os can be required to locate a record, or even determine it is not there.

Consequently, what we do is we use the
Anlayze utility to analyze the file and create a FDL script that describes the file.

Suppose we had a file called
myfile.dat

anal/rms/fdl= myfile.fdl myfile.dat

This created the FDL script.

using that myfile.fdl we can optimize it a variety of ways. There is the FDL utility

edit/fdl/analy=myfile.fdl myfile.fdl

than you will be in the FDL utility. Try going through the optimze script.

Usually for performance you want to add additional records so it creates a larger file, and reduce the fill factor so the index has room for more records.

These are VERY general guidelines.

Then, to read all the records from your old file, and create a new data file, you would do this.

Convert/fdl=myfile.fdl myfile.dat myfile.dat

It will read all the old records, use your new fill factor, and if you said additional records, it would pre-allocate additional records in the file.

All the records that were deleted would finally be gone.

Usually, if an application uses a lot of
RMS files, this will be the most important part of improving performance. There are ancient files out there, begging for RMS optimization.

This is no substitute for reading the documentation, but perhaps this overview will help.



Hein van den Heuvel
Honored Contributor

Re: About RMS and FDL

Thanks Comarow! ... but it is not entirely accurate.

>> RMS is a file system.

No. ODS-2 and ODS-5 are the fiel systems VMS tends to use, as managed by the XQP code.
RMS is a RECORD management system and operated within the files, the only 'confusion' is that RMS also has lookup ($PARSE) services, which are more file system like.

>> Convert can read in a file and create a new one.
Actaully... Convert just asks RMS to read the records but indeed knows how to write them 'fast'.

>> We often Analyze a file and create an FDL
>> We optimize that FDL script.

With EDIT/FDL/NOINTERACTIVE.
Mind you, the ANAL is only needed for a first time. After that, you can just change the record count to something reasonably matching the immediate future.
>> As we add and remove records from the file, a pointer is kept in the index, for each key of the file.

Close... there is only one index pointer for a bucket full of data records.

>> If we have an index "bucket" that is filled, and we add a record, the bucket gets split, and we get pointers to pointers.

Kinda. RMS adds an index level, as needed.

>> As records are removed, the record isn't actually deleted, but it is marked deleted.

Depends, on whether duplicates are allowed and whether there are other records left. RMS can and will actual remove records.

>> Over time, with these bucket splits,

Not with 'those' (index) bucket splits, but with the DATA bucket splits.

>> records marked deleted and such,

Emtpy data buckets may indeed hurt.

>> the file performance begins to slow down.

Right.

>> Many additional I/Os can be required to locate a record, or even determine it is not there.

Bucket splits really only cause 1 extra IO when access through an alternate key and NO extra IO for primary key lookup.

>> reduce the fill factor so the index has room for more records.

That's very very application dependend.
If records are only added 'to the end' or in clumps, then you might as well use 100% fill.


>> There are ancient files out there, begging for RMS optimization.

Very true!

My RMS_TUNE_CHECK on the OpenVMS Freeware website may help finding those.

>> This is no substitute for reading the documentation, but perhaps this overview will help.

Absolutely!


Cheers,
Hein.
Wim Van den Wyngaert
Honored Contributor

Re: About RMS and FDL

It's clear who is the RMS master over here.

If you Google in groups and have to many hits, try adding Hein and Heuvel to your search items to reduce the list. Worked many times for me.

Wim
Wim
John Yu_1
Valued Contributor

Re: About RMS and FDL

There's also the create/fdl - kinda nice for preallocating and tuning files for performance. FDL is mostly for use from DCL either interactive or in a com script.

Convert/fdl is also good for converting from native language file-formats for example Fortran control to say C-style stream_lf format.

RMS being a service is also callable from dcl and programming languages. Your can use it as more of a scalpel where FDL is more of general purpose tool.
Artificial intelligence is rarely a match for natural stupidity.