cancel
Showing results for 
Search instead for 
Did you mean: 

group records

Former Member
0 Kudos

Hi,

input is a file contains a set of records. i have to group the records based on a field and the field contains string value. let it be 'name' field. if file contains reords with name john and smith then ,records with name 'john' should be grouped and with name 'smith' should be grouped like that.

any suggestions plz

Accepted Solutions (0)

Answers (2)

Answers (2)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Defina an input and output structure like.

MT_X

---<JOHN>

-


key

-


detail1

-


detail2

---<SMITHA>

-


key

-


detail1

-


detail2

---<XXXXXX>

---<YYYYY>

FCC Configuration:

Document Name : MT_X

Recordset Structure: JOHN,,SMITHA,,XXXXX,,YYYYY,

Key Field Name : key

parameters:

JOHN.filedSeparator = ' '

JOHN.fieldNames = key,datail1,detail2

JOHN.keyFieldValue = 'JOHN'

JOHN.endSeparator = 'nl'

Repeat the same for all the fields.

Now all the records with name JOHN will come under the same structure in the input file.

Former Member
0 Kudos

Hi

U can use the user defined functions to solve the problem.

regards

yugapreetha