How to parameterize records in a File

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
aladap12
Participant
Posts: 60
Joined: Fri Jul 20, 2007 1:15 pm
Location: NO

How to parameterize records in a File

Post by aladap12 »

DS Friends,

I have an Issue at my work.Please help me if you have the solutuion and suggestions to solve my problem

My issue is .. I have a job that process on .txt file. This file contains more tham Million records. I need to set a parameter to job to stop after processing certain number of records.. say after 70000 records.

This number of records always varis, I need to set a parameter that lets the job know to stop after processing these many number of records.

How can I achive this in Datastage.

Thanks
VKR
ddevdutt
Participant
Posts: 47
Joined: Wed Aug 22, 2007 2:38 pm

Re: How to prametartise records in a File

Post by ddevdutt »

In the Sequential file stage, you have a property under Options "Read First Rows".

Set the value of this property to a job parameter and you should be good to go.
DD

Success is right around the corner
aladap12
Participant
Posts: 60
Joined: Fri Jul 20, 2007 1:15 pm
Location: NO

Re: How to prametartise records in a File

Post by aladap12 »

ddevdutt wrote:In the Sequential file stage, you have a property under Options "Read First Rows".

Set the value of this property to a job parameter and you should be good to go.
Hi,

Thanks for your response.Could you pelase tell me how can we set ReadFirstRows value as a job parameter.Please explain me.
Is it like setting value to the option in the stage itself or can we set that as a parameter.
Thanks In Advance.

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

Post by chulett »

Click on the small right-facing arrow-head next to the Property, Insert Job Parameter and then select New... if you need to create a new one for this.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rupeshg
Premium Member
Premium Member
Posts: 60
Joined: Thu Dec 22, 2005 6:02 am
Location: United Kingdom

Post by rupeshg »

Yes you can pass parameter to "Read First Rows" option in a sequential file property.

Insert the parameter in the value tab of "Read First Rows", example: #minrows#
where "minrows" is a parameter declared in job properties either with a default value or could be passed when prompted.

-RG
Post Reply