Is it possible that when I transfer a file from a PF on the iSeries to Excel that I could get the column headings for each field instead of the fields names? Currently using rpgivtools commands cpytormtf/sndftpf to download to network drive. Suggestions?
Software/Hardware used:
ASKED:
November 17, 2006 10:03 AM
UPDATED:
December 25, 2009 6:38 AM
This is how I got around the same issue. I created a spreadsheet with the headings I wanted and save it as csv. Then when I do my file transfer I just copy this excel spreadsheet to the location that the physical file is going. But I used the cpytoimpf with the comma separated and append option. Then I created a Physical file to hold these values and created a ILE program to process it. This a little manual but the only way I could do it. If you find an easier way please let me know please.
This is my workaround to the field name limitation. Column headings for my spreadsheet are stored on the i5 in a file F55001B which I maintain with DFU.
I copy the heading row (row 1) with the command:
CPYTOIMPF FROMFILE(F55001B) +
TOSTMF(‘/QNTC/server/rmaO/text.TXT’) +
MBROPT(*REPLACE) +
STMFCODPAG(*PCASCII) +
RCDDLM(*CRLF)
I append data to this text file with CPYTOIMPF MBROPT(*ADD)
In Microsoft Excel, on menu bar, select Data > Import External Data, and define an import from the text.txt file. Users can then refresh this Excel worksheet by clicking the red Exclamation point(!) icon.
EricWL