DSJob functon

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
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

DSJob functon

Post by anandkumarm »

I want to assign the inrow number value af link X to a variable in stage Y

Can i use the DSJ.LinkInrownumber.

Can I just put my link Name in this command?????

Any help is greatly Appreciated

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

Post by ArndW »

You can access a link's value using @INROWNUM in the same transform. If you wish to use that value in another transform downstream, then add this value to a new column in the output derivation. I'm not sure I understood your question or problem, but this might answer it. If not, perhaps you could explain in a bit more detail what you are trying to do.
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

Post by anandkumarm »

ArndW wrote:You can access a link's value using @INROWNUM in the same transform. If you wish to use that value in another transform downstream, then add this value to a new column in the output derivation. I'm not sure I understood your question or problem, but this might answer it. If not, perhaps you could explain in a bit more detail what you are trying to do.
Ok here is what exactly I am doing..I have a job with 10 transformers.Lets say my 10 th transformer writes data to a file.I want to catch the inrow number at the 10 th transformer and give this value to a variable in transformer 1

I am doing This Coz I want to process the second record only after the first record pass thru the 10 th transformer...I would appreciate if youy can suggest me any new ideas.
Thank you
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you do not have active-to-active stage interprocess buffering enabled then all the transforms will be executed by one process, and row 2 won't be read until row 1 processed; so there is no need for passing global values between stages. I don't understand why you have this restriction in your job design, though. Are you sure you need it?
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You can do this with a COMMON variable accessed using a custom FUNCTION, but you MUST disable row buffering, remove IPC stages, and disable read/writecaching for your premise to work no matter what. Another method would be to write the value to a single row hash file on the last transformer and reference it from the first transformer.
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
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

Post by anandkumarm »

ArndW wrote:If you do not have active-to-active stage interprocess buffering enabled then all the transforms will be executed by one process, and row 2 won't be read until row 1 processed; so there is no need for passing global values between stages. I don't understand why you have this restriction in your job design, though. Are you sure you need it?
What we are trying to do here is we do have some IPC stages in our jobs.So we only have this option .If we use RTI our performance is depreciating.So we are looking for an idea where we can process data just like RTI model which is one record at a time. but without using RTI....

There is a command which says
DSJ.(ME,ARG1,ARG2,ARG3).
Can i use link NAme in ARG 1 ,Stage NAme in ARG2 ,RowCount In arg3 for the above command ??
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

Post by anandkumarm »

anandkumarm wrote:
ArndW wrote:If you do not have active-to-active stage interprocess buffering enabled then all the transforms will be executed by one process, and row 2 won't be read until row 1 processed; so there is no need for passing global values between stages. I don't understand why you have this restriction in your job design, though. Are you sure you need it?
What we are trying to do here is we do have some IPC stages in our jobs.So we only have this option .If we use RTI our performance is depreciating.So we are looking for an idea where we can process data just like RTI model which is one record at a time. but without using RTI....

There is a command which says
DSJ.(ME,ARG1,ARG2,ARG3).
Can i use link NAme in ARG 1 ,Stage NAme in ARG2 ,RowCount In arg3 for the above command ??

Here is what the comand exactly is

DSGetLinkInfo (JobHandle, StageName, LinkName, InfoType)
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

Post by anandkumarm »

kcbland wrote:You can do this with a COMMON variable accessed using a custom FUNCTION, but you MUST disable row buffering, remove IPC stages, and disable read/writecaching for your premise to work no matter what. Another method would be to write the value to a single row hash file on the last transformer and reference it from the first transformer.
OOps I didnt understood exactly what you said..
I have to use IPC stages because of my jobs..(They HAve Transformers writng to LinkCollectors and LC wring to transformers..

What exactly you mean by Common variable. Is it Possible to Declare variable at Job Level Instead of Stage level. Environment variables wont work because Iam assigning A value to the variable in the job which is inrownumber...
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

anandkumarm wrote:
ArndW wrote:If you do not have active-to-active stage interprocess buffering enabled then all the transforms will be executed by one process, and row 2 won't be read until row 1 processed; so there is no need for passing global values between stages. I don't understand why you have this restriction in your job design, though. Are you sure you need it?
What we are trying to do here is we do have some IPC stages in our jobs.So we only have this option .If we use RTI our performance is depreciating.So we are looking for an idea where we can process data just like RTI model which is one record at a time. but without using RTI....

There is a command which says
DSJ.(ME,ARG1,ARG2,ARG3).
Can i use link NAme in ARG 1 ,Stage NAme in ARG2 ,RowCount In arg3 for the above command ??
If you don't have any IPC stages between the transformer stages and you don't have the active to active interprocess buffering enabled then your objective is met, even if you have few IPC stages somewhere else in the Job design. Experts correct me if I am wrong. :?
Success consists of getting up just one more time than you fall.
Post Reply