Dynamism in DataStage

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
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Dynamism in DataStage

Post by pravin1581 »

Hi All,

How can we implement dynamism in DataStage ? My requirement is there is a metadata file which contains the column name , length and thecolumn order and there is another input file which contains the data corresponding to the metadata file . The metadata file is dynamic in nature i.e. the no. of columns can vary in the file. Please suggest me a way to implement the above functionality.

Thanx in advance.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

What is the format of your metadata file? Can you give an example?
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

I_Server_Whale wrote:What is the format of your metadata file? Can you give an example?
The metadata file is a csv file. It contains three columns :

ColumnName ColumnWidth ColumnOrder
Name 10 1
EmpId 10 3
Salary 10 2

The Metadata file is more or less like this , but the rows may increase or decrease and that is the dynamism involved. The rows needs to be sorted according to the column order and mapped with the input data file and finally load in a another file.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I am unaware of any way to achieve this in server jobs.

Doubtless some kind of wizard could be written to read the file and create the table definition in the DataStage Repository - indeed, I've done that, but what becomes of the metadata after that? There's no extra information in the file about what to do with it. And, for text files, whence is the information about the format to be obtained?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

ray.wurlod wrote:I am unaware of any way to achieve this in server jobs.

Doubtless some kind of wizard could be written to read the file and create the table definition in the DataStage Repository - indeed, I've done that, but what becomes of the metadata after that? There's no extra information in the file about what to do with it. And, for text files, whence is the information about the format to be obtained?
Can you go ahead with the wizard part, may be that can be of some help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Too busy right now (at least for a week).
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 »

Invoking a Wizard is generally considered risky... best not to anger them with unreasonable demands. :wink:

Even if you do get this 'some help' I don't see how it's really going to help. The functionality you seek isn't available if you are expecting to be able to handle this kind of information 'on the fly' inside one job.

Something could be built to automagically build jobs from a template if you have the skillz, one for each unique combination of file values. By the time you do that however, you could have created a true 'template' job and spun off the jobs yourself by hand I would think. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

chulett wrote:Invoking a Wizard is generally considered risky... best not to anger them with unreasonable demands. :wink:

Even if you do get this 'some help' I don't see how it's really going to help. The functionality you seek isn't available if you are expecting to be able to handle this kind of information 'on the fly' inside one job.

Something could be built to automagically build jobs from a template if you have the skillz, one for each unique combination of file values. By the time you do that however, you could have created a true 'template' job and spun off the jobs yourself by hand I would think. :?
What about RCP property ?
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

chulett wrote:Invoking a Wizard is generally considered risky... best not to anger them with unreasonable demands. :wink:

Even if you do get this 'some help' I don't see how it's really going to help. The functionality you seek isn't available if you are expecting to be able to handle this kind of information 'on the fly' inside one job.

Something could be built to automagically build jobs from a template if you have the skillz, one for each unique combination of file values. By the time you do that however, you could have created a true 'template' job and spun off the jobs yourself by hand I would think. :?
What about RCP property ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What about it? Are we moving now from Server to PX jobs? :?

Don't see how it would help as it can't make metadata up out of whole cloth.
-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 »

RCP is not present in server jobs.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

DSguru2B wrote:RCP is not present in server jobs.
If this requirement can be met in Parallel jobs , then no issues.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

RCP is a good option that px jobs have but thats just for propogating the records. For any explicit transformations, the columns need to be defined.
And Yes, your requirement can be met in px jobs as long as you understand about the limitations of rcp.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post by pravin1581 »

DSguru2B wrote:RCP is a good option that px jobs have but thats just for propogating the records. For any explicit transformations, the columns need to be defined.
And Yes, your requirement can be met in px jobs as long as you understand about the limitations of rcp.
I have tried the RCP option and created the schema file that contains the metadata information , but the job is getting aborted with the following error :
Delimiter for field "Store" not found; input: <empty>, at offset: 8

The file that I am currently reading has comma as the filed delimeter and same has been defined in the job also, but its not working. Please provide a solution.
Post Reply