Re: Getting started with HP Datatrieve (DTR) (5127 Views)
Reply
Occasional Advisor
Notilus007
Posts: 10
Registered: ‎10-27-2011
Message 1 of 5 (5,176 Views)

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.  

Please use plain text.
Trusted Contributor
abrsvc
Posts: 362
Registered: ‎06-08-2010
Message 2 of 5 (5,165 Views)

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
Please use plain text.
Occasional Advisor
Notilus007
Posts: 10
Registered: ‎10-27-2011
Message 3 of 5 (5,156 Views)

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.

Please use plain text.
Honored Contributor
Hein van den Heuvel
Posts: 6,582
Registered: ‎05-19-2003
Message 4 of 5 (5,153 Views)

Re: Getting started with HP Datatrieve (DTR)

[ Edited ]

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

 

 

Please use plain text.
Valued Contributor
Mike Kier
Posts: 102
Registered: ‎05-18-2003
Message 5 of 5 (5,127 Views)

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
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation