APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX Development Environment : (Category) 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 HEX00
Numeric 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: (Answer) How to create a PDF Form Overlay
Next: (Answer) Execution Cycle in Appx 4.2
This document is: http://board.appx.com/cgi-bin/fom.cgi?file=642
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.