VOC Entry Details

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Ravindar
Participant
Posts: 30
Joined: Tue Mar 23, 2004 6:14 am
Location: Chennai, India

VOC Entry Details

Post by Ravindar »

Hi all,

Let me know,

1.How to see VOC entry details from
1.OS environment
2.Datastage Environment
2.How to store VOC entry into a file.

Thanks in advance...
xcb
Premium Member
Premium Member
Posts: 66
Joined: Wed Mar 05, 2003 6:03 pm
Location: Brisbane, Australia
Contact:

Post by xcb »

1. Use UVRead found in the bin directory under your datastage installation.

Code: Select all

eg. dshome\bin\UVRead PathToProject\VOC RECORD.ID
2. Use telnet or administrator to view the contents of the VOC in the Datastage environment

Code: Select all

LIST VOC
or

Code: Select all

CT VOC RECORD.ID
3. Since the VOC is a universe file you can view the contents of it by using a UV or HASH stage. Then using whatever way tickles your fancy, store the VOC entries into a file of your choice.
Cameron Boog
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The VOC is the heart of an account. A project is a Universe account. Do a search for VOC especially with me as the author. I have discussed it several times. The is VOC stores all the file pointers and the dictionary pointers. An account is a DOS or UNIX directory which has 4 files in it. VOC, VOCLIB and their dictionary files D_VOC and D_VOCLIB. The commands you execute when you run uv or uvsh are called TCL commands. Similar to JCL commands. You can run SQL similar to SQL plus in Oracle very crude. This version on Universe does not support JDBC but you can use Java or VB or C++ to connect to Universe and update the VOC or any other hash file.

The DataStage jobs and routines are all stored in hash files within and account. The key files all start with DS like DS_JOBS or DS_JOBOBJECTS. The format of the records in these hash files is a secret. A few poeple outside of ASCL employees know some of where things are stored and can automate simple tasks like copy parameters from one job to another. The primary langauge of Universe is BASIC. Their own special flavor of BASIC. It is the same syntax of a routine. Those of us which used Universe before DataStage know this langauge very well. It is very powerful and can be very ugly. Good data structures and good programming practices are beneficial in any language.

I hope this helps.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why do you want to know?

VOC, in case you were unaware, is the vocabulary for the DataStage project. Not only the file pointers, but also every word or token (including references to routines) needed by DataStage are stored in the vocabulary.

What you have asked - to be able to see the contents - is harmless enough, but seeing is not understanding. A good reference that desribes the VOC file is the UniVerse System Description which can be downloaded from the IBM web site.

Do not attempt to change the VOC file without a deep understanding of what you are doing.

In particular, do not attempt to change the DataStage Repository to some other database; any such attempt is doomed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dzdiver
Participant
Posts: 36
Joined: Tue May 25, 2004 8:55 am
Location: global

Post by dzdiver »

ray.wurlod wrote: A good reference that desribes the VOC file is the UniVerse System Description which can be downloaded from the IBM web site.
Hi Ray, this seems to have moved and when I search the IBM site for something, the best I can get is a publication they want $45 for.

What Im looking for is a reference that I can learn from.
Specifically Id like to be able to query the VOC to determine the structure of hash files in our system.
Is it possible to have a query that says something like
"select hash file names where hash file is keyed on columns X and Y and contains columns A or B" ?

thanks,
Brian.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It was right when I posted but, yes, they have reorganized the site. Now you can get ithere (the $45 is for a paper copy - the PDF remains free).

You can not directly query the VOC file for key columns of hashed files. Metadata are not stored in the VOC file; only the location of the data portion and file dictionary are stored in the VOC file.

I guess you could construct some kind of on-the-fly join from VOC to each file's dictionary (perhaps via TRANS() functions), but then you would need to have some understanding of the different ways that single-column keys and multi-column keys are handled in file dictionaries, for example the @KEY control record.

It's not something I'm going to devote a lot of time to. You would be easier working directly from the table definitions in your DataStage Repository. Table definitions are stored in a table called DS_METADATA; a table definition includes a collection of column definitions, in which exists a list of column names and a corresponding list of "is key" properties.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dzdiver
Participant
Posts: 36
Joined: Tue May 25, 2004 8:55 am
Location: global

Post by dzdiver »

Thanks Ray. Got the pdf. Will take a look at the ds_metadata.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Beware that most of the metadata for DS_METADATA are not in the public domain.
You can get some sense of what's possible by looking at Kim Duke's tools and their associated SQL; some of which has been posted on this forum (Search is your friend).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply