The field1 i need to extract from input file is coming in 2 - 21 postion.
The field2 i need to extract is coming in 123 - 125 position in my input file.
Currently i am omitting Header and trailer records using Omit condition.
Now I have got one requirement. Depending on the Month present in the header record (56 - 57 position in input file), i have to pick the field2 from input file in different positions.
For EX, if the month is 01, then i have to extract 123 - 125 as field2 from input file
If the month is 02, then i have to extract 126 - 128 as field2 from input file and so on.
The details of the month is present in header record only and it can be identified by it's first position. It starts with '0'.
Could you please let me know how it can be done in DFSORT?
The solution I posted is not lengthy. I expanded the solution for complete requirement where as the prior solution considered only first 2 months. This is the actual requirement.
For EX, if the month is 01, then i have to extract 123 - 125 as field2 from input file If the month is 02, then i have to extract 126 - 128 as field2 from input file and so on.
Op wanted to pick the fields depending on the value of the month. I expanded the solution for complete 12 months and I am NOT creating the control cards on the fly all the time. I just create 1 symbol to pick the position depending on the month.