Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding RMS File Structure

Berney
Occasional Contributor

Understanding RMS File Structure

hello,

I'm looking to transfer file from OpenVMS to Windows based computer.
How with an Binary file (transfered by FTP), can I reconstruct ASCII file ?
Is there any compressed record on it ?
(If I use ASCII transfert mode, I get some error (file corrupted)).
So, how can I rebuild ASCII structure from Binary one ?

What is the records separator ? How is organise an RMS file ? File Header, Records. Is records contain an Header ?

Thanks for informations.
21 REPLIES
Volker Halle
Honored Contributor

Re: Understanding RMS File Structure

Hi,

what's the File Organization ($ DIR/FULL) ?

You cannot expect to successfully transfer any non-sequential files to any non-VMS operating system.

Volker.

Berney
Occasional Contributor

Re: Understanding RMS File Structure

My file is :

Size: 431136/431136 Owner: [AGD,BKA]
Created: 29-APR-1996 05:26:34.03
Revised: 27-OCT-2006 17:32:48.44 (14874)
Expires:
Backup:
Effective:
Recording:
File organization: Indexed, Prolog: 3, Using 3 keys
In 3 areas
Shelved state: Online
File attributes: Allocation: 431136, Extend: 8784, Maximum bucket size: 9
Global buffer count: 0, No version limit
Contiguous best try
Record format: Fixed length 362 byte records
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RWED, World:
Access Cntrl List: None

Total of 1 file, 431136/431136 blocks.
Volker Halle
Honored Contributor

Re: Understanding RMS File Structure

AFAIK no other operating system can read OpenVMS RMS index-sequential (ISAM) files.

To transfer the data to another operating system, you need to extract the data records, i.e. convert this file to a sequential file, before trying to transfer it to another system.

If there is binary data in the record (e.g. floating point data), more work is probably required.

Volker.
Berney
Occasional Contributor

Re: Understanding RMS File Structure

Thanks I'll try it :-)
Hein van den Heuvel
Honored Contributor

Re: Understanding RMS File Structure

Ah, this seems to be related to topic
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1071857

>> Understanding RMS File Structure

Start with the VMS Guide to Files.
Check the presentation I mentioned in 1071857

>> I'm looking to transfer file from OpenVMS to Windows based computer.

May we ask WHY? What do you intent to do with the (indexed) file at the windows side.
I suppose someone (me :-) could write a tool to extract records, but that's much easier done on the VMS side! There are no existing access method for RMS indexed file records on Windows best we know.

>> Is there any compressed record on it ?

Yes

>> (If I use ASCII transfert mode, I get some error (file corrupted)).

In ascii mode FTP intruct RMS to go fetch RECORDS (which may contain ascii or binary data). This makes RMS interpret the file, and (apparently) detect a corruption.

>> So, how can I rebuild ASCII structure from Binary one ?

On VMS, with CONVERT.

>> What is the records separator ?

None. Record lengths are user.

>> How is organise an RMS file ?

Records in Buckets. Prologue pointing to Index buckets, Index buckets pointing to Data buckets. Each Data bucket pointing to the locgical next bucket, as well as being pointed to from the index.

Buckets have a header (with next pointer, check bytes, free space indicator)
Records have a header (with flag, original address, data length and key compression counts)

>> Thanks for informations.

You are welcome.
Good luck!
Hein.




Phil.Howell
Honored Contributor

Re: Understanding RMS File Structure

Hein said "There are no existing access method for RMS indexed file records on Windows", however there is software available from a number of companies (connx sector7 easysoft) that provide this facility.
Phil

Hein van den Heuvel
Honored Contributor

Re: Understanding RMS File Structure

Phil, the methods you refer to are odbc/jdbc client api's and associated OpenVMS server tasks to access RMS indexed file which live on a VMS box. Attunity is an other such.

But I was referring to the actual indexed files living on windows. I believe the Sector7 products comes closest. It does RAB's and FAB's, for sequential, relative and block files, but still not RMS indexed files (they do do D-Isam).

Regards,
Hein.

http://www.sector7.com/products_and_services/openvms/vx_tools/vxrms.html
term1976
Occasional Visitor

Re: Understanding RMS File Structure

Could anyone please describe binary structure of Indexed RMS files (Prologue, Keys, etc)

Alex.
Wim Van den Wyngaert
Honored Contributor

Re: Understanding RMS File Structure

If you simply want to transfer the contents of the file in a readable format, check if you have the product datatrieve (started with the command DTR). With DTR you can define the layout of the file, select the records you want and report the fields you want. And transfer it as a sequential file.

Wim
Wim
Ian Miller.
Honored Contributor

Re: Understanding RMS File Structure

There is much detail on RMS structure in

http://h71000.www7.hp.com/freeware/freeware60/rms_tools/rms_tuning.ppt


If you have a specific question then can you start a new thread as this makes it easier to find things.
____________________
Purely Personal Opinion
Ian Miller.
Honored Contributor

Re: Understanding RMS File Structure

There is much detail on RMS structure in

http://h71000.www7.hp.com/freeware/freeware60/rms_tools/rms_tuning.ppt


If you have a specific question then can you start a new thread as this makes it easier to find things.

See also
____________________
Purely Personal Opinion
Ian Miller.
Honored Contributor

Re: Understanding RMS File Structure

There is much detail on RMS structure in

http://h71000.www7.hp.com/freeware/freeware60/rms_tools/rms_tuning.ppt


If you have a specific question then can you start a new thread as this makes it easier to find things.

See also

http://h71000.www7.hp.com/doc/731FINAL/4506/4506pro_005.html#021_indexedfileorganization
____________________
Purely Personal Opinion
Ian Miller.
Honored Contributor

Re: Understanding RMS File Structure

I see my previous reply arrived three times - I was having trouble accessing the forum
____________________
Purely Personal Opinion
term1976
Occasional Visitor

Re: Understanding RMS File Structure

Hello,

thanks for reply. Presentation is very useful, but there is no information on Prologue and Areas structure.

Alex.
Hein van den Heuvel
Honored Contributor

Re: Understanding RMS File Structure


That would be because in 25 years playing with RMS indexed files I never found those interting. Just use ANAL/RMS/INT to 'see' the data or extract the defintions from LIB.MLB (or the C version) as:

$libr/extr=$areadef/out=sys$output sys$library:lib.mlb

What problem are you trying to solve?
(and as indicated, perhaps start a fresh topic for the exact problem.)

Regards,
Hein.
Ian Miller.
Honored Contributor

Re: Understanding RMS File Structure

another tool for exploring RMS indexed files is DIX
http://www.oooovms.dyndns.org/dix/
____________________
Purely Personal Opinion
term1976
Occasional Visitor

Re: Understanding RMS File Structure

Hello,

the problem is following, I have RMS indexed file out of OpenVMS system and I need to extract information from this file for further processing.
I can parse it by myself but I need to know the structure of the file and how data is stored.

Thanks in advance,
Alex
Duncan Morris
Honored Contributor

Re: Understanding RMS File Structure

Alex,

trying to parse an RMS Indexed file on a foreign OS is like trying to reinvent the wheel!

You would get on far quicker by converting the original indexed file to a sequential file before passing it your own system.

If you need more help, please open a new topic, so that you can assign points to the relpies.

Regards,

Duncan
Duncan Morris
Honored Contributor

Re: Understanding RMS File Structure

Alex,

trying to parse an RMS Indexed file on a foreign OS is like trying to reinvent the wheel!

You would get on far quicker by converting the original indexed file to a sequential file before passing it your own system.

If you need more help, please open a new topic, so that you can assign points to the replies.

Regards,

Duncan
Jan van den Ende
Honored Contributor

Re: Understanding RMS File Structure

Berney,

grosso mode I endorse the other answers given already.

The reason:

RMS in itself is a fair chunk of the OS itself.
Trying to re-create it (with a reasonable chance of correctness) would be the equivalent of re-writing a big chunk of a robust OS, but now, complicated by the lack of supporting functionality from several kernel functions of the OS!
It would amount to at least a many-manyear efoort.

And all the while, the _DATA_ is also available in plain text format (using any _VMS_ utility, just plain TYPE if you need the content of the whole file), then that may be tranfered using any ASCII tranfer (such as ftp, eg).
Should you so desire, you can import it into any other storing format on the target OS.

But "playing RMS" on a non-VMS platform will be a REALLY TREMENDOUS effort!

Hope this explains some.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Hein van den Heuvel
Honored Contributor

Re: Understanding RMS File Structure

How did the file get the the windoze box?
Can you still get to the original system?
Is this a one-shot conversion?
What is it worth to you to get this done?!

By far the easiest would be to rent, beg, steal, borrow an OpenVMS system (DECUS? Deathrow? Testdrive? HP Support? ) and just CONVERT/FDL=NL: to set a sequential file.
(Or maybe FDL="RECORD; FORMAT STREAM_LF" on an 8.3 system. :-)

Reading all the records from an indexed will is not TOO hard though, no knowlege about the index needed, jsut follow the data bucket next pointers and a few tricks with compression. I have some programs, made for OpenVMS which in a pinch would work on Windoze... but why bother. (Here is why... for mere money I'll be happy to adapt them :-).
Pick up DIX for a Fortran program which understands internal structures. In my RMS_TOOLS directory on the freeware you'll find C and BASIC programs which understand the Bucket and Record structures. I believe there is more freeware out there which does.

Regards,
Hein van den Heuvel
HvdH Performance Consulting