Assumptions.
Your file:
testa 1,2,3
testb 12
testc 123,2,4
testd 1,2,3,4,5,1234,134,13,10
The Master for this file
FILENAME=MANISH, SUFFIX=FIX,
DATASET=FOCALPOINT/MANISH.TXT, $
SEGNAME=MANISH, SEGTYPE=S0
FIELDNAME=TNAME, FORMAT=A8, ACTUAL=A8, $
FIELDNAME=TDATA, FORMAT=A30, ACTUAL=A30, $
Maximum number of values: 10
Maximum length of each number: 5
The fex to split the TDATA field:
-* File manish.fex
-SET &MAXN=10;
-SET &MAXS=5;
DEFINE FILE MANISH
-REPEAT #SPLIT FOR &I FROM 1 TO &MAXN;
NUM&I / I&MAXS.S = EDIT(GETTOK(TDATA, 30, &I, ',', &MAXS, 'A&MAXS'));
-#SPLIT
END
TABLE FILE MANISH
PRINT
-REPEAT #P FOR &I FROM 1 TO &MAXN;
NUM&I
-#P
BY TNAME
ON TABLE SAVE AS MTEMP
END
-RUN
The MTEMP master:
FILENAME=MTEMP , SUFFIX=FIX
SEGMENT=MTEMP, SEGTYPE=S0
FIELDNAME=TNAME, ALIAS=E01, USAGE=A8, ACTUAL=A08, $
SEGMENT=MDATA, PARENT=MTEMP, OCCURS=VARIABLE, $
FIELDNAME=NUM, ALIAS=E02, USAGE=I5S, ACTUAL=A05, $
The output from MTEMP:
TABLE FILE MTEMP
PRINT *
IF NUM NE 0
END
From there you can join each value to the reference table.
Good luck!
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF