I am trying to output a file, but have ran into a few things.
The command I am using is as follows:
===> CPYTOIMPF FROMFILE(BRANDNEW/CARCODE) TOSTMF('QIBM/CARCODE.TXT') MBROPT(*REPLACE) RCDDLM(*CRLF) FLDDLM('|')
Problems:
1) The output file that is created is in ASCII characters. I noticed if I created a blank file from my PC in the folder and then ran that command, it came through as plain text... how can I get it to do that while creating the file (so I don't have to create blank TXT files before running this command.
2) It does not put the header row in the output file. Is there a way to have the first line be the header row from the query?
Any help is appreciated, I am new to AS/400 commands.
Thanks
The command I am using is as follows:
===> CPYTOIMPF FROMFILE(BRANDNEW/CARCODE) TOSTMF('QIBM/CARCODE.TXT') MBROPT(*REPLACE) RCDDLM(*CRLF) FLDDLM('|')
Problems:
1) The output file that is created is in ASCII characters. I noticed if I created a blank file from my PC in the folder and then ran that command, it came through as plain text... how can I get it to do that while creating the file (so I don't have to create blank TXT files before running this command.
2) It does not put the header row in the output file. Is there a way to have the first line be the header row from the query?
Any help is appreciated, I am new to AS/400 commands.
Thanks