Page 1 of 1

Rearrange the records based on all matched numbers

Posted: Wed Nov 26, 2008 1:01 am
by ushasribandaru
Hi,

I have recrds some thing like below

AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,USD,081124,1752.96,FTI
38365029,SGD,081124,700,FTI
38365029,GBP,081124,381.88,FTI
706155078,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,DDE
38365029,SGD,081124,700,DDE
706155078,EUR,081124,1752.96,DDE


And i want to arrange them in the way that all the records in order having same account numbers.

Example like below(Required output)

AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
38365029,SGD,081124,700,FTI
38365029,SGD,081124,700,DDE
38365029,GBP,081124,381.88,FTI
706155078,EUR,081124,1752.96,FTI
706155078,EUR,081124,1752.96,DDE

I tried with extracting group of records if the ( accno for PROD(FTI) = accno for PROD(DDE))

=F_ShuffleRec(EXTRACT(Record_FTI Group:Output,AcctNum:Record_FTI Group:Output=
AcctNum:Record_DDE Group:Output ),EXTRACT(Record_DDE Group:Output,AcctNum:Record_DDE Group:Output=AcctNum:Record_FTI Group:Output ))


I am getting some repeated records like below:

AGD U20081120AGDCPF Consolidated Unprocessed Payment Report AGD
Acc_No, CCY, Value_Date, Total, PROD
706155031,EUR,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,SGD,081124,1752.96,DDE
706155031,EUR,081124,1752.96,FTI
706155031,USD,081124,1752.96,DDE
706155031,USD,081124,1752.96,FTI
706155031,USD,081124,1752.96,DDE
38365029,SGD,081124,700,FTI
38365029,SGD,081124,700,DDE
38365029,GBP,081124,381.88,FTI
38365029,SGD,081124,700,DDE
706155078,EUR,081124,1752.96,FTI
706155078,EUR,081124,1752.96,DDE


Can any one help on this,

Thanks,
Usha.

Posted: Wed Nov 26, 2008 1:09 am
by chulett
Wouldn't you just... sort... them? :?

Posted: Wed Nov 26, 2008 1:16 am
by ray.wurlod
I would.

Or, if I needed probabilistic rather than deterministic matching, I'd use QualityStage.

Posted: Wed Nov 26, 2008 7:07 am
by ushasribandaru
[quote="chulett"]Wouldn't you just... sort... them? :?[/quote]


Even it's not working in my scenario,insted the repeted records getting increased

Posted: Wed Nov 26, 2008 7:11 am
by ushasribandaru
[quote="ray.wurlod"]I would.

Or, if I needed probabilistic rather than deterministic matching, I'd use QualityStage. ...[/quote]

I am not aware of this QualityStage, can u help me to explain me in detail

Thank You

Posted: Wed Nov 26, 2008 7:57 am
by chulett
What's not working? Post your job design, where it seems that just a Sort stage would be needed with no stage variable shenenigans that you seem to be using. :?

Posted: Wed Nov 26, 2008 7:59 am
by chulett
ushasribandaru wrote:I am not aware of this QualityStage, can u help me to explain me in detail
U probably could but you really should ask Ray. And because you aren't aware of it, you probably don't have it so it will be somewhat... academic.

Posted: Wed Nov 26, 2008 1:13 pm
by ray.wurlod
Search worked for me, were you not able to search for some reason?

Posted: Wed Nov 26, 2008 2:25 pm
by kandyshandy
Where from you are getting source data? From a table or a file?

If it is from a table, add a ORDER BY ACC NO in your SELECT SQL.
If it is from a sequential file, tell us your job design... i.e what is your source stage, target stage, processing stages in between etc.

Based on the forum index, i believe that your job is a server job. Please let us know if it is otherwise.

Posted: Mon Dec 01, 2008 9:55 pm
by ushasribandaru
[quote="kandyshandy"]Where from you are getting source data? From a table or a file?

If it is from a table, add a ORDER BY ACC NO in your SELECT SQL.
If it is from a sequential file, tell us your job design... i.e what is your source stage, target stage, processing stages in between etc.

Based on the forum index, i believe that your job is a server job. Please let us know if it is otherwise.[/quote]


Thank You :)

Posted: Mon Dec 01, 2008 9:56 pm
by ushasribandaru
[quote="ray.wurlod"][url=http://www-01.ibm.com/software/data/inf ... litystage/]Search[/url] worked for me, were you not able to search for some reason? ...[/quote]

Thank you very much,I got it :)