I want to know more with in DS_JOBS commands

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
rajiivnb
Participant
Posts: 77
Joined: Fri Sep 10, 2004 8:38 am
Location: India

I want to know more with in DS_JOBS commands

Post by rajiivnb »

Hi all,

I want to know when and where i can use the DS_JOBS command. Where i can get the details, and what are all the objects or fields it contains within it. Anyone please give me some idea about it, i want to know about the structure of DS_JOBS. i saw, some one using the command
SELECT JOBNO FROM DS_JOBS WHERE NAME='Name of the job', So like this, i want to know more on the DS_JOBS.

Thanx in advance.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

If you LIST DICT DS_JOBS then you can see the published fields in DS_JOBS. This is the equivilent of DESCRIBE in Oracle. Most of what you want is hidden. Ex-employees of ASCL have access to what these fields are and what they do but the rest of us have learned the hard way by hacking into the data. If I want to know where something is stored then I store an unusual value in there like 777 or FindMyField. Then I search for this value.

DS_JOBOBJECTS has a ROOT record for each job. It cantains things like parameters and job control code. The key is a 3 part key with JOBNO being the middle value. The separator is a backward slash.

LIST ONLY DS_JOBOBJECTS

Will show you only the keys. The third part of the key is just for uniqueness. The important fields in DS_JOBOBJECTS are NAME and OLETYPE. NAME is usually the link name or stage name there are some exceptions. OLETYPE is the stage type. For a link there is an input and output record. I think hash files are OLETYPE CHashInput and CHashOutput. There is usually mutivalued data in each of these records which means you need to be experienced with Universe database in order to retrieve these fields. Usaully there is something like CCustomProperty/15 or COutputColumn/4 annoucing a set of multivalued fields. The 15 or 4 is how many multivalues there are. The "Column" ones are metadata. Everything you see in a grid like key or data type or length is stored in the fields following the column names.

The flag type fields are the hardest to debug like multiple instance flag. To figure this one out I saved the job as new name then I changed the value. Next I compared every record in each job to see what changed. Not hard if you know BASIC but not easy either. If I never wrote DsWebMon then I would of never figured out some of this.

This information took a long time to figure out where it is stored. There are very few people actually sharing code or information. There are many more which know these answers and have good code to share. It is sad to see so little free exchange of real solutions. It is one thing to point someone in the right direction and another to hand someone a complete set of jobs or routines.

Some believe in Karma. I believe you reap what you sow meaning I freely share ideas and solutions therefore ideas and solutions are freely given back to me. Most religions have a similar concept. Ray, Hester and others have many hours in some of the answers shared here. I just wish their giving attitude was more wide spread. I know others have improved on some of SQL or jobs I have posted. Please post your improvements back into the forum. If you have jobs then export them and post them on ADN.

Maybe DSX should have a private section where these solutions can be downloaded if you paid them a support fee. Dennis spends a lot of money supporting this web site. I think $100/year or $1000 for corporations is fair. I would pay it.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DS_JOBS is not a command, it's a database (Repository) table used to map job names to job numbers.

I believe you're asking about the dsjob command, which is a command line interface that can be used for:
  • running and stopping jobs
    working with job logs
    discovering information about projects, jobs, stages, links and parameters
    generating reports
    importing
You can read about the dsjob command in Chapter 19 of the Server Job Developer's Guide or Chapter 57 of the Parallel Job Developer's Guide. Search for the heading Command Line Interface.
You can also search this Forum.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Athorne
Participant
Posts: 57
Joined: Wed Feb 04, 2004 1:37 pm

Post by Athorne »

:roll: Try to ignore my thread hijacking but this plays right into a question I have.

I've looked at the documentation for the command line dsjob interface and I've used the param option to run all the jobs in a particular folder. The problem I have (this is part of PeopleSoft EPM btw), the delivered jobs from PeopleSoft have a few different folder structures.

In this particular case they have two folders named Inital_Load and the folders reside under two different folder structures. When I run dsjob on the command line and give that Inital_Load for the Folder name parameter it tries to run all the jobs in both folders.

I can't figure out how to give the fully qualified folder path so that it only runs one. Has anyone ever done this or possibly know how I can do this?
Andrew Thorne

Lead Software Engineer
PeopleSoft Technical Architecture
Enterprise Rent-A-Car
Post Reply