This is one of the basic requirement in DataStage, we'll have to generate sequence numbers and then assign the same values to your required O/P field (e.g. 1, 2, 3, …). If you are using the import osh operator (through a stage, e.g. the Sequential File Stage) to read external data, you can use the -recordNumberField parameter.
Solution: Generate Row Number Field with DataStage Transformer Stage
There are number of different ways to solve this problem. Here I will share with you the easiest way to generate and assign sequence numbers using a...