Retrieving job details using UniVerse BASIC.

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
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Retrieving job details using UniVerse BASIC.

Post by videsh77 »

How can I retrieve details for a jobs by using Universe BASIC?

Say I need to collect stage variables & its derivations within job & write those to some file in a Unix directory.
Thanks with regards,
videsh.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There are many ways to collect that information from inside jobs and also from outside of them. If you want to collect stage variable value information the easiest way is to use DataStage and pass those values down a link and write it straight to a sequential file in the job.
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Post by videsh77 »

I need, Stage Variable name & its drivation.

I came across somewhere, cant locate now, you can retrieve list of jobs. So on the same lines, can we go to the depth to retrieve Stage Var name & drivations?
Thanks with regards,
videsh.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Check up the documentation for DSGetStageInfo(); I'm not at a DataStage PC right now so I can't check up, but one of the values you can retrieve there is for the Stage Variables. I don't think that the derivation is returned, though.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSGetStageInfo(hJob, StageName, DSJ.STAGEVARLIST) will return a list of the stage variable names.

The derivation of a stage variable is not part of the retrievable information using these functions, since it's design-time information only. You would need to recover them from DS_JOBOBJECTS, in which you would need to find the correct stage record then within that to unpack the collection of stage variables (which begins at the CStageVar marker).

Not a job for the faint hearted! Why do you want to do this? Do not the existing documentation tools provide what you require?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Post by videsh77 »

We have lengthy derivations within StageVars. It becomes difficult to track syntax or logical errors within this small window.

I was wondering if I can take out these derivations within transformer taken out to some sequential file. Task of reviewing those will be simpler.
Thanks with regards,
videsh.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Do a search for GenHtml. This is a series of jobs which extract this information into HTML documents. It is easy to cut and paste from these documents into whatever you like. The Reporting Assistant included with DataStage in the Manager will also extract this information into Access database named doc_tool.mdb. DwNav can be used to view this. If you want I can look up how stage variables are stored in these tables.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you're using 7.5 click on the icon on the toolbar that looks like Internet Explorer's icon. This will generate full documentation for the job design, including all derivations.
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