CURSOR SQLSERVER => DATASTAGE
Moderators: chulett, rschirm, roy
Cursors are local to databases. You cannot build a curson in datastage (as far as i know) but you can surely implement the same logic within datastage job(s). My advice to you is, sit down with a cursor expert, get detailed psuedo code as to what the cursor is exactly doing and then translate that to a datastage job. Once you have the psuedo code, you can post it here and maybe someone will help you design the job.
Regards,
Regards,
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Nick
I think Ray is assuming that because you marked your profile as parallel then you want to build a PX or parallel job and not a server job. Both are part of DataStage. PX which is also called parallel is the newer part of DataStage development. It can be many times faster than a server job. It takes longer to develop a PX job and is less intuitive but the payoff is performance.
So this forum and the PX forum are about DataStage. The job designs are limited to the type of job either PX or server therefore our answer change based on the type of job. That is why Ray wanted to move this question to the PX forum. We tend to answer even if the question was in the wrong forum. We really do not like it if the question is posted in the totally wrong forum like ProfileStage. I hope this helps.
I think Ray is assuming that because you marked your profile as parallel then you want to build a PX or parallel job and not a server job. Both are part of DataStage. PX which is also called parallel is the newer part of DataStage development. It can be many times faster than a server job. It takes longer to develop a PX job and is less intuitive but the payoff is performance.
So this forum and the PX forum are about DataStage. The job designs are limited to the type of job either PX or server therefore our answer change based on the type of job. That is why Ray wanted to move this question to the PX forum. We tend to answer even if the question was in the wrong forum. We really do not like it if the question is posted in the totally wrong forum like ProfileStage. I hope this helps.
Mamu Kim
Convert all the statement with in the cursor in the SQL into a single record set in Datastage, may be by using single or multiple jobs. User Transformer, for all you typecasing, case condition, If then else check... If it is PX job, leverage the filter, SWITCH for these purpose.
Now cursor can be tranformed to either lookup or a Join/Merge based on your requirement.
Now cursor can be tranformed to either lookup or a Join/Merge based on your requirement.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
