Job parameter change in Running job

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
jsuryanathan
Participant
Posts: 6
Joined: Tue Jun 15, 2010 11:17 am

Job parameter change in Running job

Post by jsuryanathan »

Hi Experts,

I am new to Datastage Development. I have a requirement to create multiple files from a single big file.

I am planning to do as below.

1000(This will change everyday, may be next day 15k records come) records file is there.

I need to create dataset of 250 records each.

Job parameter pRecord =1 specified

in transformation I will perform @recordcount MOD 250. If the value is zero then pRecord =pRecord+1
My problem is how to change the job parameter pRecord and I am also using pRecord in my dataset name also.

Example:- TargetDS#pRecord#.ds
DS job output will be TargetDS1.ds, TargetDS2.ds, TargetDS3.ds and TargetDS4.ds (for 1000 records, this can be changed based on the records)






Please help me on this or suggest any good easy way to do.

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

Post by chulett »

a) You can't change a job parameter value.
b) Why not just script this using split? Don't need to job for that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jsuryanathan
Participant
Posts: 6
Joined: Tue Jun 15, 2010 11:17 am

Post by jsuryanathan »

chulett wrote:a) You can't change a job parameter value.
b) Why not just script this using split? Don't need to job for that.
Thanks for quick response. I got your point but I want to achieve this from DS job. Please suggest, how can I split
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Best way? Use a Server job and write to a Folder stage, it can handle the automatic file splitting and naming based on data elements for you. IMHO, of course.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply