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.
Format of POLE.DAT
Moderators:daleadmin, Dale Harris, Alan, Andrew
- Dale Harris
- Forum Owner
- Posts:1171
- Joined:Sun Dec 28, 2003 10:19 pm
- Location:Chicago
- Contact:
POLE.DAT file format
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.
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
Who is online
Users browsing this forum: No registered users and 9 guests