dsjob -ljobs

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Naveen
Premium Member
Premium Member
Posts: 15
Joined: Sat Jan 07, 2006 10:51 pm

dsjob -ljobs

Post by Naveen »

Hi,

I am trying to get the operational jobs(Running jobs based on the status codes) from version 8.1 using the command dsjob -ljobs -status <Status_Code> which is not working. It seems the -status option is not available in 8.1. The same command is working fine in version 8.5. Could anyone please suggest the alternative method to get the operational jobs in version 8.1 based on the status code.


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

Post by ray.wurlod »

The -status option should not be available with the -ljobs option in version 8.5 (or any version). The -status option reports a job status once a job run request has been fulfilled.

You could script something (probably using awk or sed) to parse the output of dsjob -ljobs command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Naveen
Premium Member
Premium Member
Posts: 15
Joined: Sat Jan 07, 2006 10:51 pm

Post by Naveen »

Hi Ray,

Below are two cases where i am getting issue in 8.1 and able to get the result in 8.5.

dsjob -ljobs -status 1/2/9/21/0/3/96/97 <PROJ_NAME>

1. In 8.5, i am giving the above command and i am able to get the result. Its giving the list of jobs with the status as given.

2. In 8.1, when i execute the above command, its giving the below error message. When i try execute dsjob -ljobs without status option, its working fine.

Invalid arguments: dsjob -ljobs <project>
Status code = -9999 DSJE_DSJOB_ERROR

I wanted this to get the list of jobs to determine which are operational and which are non-operational jobs based on the status codes.

Below are the status codes available.
1 "Finished"
2 "Finished (see log)"
9 "Has been reset"
11 "Validated OK"
12 "Validated (see log)"
21 "Has been reset"
99 "Compiled"
NOT Runnable Job Status (reset job)
0 "Running"
3 "Aborted"
8 "Failed validation"
13 "Failed validation"
96 "Aborted"
97 "Stopped"
98 "Not Compiled"

Is there any alternative where we can determine the operational jobs in 8.1 based on the status coded. Please suggest any approaches to get this.


Thanks,
Naveen
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

He already did. Post an example of the output in 8.1 of -ljobs without the status option. Doesn't have to be the whole thing, just a nice little sample will do.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So it sounds like you'll need to take the list of jobs and iterate through that, running each through dsjob -jobinfo and then parsing that output.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply