row by row processing in datastage
Moderators: chulett, rschirm, roy
row by row processing in datastage
Hi all,
I need to do row by row processing in datastage
example:
I have JOB1 and JOB2 , JOB1 is writing some 10 records in output file
FILE1.
for each record of FILE1 i need to process JOB2 and write output.
any suggestions please welcome
regards
mahi
I need to do row by row processing in datastage
example:
I have JOB1 and JOB2 , JOB1 is writing some 10 records in output file
FILE1.
for each record of FILE1 i need to process JOB2 and write output.
any suggestions please welcome
regards
mahi
Custom job control. Look at a Batch job to get you started, all you need to do is capture the contents of FILE1 into an array and setup a loop. Consider something like this:
Code: Select all
UNIXcmd="cat ":FILE
Call DSExecute("UNIX", UNIXcmd, ScreenOutput, ReturnCode)
LineCount = DCOUNT(ScreenOutput, @AM)
For LinePtr=1 to LineCount
Line=ScreenOutput<LinePtr>
...
... Do whatever you need to do with this line
... Your jobcontrol commands
...
Next LinePtr
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
I am really curious, mahi_mahi, can you please tell me why you want the data to be processed row by row. If you can tell us what is leading you to decide upon row by row processing then maybe we can come up with a better solution, performance wise and practice wise.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Thank you very much for your replies..My process is:
I will be receiving set of files daily
and i have set of conditions(abt 100) to check on each of these file on each of record in it...
PROCESS A
In this I will read the list of files file (a file which will have list of file names wht i recvd) record by record
for each record (it will have the filename to be processed) i need to run process B
PROCESS B
in this process it will apply all those 100 conditions
on each record and after applying conditions I will derive a flag which
tells me about discard the record or not
Now How can implement this process PROCESS A and B in datastage
i.e for each record process in A should run B
as pkomalla mentioned I can use shell script for process A and call Process B
but how can I halt the next triggering of Process B until the first processing completed
I will be receiving set of files daily
and i have set of conditions(abt 100) to check on each of these file on each of record in it...
PROCESS A
In this I will read the list of files file (a file which will have list of file names wht i recvd) record by record
for each record (it will have the filename to be processed) i need to run process B
PROCESS B
in this process it will apply all those 100 conditions
on each record and after applying conditions I will derive a flag which
tells me about discard the record or not
Now How can implement this process PROCESS A and B in datastage
i.e for each record process in A should run B
as pkomalla mentioned I can use shell script for process A and call Process B
but how can I halt the next triggering of Process B until the first processing completed
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
good point, I just thought it was relevent to the OP but I started a new one here:chulett wrote:Please start a new thread rather than (further) hi-jacking this one.
viewtopic.php?t=100317