I still don't understand your requirement. Are you just trying to insert the number of records? If so, then COUNT is sufficient, you do not need SEQNUM. If this is not what you want, then please post an example of your expected output.
I am trying to count no. of records from 10 files but want to have sequence number also alongside for each count. Let us say, the first has 10, 2nd has 20, 3rd has 30 records.
Your output does not match the sample input in your previous post. Is there something unique in the records of each input file that identifies it as to which file it comes from? For example, does every record from file1 have a '1' in a certain position, whereas file2 would have a value of '2' in that same position? If there is an identifying field, then we can use SECTIONS with a COUNT in TRAILER3.
I have asked my seniors about this but they said like what you have asked for cannot be guranteed because the files are user created without any standards.
If you are concatenating all 10 files in this job and there are no unique file identifiers, then there is no way for the sort to know which file the record came from. Each input file would have to be pre-processed to include an identifier field.