ctmpsm -LISTJOB executing

Some examples running with Control-M and Control-EM database.
Post Reply
updt1

ctmpsm -LISTJOB executing

Post by updt1 » 08 Jan 2008 6:00

Hello,

I want to get the infomation about if a job is executing at this moment from the database server. I know that command
ctmpsm -LISTJOB executing
do what I need, but I have to run a SQL script that obtain the same information than this command does.

I suppose that is something like this:

SELECT <what> FROM cmr_ajf WHERE status = ? AND state = ?

I would like to know if it can be resolved with status = N and state = 5, but I don´t know what this status and state means, so please can you help me?
Are this status and state ok? What does it mean?
Is this SQL query ok?

Thanks in advance.

User avatar
ranger67
Nouveau
Nouveau
Posts: 52
Joined: 03 Jan 2008 12:00

Post by ranger67 » 08 Jan 2008 8:20

Below is the STATE list:

0-wait schedule
1-wait confirmation
2-submitted
3-not submitted
4-executing
5-ended
6-analyzed
7-disappeared
8-post processed
9-not found
A-wait rerun
B-wait time
C-wait cond
D-wait resource
E-wait submission
G-retry submission
I-failed
J-wait odat
k-post odat
z-unknown

As you can see the executing state is 4. What you probably want is:

select <what> from CMR_AJF where STATE='4'

STATUS is either NULL, Y, or N.

NULL - not ended
Y - ended ok
N - ended notok


You probably do not want to include the STATUS in the selection for executing.

Post Reply