Copy stage in datastage

Copy stage in datastage

The copy stage in DataStage allows you to drop, rename or change the order of input columns. It could propagate records of input data set to any number of output links.This ability lets the developer perform backup and processing in the same job parallelly.


Let us assume there are six columns in source input data set, and we want first 3 column in dataset_1 and last three columns in dataset_2 and all the columns in the dataset_3.

Columns in input file

  1. Name
  2. Age
  3. Dept
  4. salary
  5. roll
  6. address

Solution :

  1.  Drag and Drop the four dataset stages and link them as defined in this post (click here for creating dataset tutorial here ).
  2. Go to properties of Copy stage  and go to output tab  and click on Mapping tab
  3. Select the output link as dslink 6
  4. Now map the first three columns
  5. Similarly select the output link as dslink7 and map the last columns
  6. Finally, choose the output link dslink8 and map all the columns to target.
  7. Now compile the job and run the job.

Force Option

The force option in Copy Stage tells the DataStage whether to optimize job automatically by preventing copy operation if there is one input and output link.

By default, it is set to false.

Note: The data type of columns can be changed by changing the type on the output links
Related: Example including change of data type

Share this post

Leave a Reply