Operating System - OpenVMS
1752565 Members
5688 Online
108788 Solutions
New Discussion

Getting started with HP Datatrieve (DTR)

 
Notilus007
Occasional Advisor

Getting started with HP Datatrieve (DTR)

In our organization we work with many RMS files with CDO records layout.

Most of these RMS files are binary file and therefore can not be viewed simply with a regular editor.

 

We are looking for a tool that can help us view these RMS file just by displaying each single record with its fields names & values. 

 

HP Datatrieve was suggested to us on the recent OpenVMS bootcamp in Bedford on March 2013,

but since we have never used it, we don't know how to start working with it.

 

Does anybody have a simple step by step guild that can help us with learning the basic of DTR ?

 

Any help on that issue would be appreciated.  

4 REPLIES 4
abrsvc
Respected Contributor

Re: Getting started with HP Datatrieve (DTR)

If you have applications already written to use these RMS files, why not use whatever language you already have to display hte record contents? IF you have the CDD record structure, match language variables to the fields and write/print out the values using some type of formatted output statements.

Update this with the current languages and perhaps a sample CDD definition, and we'll supply an example.

Dan
Notilus007
Occasional Advisor

Re: Getting started with HP Datatrieve (DTR)

We want a  tool that is straight forward that could display this output just by given any file name & structure.

We have a way to generate this output, but it requires building a report for every single file & structure which takes a lot of time and it is not a friendly tool, and very few people know how to use it.

Hein van den Heuvel
Honored Contributor

Re: Getting started with HP Datatrieve (DTR)

Love datatrieve. Brings back memories. 

Relation methods before those became all the rage.

Unfortunately it had to make its own language, different from the now defacte standard SQL.

Is has pretty good HELP and excellent manuals... that's where you should start.

 

It also has a GUIDE mode which is neat, but it kinda stears you in the wrong direction

(FIND 'COLLECTION' instead of FOR loops. )

 

Anyway here is a quick sample...

 

$ show def
  SYS$COMMON:[DTR]
$ data /nocdd
DATATRIEVE V7.3
Digital Query and Report System
Type HELP for help
DTR> set dictionary CDD$TOP.DTR.DTR$LIB.DEMO
DTR> show all
:
DTR> ready yachts
DTR> list first 2 yachts;

MANUFACTURER    : ALBERG
MODEL           : 37 MK II
RIG             : KETCH
LENGTH_OVER_ALL : 37
DISPLACEMENT    : 20,000
BEAM            : 12
PRICE           : $36,951

MANUFACTURER    : ALBIN
MODEL           : 79
RIG             : SLOOP
LENGTH_OVER_ALL : 26
DISPLACEMENT    :  4,200
BEAM            : 10
PRICE           : $17,900
:
DTR> for first 2 yachts print;

                               LENGTH
                                OVER
MANUFACTURER   MODEL     RIG    ALL   WEIGHT BEAM  PRICE

 ALBERG      37 MK II   KETCH   37    20,000  12  $36,951
 ALBIN       79         SLOOP   26     4,200  10  $17,900

DTR> for first 2 yachts with LENGTH_OVER_ALL > 40 print;

                               LENGTH
                                OVER
MANUFACTURER   MODEL     RIG    ALL   WEIGHT BEAM  PRICE

 CHALLENGER  41         KETCH   41    26,700  13  $51,228
 COLUMBIA    41         SLOOP   41    20,700  11  $48,490

DTR> set guide
:
LEAVE

 


An other approach would be to use an ODBC provider which understands the CDD and/or CObol Copybooks.

Examples are CONNX and ATTUNITY.

I currently work for Attunity so let me give and example using their CONNECT driver for RMS

 

$ @navroot:[bin]cob_adl SYS$COMMON:[DTR.DTR$LIB.DEMO]yacht_rec.dtr "" 
$! ds = given name for 'datasource'
$ This generates 'BOAT' tables, which I tweaked some...
$ nav_util export table ds boat sys$login:yacht.xml
$ edit sys$login:yacht.xml
<?xml version='1.0' encoding='ISO-8859-1'?>
<navobj version='5.3.3.7'>
  <table name='YACHTS' datasource='ds' fileName='SYS$COMMON:[DTR]yacht.dat' organization='index'>
    <fields>
          <field name='MANUFACTURER' datatype='string' size='10'/>
          <field name='MODEL' datatype='string' size='10'/>
:
$ nav_util import ds sys$login:yacht.xml
Importing table 'YACHTS' - OK
$ navsql ds

NavSQL > select * from yachts where LENGTH_OVER_ALL > 41 limit to 2 rows;

MANUFACTURER      MODEL           RIG         LENGTH_OVER_ALL      DISPLACEMENT      BEAM      PRICE

OLYMPIC           ADVENTURE       KETCH       42                   24250             13        80500
PEARSON           419             KETCH       42                   21000             13        0

2 rows returned

The data definition above used the DTR source, but could also have directly import CDD records.

 The SQL example above was executed on OpenVMS itself but can easily be execute from the outside, for example in EXCEL through MSQuery!

 

Email me if you want to know more about that: first-name at attunity dot com

 

"You're on your own now. Good luck!"

Hein

 

 

Mike Kier
Valued Contributor

Re: Getting started with HP Datatrieve (DTR)

There is some Datatrieve documentation online in PDF form here: http://h30266.www3.hp.com/odl/i64lp/databases/dtr073/datrieve.htm

Also, you may find DIX very useful although I don't know if it integrates with the CDD - but getting record definitions out of CDD into a DIX form, especially if there aren't many variant record types for a file, is not difficult.
http://oooovms.dyndns.org/dix/dix_help.html

Practice Random Acts of VMS Marketing