Add source file name to file output

OS: Linux
kernel ver: 2.6x
shell: Korn(ksh)

hi.

We are required to read contents for mutliple GZIP(.gz) files and perform some custom sanity checks downstream, example of such a check can a validation for the length of each record. We should accepts records which are 320 chars long and discard the ones which are are not. While discarding the invalid records, we need to know the source GZIP file that the record is coming from.

How can I get the name of the source file as a field of the command output?

Any help is appreciated.

Thanks.

Warm regards,
Kumarjit

What tools do you use to do the validations? Please depict the entire process.