Page 1 of 1

Create a CSV of your Data Structure with field lengths

Posted: Mon Sep 14, 2009 4:01 pm
by Eric
The following command creates a Comma Separated file of the Database Structure with the Start-Stop Character Positions for each field in the database.

Download and unzip the seqstructure.zip file into the root level of the AccuZIP6 5.0 folder.

Open any database and run the following command to create a Comma Separated file of the Database Structure with the Start-Stop Character Positions for each field in the database:

Code: Select all

=SeqStructure(DBF()) 
You can also add one or two more parameters to output a different file type (other than CSV) and certain field names:
- This outputs the result to Fixed Length.

Code: Select all

=SeqStructure(DBF(),"TYPE SDF")
Change to TAB using: TYPE DELIMITED WITH TAB

Code: Select all

=SeqStructure(DBF(),"TYPE DELIMITED WITH TAB")
The third parameter can control which field attributes get output:
- These are all the possible output field attributes
- You can remove which ever fields you want, and the preceding comma

Code: Select all

=SeqStructure(DBF(),"TYPE SDF"," FIELDS field_name,field_type,field_len,start,end")