I’m afraid that the only way of doing this is to write a little program to handle it.
Basically, you need a program that will performa a DSPFFD to an *OUTFILE and then read through the outfile picking up the field names and building a string as ‘”FieldA”,”FieldB”,”FieldC”…’ until all fields have been read.
You then need to add that as the first record of a fixed record length import file. Then when you do your CPYTOIMPF from the database file you specify MBROPT(*ADD) to add the data records after the headings.
When you open the file in Excel then you will see the field names as column headings.
Hope it helps