The best way is to use the DBFXFER command which transfers the file from the AS/400 to the PC in one operation with different options that can be set using the DBXPROP command.
If you need to control or build the file you can use the following commands to create the file.
• CRF creates the file,
• NLN new line,
• NCL new column,
• VAL inserts the value,
• ENF ends of the creation, frees all resources.
The addition of values, in a given column, is done by the order VAL. The entry of the value will always be done in the current line. To create a new line condemns the seizure in the preceding line.
The safeguard of the data and the fence of the file are done by a call with order ENF.
It is also possible to carry out this operation into only once by carrying out a transfer of data by order DBFXFER. Thanks has this order, the data are exported to format CSV, directly exploitable by Excel.