regarding DSattachjob

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
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

regarding DSattachjob

Post by raj_konig »

Folks,

I am trying to use DSAttachJob Function to attach a job.

"DSAttachJob('test',DSJ.ERRFATAL)" where test is the name of the job.

I even tried appending version to the jobname.

But it is still showing in RED.

Please help me out.

Thanks in aAdvance
Rajesh
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Look at UtilityRunJob in the SDK.
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You are trying to use it where? The fact that it shows in red implies you are in the wrong place or at least on the wrong path. Why don't you let us know what you are trying to accomplish, what your goal in all of this is?
-craig

"You can never have too many knives" -- Logan Nine Fingers
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

Actually I am trying to get the metadata/ run-time inforamtion of a partiular job. Basically i am setting job_handler for a job and by using this job handler i am trying to get the information of that job.

As of now i am using this in the transformation.

rajesh
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This routine is not meant to be called for each row in a transform stage; it will show in red in a Transform because it is not defined in the list of valid functions. DSAttachJob and the other DS... functions documented in the BASIC manual are meant to be used from within your own routines.
raj_konig
Participant
Posts: 67
Joined: Thu Dec 22, 2005 12:27 am

Post by raj_konig »

Thank you for the information.

i am able to call DSAttachjob thru a routine but the retuned value is an integer.

But According to the BASIC guide,
"Do not assume that this value is an integer.", is what is written under the syntax of DSAttachJob

So what i am getting is correct?

Thanks
rajesh
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Yes, the value is correct; the comment in the documentation is meant to avoid programmers checking the validity of the variable using integer conditions (i.e. FileHandle < 1). You should use the documented methods in the routine description to detect if the call was successful.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It may currently be an integer but "they" reserve the right to change it (for example to a pointer to a structure). Currently it's a row number in a table of pointers to structures.

No, you can not have access to that table.

Treat it like any other opaque variable (file handle, subroutine handle, connection handle, etc.) You are likely to get caught out badly if you rely on the integer nature of a job handle.
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