I think now you can understand my real problem.
I'm not sure I do.
Are you looking for a way to create a mask with an * meaning "anything in between"?
TOTO.TITI*TATA - does this mean 'TOTO.TITI' followed by any number of characters followed by 'TATA'? If so,it can be done with DFSORT's PARSE function like this:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
TOTO.TITI25678TATA
TOTO.TITI25TATA
TOTO.TITI85TATA
TOTO.TITI659TATA
TUTU.154785
TOTO.TITI59
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC PARSE=(%=(STARTAFT=C'TOTO.TITI'),
%01=(STARTAT=C'TATA',FIXLEN=4)),
OVERLAY=(81:%01)
SORT FIELDS=(1,44,CH,A)
OUTFIL INCLUDE=(81,4,CH,EQ,C'TATA'),BUILD=(1,80)
/*
SORTOUT would have:
TOTO.TITI25TATA
TOTO.TITI25678TATA
TOTO.TITI659TATA
TOTO.TITI85TATA
I need match TOTO.TITI*TATA.TUTU*TETE
Does this mean 'TOTO.TITI' followed by any number of characters followed by 'TATA.TUTU' followed by any number of characters followed by 'TETE''? If so you could use a simialar DFSORT job to do it like this.
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
TOTO.TITI*TATA.TUTU*TETE
TOTO.TITI15
TOTO.TITI823TATA.TUTU52
TOTO.TITI134TATA.TUTU831TETE
TOTO.TITI1TATA.TUTU00TETE
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC PARSE=(%=(STARTAFT=C'TOTO.TITI'),
%=(STARTAFT=C'TATA.TUTU'),
%01=(STARTAT=C'TETE',FIXLEN=4)),
OVERLAY=(81:%01)
SORT FIELDS=(1,44,CH,A)
OUTFIL INCLUDE=(81,4,CH,EQ,C'TETE'),BUILD=(1,80)
/*
SORTOUT would have:
TOTO.TITI*TATA.TUTU*TETE
TOTO.TITI1TATA.TUTU00TETE
TOTO.TITI134TATA.TUTU831TETE
If that's not what you want, then you need to explain more clearly what you do want with better examples of input and output.