Export. DORIC 9.65, INFO-Text software
Annons
Annons
EXPORT
EXPO
RT file_path
ASCII
[
NORM
AL]
SDF
[
TRAN
SPOSE] [
[
APPE
INIT
]
ND]
2020
DIF
SYLK
CSV
syntax cont’d
[DF_item]
[system_item]
[,...]
[system_variable]
writes the contents of a data file into a system file. The system file is written in one of six delimited formats.
arguments
file_path the system file name of the output file.
ASCII | SDF | 2020 | DIF | SYLK | CSV the file format of the output file. See Appendix P, Import/Export File
Formats.
ASCII produces an output file that resembles a standard print file Places each item value on its own line. Uses a blank line to separate records. Encloses character data in quotation marks.
SDF produces an output file in BASIC format. Separates item values with commas. Places each new record on a new line. Encloses character data in quotation marks.
2020 produces an output file ready to be imported into
20/20. Passes only cell contents. Uses # sign between item values. Precedes character data with quotation marks showing justification.
DIF produces an output file in industry-standard DIF format. Includes a header section sharing the file name and overall format. Provides a data section with row and column indicators along with cell type and contents.
SYLK produces a file whose format meets all Multiplan requirements.
INFO Reference Manual Commands 219
EXPORT notes
CSV comma separated values. Produces a file with numerics, character items and dates held as strings separated by commas, with no quotation marks around the characters or dates. The output file would be suitable for use with ADD FROM
Note. If character items contain commas, this is not a suitable option. Date fields are exported in a form not compatible with IMPORT.
[NORMAL | TRANSPOSE] are positioning modes.
NORMAL is the default positioning mode. Each data file record goes out as one row for the spreadsheet.
TRANSPOSE is the alternate positioning mode. Each data file record goes out as a column for the spreadsheet.
TRANSPOSE cannot be used in an even-numbered program section.
[APPEND | INIT]
defines the writing mode.
APPEND is the default writing mode. If a system file already exists, INFO adds the new information to the end.
INIT is the alternative writing mode. With INIT, INFO purges the existing system file before it writes the new data.
[
DF_item | system_item _ | system_variable] the name of the item or variable whose value will be exported.
DF_item is an INFO data file item .
system_item is an INFO system item.
system_variable is an INFO system variable.
If no items are specified all items on the selected file are
EXPORTED.
n
The EXPORT command copies the records of a data file into a system file. You can use the command interactively, in odd-numbered program sections, and in even-numbered program sections.
220 Commands INFO Reference Manual
note
EXPORT
n
If the system file does not already exist, INFO creates it.
n
You must select the source data file before you can issue the command. INFO uses the currently selected/related data files as the source.
n
All EXPORT formats excepting CSV output dates in military format.
n
Each of the file formats uses one delimiter between item values and a different delimiter between records. During an export, INFO reads one item value out of the data file and places that value in the next sequential delimited field of the system file. At the end of each record, INFO places a record delimiter.
n
When you include data file items in the command line,
INFO exports item values in the order in which the items are listed.
n
INFO logs the results of EXPORT to your spool file. INFO also displays brief versions of any error messages on your terminal screen.
n
The maximum item length that may be exported is 200 bytes: if an exported item is longer than this it will be truncated. N.B. if the exported data is to be imported back into INFO, IMPORT has a maximum item length of 189 bytes.
The maximum record length for the various EXPORT formats is as follows:-
ASCII
SDF
2020
DIF
SYLK
CSV
4096bytes
2048 bytes
2048 bytes
4096 bytes
4096 bytes
4096 bytes
These maximum lengths include the various field delimiters
INFO Reference Manual Commands 221
EXPORT
Exporting during programs
Within each program section, the first time INFO executes
EXPORT with a new data file name, it positions itself at the first record. At the end of each section, INFO closes the system file.
n
TRANSPOSE is not allowed in even-numbered program sections.
Considerations
The DIF and SYLK file formats include the number of rows
for DIF and
in the file as a piece of information in the header. When
SYLK files
you create a DIF or SYLK file in an even-numbered program section, INFO assumes that the total number of selected records is the number of rows to be written. Be careful when writing your programs: if you should write out fewer records than this, the number INFO puts in the file header is wrong. Some applications give you error messages when they encounter files with this type of inconsistency.
If you use EXPORT to append records to an existing DIF or SYLK system file, INFO places those records at the end of the file after the end-of-data record. Your application might stop when it reaches the end-of-data record. In this case, your application ignores the appended records.
We strongly suggest that you use only one EXPORT command per even-numbered program section. If you use
EXPORT twice in the same even-numbered section and the command specifies two different system files in DIF or
SYLK format, INFO writes an end-of-data only to the last active system file. The other system file does not receive the mandatory end-of-data record.
222 Commands INFO Reference Manual
EXPORT example
ENTER COMMAND >SELECT TEST
3 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO BLDG Q1
1
2
3
A -500.00
Q2
3950.00
B 9450.00
0550.00
C 4275.00
4950.00
Q3
4050.00
10575.00
4950.00
ENTER COMMAND >EXPORT SAMPLE1 ASCII
3 RECORD(S) EXPORTED
ENTER COMMAND >EXPORT SAMPLE2 DIF Q1,Q2
3 RECORD(S) EXPORTED
ENTER COMMAND >EXPORT SAMPLE3 DIF TRANSPOSE INIT
5 RECORD(S) EXPORTED
Q4
4050.00
10575.00
4950.00
To create your own customized EXPORT format, see the
INFO Exchange Manual.
see also
IMPORT
Appendix P Import/Export File Formats.
INFO Reference Manual Commands 223
Ladda ner
Annons