Topic
  • 1 reply
  • Latest Post - ‏2013-02-06T20:13:08Z by SystemAdmin
SATH66
SATH66
8 Posts

Pinned topic can any one help me with map functions for displaying comma

‏2013-02-06T12:21:13Z |
I am writing a function to display a comma after a field. Input data is from a tab delimited file which has data as follows

201301301090013X 000315059xxx 12A035232901 1 CO 45
201301301090013X 000315059xxx 12A035232901 2 CO 45
201301301090013X 000315059xxx 12A035232901 3 CO 16
201301301090013X 000315059xxx 12A035232901 1 CO 129
201301301090013X 000315059xxx 12A035232901 2 CO 129
201301301090013X 000315059xxx 12A035232901 3 CO 129

I need to have data as follows in output

CO 45,129 N432 - this for seq no 1 (4th field in input file)
CO 45,129 N432 - this for seg no 2
CO 45,129 N432

But i am getting result as

CO, 45 ,, ,
CO, 45 ,, ,
CO, 16 ,, N391 ,

I have used logic as in following functional map to extract data for particular seq no

f_PRA_ADJ_CLAIM_GROUP(EXTRACT(AdjRsnSetProviderClaim:AdjRsnSetProvider:IN_ADJ_RSN_SETPAYEE,CLCL_ID Char Field:Adj_Reasons Record:AdjRsnSetProviderClaim:AdjRsnSetProvider:IN_ADJ_RSN_SETPAYEE=CLCL_ID Char Field:IN_LINE&SEQ_NO Char Field:Adj_Reasons Record:AdjRsnSetProviderClaim:AdjRsnSetProvider:IN_ADJ_RSN_SETPAYEE=SEQ_NO Char Field:IN_LINE))

I have used following maping logic for field CO.
SUBSTITUTE(TRIMRIGHT(UNIQUE(EXTRACT(ADJ_GROUP_CD Char Field:Adj_Reasons Record:In1,TRIMRIGHT(ADJ_GROUP_CD Char Field:Adj_Reasons Record:In1)!=""))+","),",,",",")

Can any one please inform how to map a field such that , is populated only when there is another field..
Updated on 2013-02-06T20:13:08Z at 2013-02-06T20:13:08Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: can any one help me with map functions for displaying comma

    ‏2013-02-06T20:13:08Z  
    Is there a sample map, you can attach and what version you are using ?