Hash File Name - job parameter

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
narayana_382
Premium Member
Premium Member
Posts: 37
Joined: Wed Mar 23, 2005 5:20 am

Hash File Name - job parameter

Post by narayana_382 »

Hi All,

I have created a hash file in one job which contains one row and one column.
This value needs to be used in the next job. Kindly let me know how do I use this hash file data in the next jobs.
Can I pass the hash file as a parameter and use the data in that?

This is a very urgent requirement which needs to be moved to production.

Anticipating your help and many thanks for all that in advance.

Regards,
Narry.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Re: Hash File Name - job parameter

Post by DSguru2B »

narayana_382 wrote: This is a very urgent requirement
A piece of advice buddy, that statement will not guarantee a quicker reply. It just rubs the posters the wrong way, as this is an all-volunteer site.
As per your requirement, you said you have just one column right?
So that means this is the key too, which doesnt make sense. You need to provide the key to read the value, if you have just one column, how is that going to work? You are providing a value as a key to read the same value :? Am i missing something here... :roll:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
narayana_382
Premium Member
Premium Member
Posts: 37
Joined: Wed Mar 23, 2005 5:20 am

Post by narayana_382 »

Apologise for that statement Guru.

But I couldnt figure it out whether to create a hash file/sequential file and use the same file data for the next job.

kindly advise as to how should I proceed in using that one column and one row data in the next job transformer to populate in one of the column derivations.

Please help me...in this regard

Thanks,
Narry.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Well you can populate the hashed file with another column defined as key with a dummy value say 'x'.
Do a lookup in your second transformer with the key value hardcoded to the value you specified while building the hashed file, in this case 'x'. Get the second column from the hashed file which is what you want. Thats it.
You can also use USER STATUS and COMMON variables. But i dont want to confuse you more.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

There are many ways to get your results
If it is just one value.
I would read the value into the UserStatus of the job using DSSetUserStatus.
Then use the .$UserStatus value in the subsequent jobs in a Job Sequence
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Keep your answers relevant to the 4.x version of the product, kids. First anachronism - it no got Sequence jobs. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Yes, right. Well use the hashed file method.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
narayana_382
Premium Member
Premium Member
Posts: 37
Joined: Wed Mar 23, 2005 5:20 am

Post by narayana_382 »

Narshimha,

At present I am working on 4.2 and also migrating to the 7.5 version.
Please explain regarding the USERSTATUS that you were mentioning, so that I can use this logic when I move the job to 7.5.

Please let me know how do I pass the file (hash/sequential) as a parameter.

Thanks,
Narry.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Look in the help docs for DSSetUserStatus() function to set userstatus and DSGetJobInfo() with InfoType of DSJ.USERSTATUS.
Search this website for specific examples, this has been discussed time and again.
Regards,
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Narry,

Look in to the the documentation and posts on the forum, if you get into any blocks let us know.
Will be happy to help you out
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Post Reply