I'm a rookie, I'm trying to read a flat file and looking up another flat file,
the object is send only those records whose fname exists in lookup file.
The job is able to read records from both primary source and lkp source, but unable to write it back to output.
Lookup condition:
DSLink4.EMP_FNAME=DSLink14.FNAME
Thanks
LKP stage in DS for XE/390
Moderators: chulett, rschirm, roy
LKP stage in DS for XE/390
Data Mover
[quote="Mike"]What do you mean by "unable to write it back to output"?
Mike[/quote]
The Job Details and the spool report is as follows:
Typically I've used 1 CFF stage (primary source), 1 FixedWidthFlatfile (lookup), Lookup Stage, and FixedWidth Flatfile (output).
There exists 6 matches in LKP. The process should write 6 records to output file.
RECORDS READ FROM DDNAME (PRIMARY SOURCE): 10
RECORDS READ FROM DDNAME (LOOKUP SOURCE) : 06
RECORDS WRITTEN TO DDNAME (OUTPUT FILE): 00
Thanks
Mike[/quote]
The Job Details and the spool report is as follows:
Typically I've used 1 CFF stage (primary source), 1 FixedWidthFlatfile (lookup), Lookup Stage, and FixedWidth Flatfile (output).
There exists 6 matches in LKP. The process should write 6 records to output file.
RECORDS READ FROM DDNAME (PRIMARY SOURCE): 10
RECORDS READ FROM DDNAME (LOOKUP SOURCE) : 06
RECORDS WRITTEN TO DDNAME (OUTPUT FILE): 00
Thanks
Data Mover
Papan,
What is your setting for "Lookup technique"? What is your "Lookup condition"? What is your setting for "Action if lookup condition fails"?
I suspect that you have "skip row" for a failed lookup.
I think the records read count for your lookup source is the number of records that were preloaded to memory (hash technique or auto technique with an equality condition).
If you switch to "Null Fill" for a failed lookup you will get 10 records out.
There are 2 ways to get 6 records out:
1) Use "Skip row" which will skip all unmatched records (in your case probably all 10 are unmatched).
2) Use "Null Fill" and use an output constraint in a transformer immediately following the lookup stage to filter out unmatched rows (this technique makes debugging easier).
Best practice is to always insert a transformer stage immediately before and after a lookup stage.
Mike
What is your setting for "Lookup technique"? What is your "Lookup condition"? What is your setting for "Action if lookup condition fails"?
I suspect that you have "skip row" for a failed lookup.
I think the records read count for your lookup source is the number of records that were preloaded to memory (hash technique or auto technique with an equality condition).
If you switch to "Null Fill" for a failed lookup you will get 10 records out.
There are 2 ways to get 6 records out:
1) Use "Skip row" which will skip all unmatched records (in your case probably all 10 are unmatched).
2) Use "Null Fill" and use an output constraint in a transformer immediately following the lookup stage to filter out unmatched rows (this technique makes debugging easier).
Best practice is to always insert a transformer stage immediately before and after a lookup stage.
Mike
LKP Stage in DS/XE390
[quote="Mike"]Papan,
What is your setting for "Lookup technique"? What is your "Lookup condition"? What is your setting for "Action if lookup condition fails"?
I suspect that you have "skip row" for a failed lookup.
I think the records read count for your lookup source is the number of records that were preloaded to memory (hash technique or auto technique with an equality condition).
If you switch to "Null Fill" for a failed lookup you will get 10 records out.
There are 2 ways to get 6 records out:
1) Use "Skip row" which will skip all unmatched records (in your case probably all 10 are unmatched).
2) Use "Null Fill" and use an output constraint in a transformer immediately following the lookup stage to filter out unmatched rows (this technique makes debugging easier).
Best practice is to always insert a transformer stage immediately before and after a lookup stage.
Mike[/quote]
Mike,
I applied transform stage after LKP stage and also corrected the lkpfield metadata, works perfectly. Appreciated the clue..
Thanks a lot....
What is your setting for "Lookup technique"? What is your "Lookup condition"? What is your setting for "Action if lookup condition fails"?
I suspect that you have "skip row" for a failed lookup.
I think the records read count for your lookup source is the number of records that were preloaded to memory (hash technique or auto technique with an equality condition).
If you switch to "Null Fill" for a failed lookup you will get 10 records out.
There are 2 ways to get 6 records out:
1) Use "Skip row" which will skip all unmatched records (in your case probably all 10 are unmatched).
2) Use "Null Fill" and use an output constraint in a transformer immediately following the lookup stage to filter out unmatched rows (this technique makes debugging easier).
Best practice is to always insert a transformer stage immediately before and after a lookup stage.
Mike[/quote]
Mike,
I applied transform stage after LKP stage and also corrected the lkpfield metadata, works perfectly. Appreciated the clue..
Thanks a lot....
Data Mover