Page 1 of 1

what is DSJ.ME ?

Posted: Tue Feb 06, 2007 9:28 am
by parvathi
Hi all,

please tell the use and the purpose of DSJ.ME .

hand = DSJ.ME

v_jobName = DSGetJobInfo (hand,DSJ.JOBNAME)

what does the above piece of code do?
Please tell me how to exactly use it

Posted: Tue Feb 06, 2007 9:35 am
by bkerebel
hi,
DSJ.ME is to handle a job and do some actions on it, like running the job, testing status or errors

you can find some infos in how can we reset a datastage job using datastage coding or other topics (for job control). search DSJ.ME

Bertrand

Posted: Tue Feb 06, 2007 9:35 am
by parvathi
i have declared the variable
hand = DSJ.ME

v_jobName = DSGetJobInfo (hand,DSJ.JOBNAME)
when i compile the routine i get the error

Variable 'DSJ.ME' never assigned a value.
Array 'DSGetJobInfo' never dimensioned.
WARNING: Variable 'DSJ.JOBNAME' never assigned a value.

how could i resolve this issue

Posted: Tue Feb 06, 2007 9:36 am
by DSguru2B
Supply DSJ.ME in quotes.

Posted: Tue Feb 06, 2007 9:36 am
by ArndW
When you refer to DataStage internal variables and routines in your own job, you need to add the following line to your code:

Code: Select all

   $INCLUDE DSINCLUDE JOBCONTROL.H

Posted: Tue Feb 06, 2007 9:41 am
by bkerebel
hi,
the syntax is

v_jobName = DSGetJobInfo (DSJ.ME,DSJ.JOBNAME)

and then you can use v_jobName to do

ErrCodeRun = DSRunJob(v_jobName, DSJ.RUNNORMAL)

Bertrand

Posted: Tue Feb 06, 2007 9:57 am
by parvathi
ArndW wrote:When you refer to DataStage internal variables and routines in your own job, you need to add the following line to your code:

Code: Select all

   $INCLUDE DSINCLUDE JOBCONTROL.H
...
Thanks ..
By adding the above piece of code it works fine

Posted: Tue Feb 06, 2007 3:41 pm
by ray.wurlod
"Me" is a very common concept in object-oriented programming - it refers to the current object. In DataStage, depending on the function, the current object may be be job, the stage, the link. In DataStage BASIC the constant DSJ.ME serves to identify the current object.