I know that this question presupposes various analysis about length and
datatype especially for the alignment(I'm still writing to a rexx to do this that will be necessary to an icetool) but I only want to know if this option already exist.
DFSORT does not have any built-in features to do that.
Well, it does now! With z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006), you can use the new PARSE, %nn and JFY functions to do this kind of thing quite easily. Here's the DFSORT job:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD SYSOUT=*
//SYSIN DD *
* extract second variable field (starts at position 5, and
* ends before ';') into 2-byte %00 parsed field.
* extract third variable field (starts after ';' that ends first
* field, and ends before next ';') into 4-byte %01 parsed field.
* extract fourth variable field (starts after ';' that ends second
* field, and ends before next blank) into 5-byte %02 parsed field.
* Create output record with first field and ';' (1-4),
* right-justified %00 field, ';', %01 field, ';', and
* right-justified %02 field.
For complete information on PARSE, %nn and JFY, see: