How to submit a Datastage Job from UNIX command line

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
trammohan
Participant
Posts: 47
Joined: Thu Nov 13, 2003 12:47 pm

How to submit a Datastage Job from UNIX command line

Post by trammohan »

Hi ,


How to submit a Datastage job ( Datastage 7.0 ) from UNIX command line?

Thanks
Ram
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

This is covered fully on this site. Search for anything on dsjob, the unix command line interface.

Here is a script that I posted if you're looking for examples of a fully fleshed interface:

viewtopic.php?t=85578
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
was curious...
for 1 since your talking enterpise edition (AKA paralel extender or PX) why not post it in the right place?
and 2ndly Ken, does this script covers all there is for the PX edition and PX jobs?
(for my 2nd observation, since I'm no PX expert I guess some else might answer that, I'm just asking the question myself.)

p.s.
I invite everyone to read Ray's advice on posting etc' in the last news-letter, it's right on the money IMHO(even opened my eyes to the add to favorites option :oops: )
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

roy wrote: and 2ndly Ken, does this script covers all there is for the PX edition and PX jobs?
As far as I know, dsjob works for all job types. Since this script just executes dsjob and uses it to query for job status, I hope there's no problems. All of the other stuff is used to simply demonstrate gathering parameter values, passing them in, prep'ing some audit tables, etc. All of the good stuff that makes the jobstream flexible and give an audit trail.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
holgi02
Participant
Posts: 20
Joined: Tue Apr 22, 2003 3:17 am
Location: UK

Post by holgi02 »

On a related subject - is there a definitive list in the documentation of the exit codes and meanings from dsjob? I have looked but failed to find them anywhere.

Tx.

Gil. :(
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yep! Should be under your 'DSEngine/include' directory in the dsapi.h header file. Or at least it is for a UNIX server of Version 7.x vintage. One of the perils of coming in at the end of a thread like this - we don't know your specs, just the original poster's. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
holgi02
Participant
Posts: 20
Joined: Tue Apr 22, 2003 3:17 am
Location: UK

Post by holgi02 »

I never thought to look in the header files - silly me :oops:

Perhaps those good people at Ascential could get it into a .pdf manual somewhere. :wink:

Thanks chaps.

Gil.
holgi02
Participant
Posts: 20
Joined: Tue Apr 22, 2003 3:17 am
Location: UK

Post by holgi02 »

Further information about job exit status codes and meanings found as follows on a Windows install taking ALL the defaults at
C:\Ascential\DataStage\Dsdk\include\dsapi.h

Code: Select all

/* 'jobStatus' values... */

#define DSJS_RUNNING           0	/* Job running */
#define DSJS_RUNOK	          1	/* Job finished a normal run with no warnings */
#define DSJS_RUNWARN	        2	/* Job finished a normal run with warnings */
#define DSJS_RUNFAILED	      3	/* Job finished a normal run with a fatal error */
#define DSJS_VALOK		      11	/* Job finished a validation run with no warnings */
#define DSJS_VALWARN	       12	/* Job finished a validation run with warnings */
#define DSJS_VALFAILED        13	/* Job failed a validation run  */
#define DSJS_RESET		      21	/* Job finished a reset run */
#define DSJS_CRASHED	       96	/* Job was stopped by some indeterminate action */
#define DSJS_STOPPED	       97	/* Job was stopped by operator intervention (can't tell run type) */
#define DSJS_NOTRUNNABLE 	  98	/* Job has not been compiled */
#define DSJS_NOTRUNNING	    99	/* Any other status */

This would appear to be the list I was looking for.

Thanks,

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

Post by ray.wurlod »

The same list, for BASIC, is in dsinclude/JOBCONTROL.H in your project directory. The constants are set up using EQUATE (rather than #define, which is for C).
To use these in your routines, include the following declarations in the top of your source code.

Code: Select all

$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
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