Format of POLE.DAT

Make comments, ask questions, or just complain about the software on this site. Or comment on any educational software.
Please note that by clicking on links that may appear in these posts that you may be leaving the Dale Harris Educational Software website and that the content of those sites is the sole resposibility of the authors of those sites.

Moderators:daleadmin, Dale Harris, Alan, Andrew

Post Reply
Guest
Format of POLE.DAT

Post by Guest » Tue Jan 18, 2005 9:53 pm

Dale,
I know in your POS viewer, it would show price changes. Where and what in the POLE.DAT file is the character that denotes this?

Also, is the line number anywhere in the POLE.DAT file?

Thanks.

User avatar
Dale Harris
Forum Owner
Posts:1171
Joined:Sun Dec 28, 2003 10:19 pm
Location:Chicago
Contact:

POLE.DAT file format

Post by Dale Harris » Wed Jan 19, 2005 12:54 am

Here you go...

File format for POLE.DAT

This writes the file...
OPEN "POLE.DAT" FOR RANDOM ACCESS READ WRITE SHARED AS 5 LEN = 20
FIELD #5, 20 AS X$
FIELD #5, 15 AS N$, 1 AS NEG$, 2 AS Y$, 2 AS Z$
LSET X$ = A$: PUT 5, 1: LSET X$ = B$: PUT 5, 2
GET 5, 3: W = 1 + CVI(Z$): IF W = 32000 THEN W = 0
LSET X$ = F$: LSET Y$ = LTRIM$(LTRIM$(STR$(U))): LSET Z$ = MKI$(W)
LSET NEG$ = CHR$(N)
PUT 5, 3: S$ = LEFT$(X$, 18): CLOSE 5

As you can see the POLE.DAT file is a random access file with a record length of 20 bites and it is always 3 records long.

The first two records hold what is displayed on line #1 and line #2 of the pole display.

The first 15 characters of record #3 hold the stock number.

Character 16 of record #3 holds the line type, if the...
ASC(NEG$) = 48 then it is a normal line
ASC(NEG$) = 49 then it is a discount or reduction
ASC(NEG$) = 50 then it is a the price for the item has been changed or a voided line

Charcters 17 + 18 of record #3 holds the transaction type.
VAL(Y$) = 1 it is a sale
VAL(Y$) = 2 it is a return or payout

Charcters 19 + 20 of record #3 holds the counter.

If the value of CVI(Z$) has changed then the contents of POLE.DAT has changed.
Dale

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 12 guests