How to use wave number in job

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
suryapkakani
Participant
Posts: 47
Joined: Wed Aug 20, 2008 7:31 am
Location: New jersey

How to use wave number in job

Post by suryapkakani »

Hi, I am still in the learning process and have a question regarding the wave number.
I have 4 jobs where table 1 is loaded with records from table 2 in one job and table 1 is loaded again with records from table 3 and so on from table 4 and 5..Everytime a job is run and table 1 is loaded i want all those records from table 2 in table 1 to have a unique number identifying that the records are from first run..similarly when second job is run i want to have all the records from table 3 in table 1 to have another unique number to identify that the records are from table 3 and so on..similarly to identify the records from table 4 and table 5 . I guess wave number is used to perform this job...
Can somebody please help me in using the wave number?? If we have to use DSJ wave number, how is it used? waiting for your reply. Thanks in advance.
sunny
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You never use wave number. It is for internal use only. It is DataStage's allocated number to identify a unique instance of a job run.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suryapkakani
Participant
Posts: 47
Joined: Wed Aug 20, 2008 7:31 am
Location: New jersey

Post by suryapkakani »

Thanks Ray,If i cannot use the wave number, Can you please suggest me a solution for this problem.
I have 4 jobs where table 1 is loaded with records from table 2 in one job and table 1 is loaded again with records from table 3 in second job and so on from table 4 and 5..Everytime a job is run and table 1 is loaded with records from table 2,3,4,5. I want to give a unique number to the records from table 2, table 3 ,table 4 and table 5 in table 1. I want these to be handled automatically after every job run. In Table 1 i should be able to identify the records from four different tables(4 or more tables). Thank you
sunny
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Add a column to the target table indicating the source table. Provide this value via a job parameter that can also be used in the table name field. The name of the table could be generated inside a loop in a sequence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Are you talking about a static number to indicate the source table? Or a unique sequence or pattern of 'numbers' from each table?
-craig

"You can never have too many knives" -- Logan Nine Fingers
suryapkakani
Participant
Posts: 47
Joined: Wed Aug 20, 2008 7:31 am
Location: New jersey

How to use the wave number for load control

Post by suryapkakani »

I want to use the wave number generated internally within the DataStage to identify the different data loads into a single table. I am trying to do the load control and need to capture the job details such as job name, job status, run begin and end time etc,. using this wave number in a different table. Is it possible?

Let me know if my question is confusing.

Thanks
sunny
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure, all that is possible but you need to forget the whole 'wave number' part. Forget that and concentrate on just what you need to accomplish without fixating on wave numbers.
-craig

"You can never have too many knives" -- Logan Nine Fingers
suryapkakani
Participant
Posts: 47
Joined: Wed Aug 20, 2008 7:31 am
Location: New jersey

Post by suryapkakani »

Chulett, Can you please tell me how it is done?
sunny
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Research the "DSGet" functions or their 'dsjob' command line equivalents, depending on where you want to do this. You can get "audit" information directly from each of the load jobs anytime after they complete without necessarily needing any special fields in the target table. Create them if you want to explicitly track forever what rows came from where but simple audit information like you're talking about - job name, rows processed, job start and end times, etc - can come from the job itself (DSGetJobInfo, DSGetLinkInfo,etc) or from the logs (DSGetLogSum, DSGetLogEntry,etc) all of which are explained in the documentation.

So a job can 'get' this information from another job and then load it into your audit table or land it for a separate load job. Or script something using dsjob and land that same information then load it using a job.
Last edited by chulett on Fri Oct 30, 2009 8:15 pm, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
suryapkakani
Participant
Posts: 47
Joined: Wed Aug 20, 2008 7:31 am
Location: New jersey

Post by suryapkakani »

Thanks Craig..I would do it and let you know..thanks again
sunny
Post Reply