Job Number

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

veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Job Number

Post by veera24 »

hi all,
Could any one tell me that where shall i get the job number of a particular job when it runs successfully?


Your time ll be appreciated..

Thanks in advance
veera...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

A job has a unique number regardless of if it runs successfully or not, which can change over the lifetime of the job. You can query DS_JOB for the number but I'm curious why you specified 'when it runs successfully'?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

chulett - I do pose a query regarding your statement, though which seems to be offtopic.
chulett wrote:...which can change over the lifetime of the job.
I am very keen to have a clarification for this statement. What causes the Job no changed over the lifetime of Job and how it happens internally?

Please clarify this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Import the job. First thing it does is 'clear' (delete) the existing job and then it is created with a new job number.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

Correct chulett.

The Job no of a particular Job is changed only when the Job which has same Job name, gets imported into that project.

Author - you may use this SQL

Code: Select all

SELECT JOBNO FROM DS_JOBS WHERE NAME like '%[i]Jobname[/i]'
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

veera24 - The SQL that ag_ram gave you is (a) incorrect and (b) uses undocumented tables in the product as well as the TCL command line.
It is simpler and better to get the job number by running the job, then looking at your first director log file entry and getting the name from there.
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

ArndW,

1. Would you like to let me correct myself the SQL i gave if i just intended to italic the job name in the code section.

2. Did you note that chulett has also recommended that way? Was he also wrong recommending to use undocumented tables?

3. Would you like to advise me where to look at Job no in the director log entries.

Please clarify this.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

ag_ram - I didn't state that either Craig or yourself were wrong, just that using documented methods is preferred over undocumented ones.

veera24 - I neglected to finished the details in my original post. Open up the 3rd log entry, where the ENVironment is displayed, and the LD_LIBRARY_PATH will have the jobno as the first entry.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ag_ram wrote:Correct chulett.
So... your question was some kind of a quiz? What the frak was the point of that? :evil:

If you knew the answer, just post it as a clarification. If you didn't, say "Thanks" and move on.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Craig, don't worry, it is just that Prof. ag_ram has put his seal of approval on your answer.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Lovely.
ArndW wrote:veera24 - I neglected to finished the details in my original post. Open up the 3rd log entry, where the ENVironment is displayed, and the LD_LIBRARY_PATH will have the jobno as the first entry.
Arnd, I looked for something in the logs that would denote the job number before I posted, in case there was something there. I still don't see it as HP-UX doesn't use LD_LIBRARY_PATH and the SHLIB_PATH entry in my jobs doesn't have the job number in it anywhere that I've noticed. So is this something OS specific? :?

Edited to add: I had also checked to see if there was a Macro for this, but didn't see one. So the DS_JOBS query is the only mechanism I am aware of to get this information.

Still curious why the original post was phrased the way it was.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I have cross-checked on AIX and Solaris and the jobno is there - so it would seem to be specific. I assume that the object directory is added because it is required, so I am surprised that HP-UX doesn't have it. Perhaps the addition is an artefact that will disappear at some future release.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Object directory? Is this perhaps a PX specific answer and not something that applies to Server jobs? I'll check closer when I get a chance.
-craig

"You can never have too many knives" -- Logan Nine Fingers
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

I guess we cannot view job number using director in server jobs and job sequences. :roll:
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Craig - that would make a lot of sense, since I never noticed that path before with server jobs.... yep, you are correct, I just checked a job sequence and it didn't modify any of the search rules.
Post Reply