FAQ's - APPX Software, Inc. : APPX Utility : APPX Development Environment : Tips & Techniques :
How to create an ASCII fixed length flat file using Appx | |
Create a consecutive file in your application with the necessary fields. All fields must be type Alpha. If needed, add a two character field for carriage return/line (last field).
Create an update process and simply SET, or CNV TEXT, fields from your source file (PCF) into the alpha fields of the consecutive file. The actual Appx file (filename.dat) in the database Data directory will contain the ASCII text file. You might consider renaming it to filename.txt before using or sending the file to someone else.
The carriage return/line feed characters can be added as follows; In Start of Process… CNV BIN --- CDF HEX00 = 0 CNV BIN --- CDF HEX0A = 10
In Start if Frame… APPEND --- TEMP 2 0 --- CDF HEX0A APPEND --- TEMP 2 0 --- CDF HEX00Numeric and Date fields must be converted to text using the CNV TEXT command. Other formatting may need to be performed depending on your particular specifications.
Don’t forget to WRITE the records to the consecutive file. Also, you must SCRATCH and CREATE the flat file on each execution of the Update process. If the file is not scratched, data will be appended to the end of the file.
| |
[Append to This Answer] | |
2007-Jan-31 1:22pm |
Previous: | How to create a PDF Form Overlay |
Next: | Execution Cycle in Appx 4.2 |
|