In datastage how we can do for this type or requirement:The sales data will be extracted in 2 flat files.Here is the codification suggested: SALE_HEADER_XXXXX_YYYYMMDD.PSVSALE_LINE_XXXXX_YYYYMMDD.PSVXXXXX = LVM sequence to ensure unicity and continuity of file exchangesCaution, there will an increment to implement.YYYYMMDD = LVM date of file creation COMPRESSION AND DELIVERY TO: SALE_HEADER_XXXXX_YYYYMMDD.ZIP AND SALE_LINE_XXXXX_YYYYMMDD.ZIPif suppose we run first time means the job names are sale_header_1_systemcurrentdate & sale_line_1_systemcurrentdate.if we run next time means the file name are sale_header_2_systemcurrentdate & sale_line_2_systemcurrentdate.if we run next time means the file names aresale_header_3_systemcurrentdate & sale_line_3_systemcurrentdate.we want one increment in that xxxxx place .can any one give suggestion on this issue.?

Showing Answers 1 - 1 of 1 Answers

Abhijain

  • Jul 29th, 2008
 

I am not sure will this work or not, I've not tried, but you can check with the looping stage from a sequence.

Call a job activity in a job sequence where you invoke a job to perform the increment operation as per your requirement. Then pass this value to loop activity, where in loop you call the unix script in which you pass this values as parameter and create the file and append the data in that.

The loop activity runs, no. of times you have incremented it.

Logic will looks like....

Sequence---

JobActivity_1 > Loop Start > Call Shell Script > End Loop

JobActivity_1 -- perform the increment logic and passes the incremented value to loop.

Shell Script --  Create a new file with the file name as incoming value and loads the data in it.

Loop Activity -- Runs the loops as per the no. of input values.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions