home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Complete Bookshop
/
CompleteWorkshop.iso
/
utils
/
par230
/
example2.inf
< prev
next >
Wrap
Text File
|
1993-01-03
|
1KB
|
27 lines
===============================================================================
========================== ============================
========================== EXAMPLE # 2 ============================
========================== ============================
===============================================================================
THE INPUT FILE: Inventory report, generated by an accounting program
WHAT WE WANT: Copy certain fields into a comma-delimited file so that the
data can then be imported into a spreadsheet. The file must
contain the following fields:
Reference number, Price, Quantity, Part Number, Description
HOW WE DO IT: We copy data from fixed columns, tidy them up, put quotes
around them, then send them to the output file. However,
certain lines must be inspected to ensure that they contain
valid data. For example, if a line contains "Date:" between
columns 1 and 8, it is a header line, not data.
Since the input data for each item is spread over more than
one line, we must also keep a counter (named ITEMCNTR) to
tell us which line we're looking at.