The file fpos.ctl is a text structured file to provide values to influence the POS operation. This file must exist in the working directory in order for it to be used. The file itself is optional, and will only be used if located, the POS is able to function without this file.
In version V2.5.5.1250, the Retail system was expanded to process the file fpos_all.ctl before fpos.ctl. This allows the splitting of site wide definitions and highly lane specific setup.
database:path=? | Override any database path values and force the system to use the named file. | ||||||||||||||
database:write=? | Override the command line -write option, a value of 1 implies open database for writing, 0 for read only | ||||||||||||||
database:share=? | Override the command line -share option, a value of 1 implies open database for shared access, 0 for exclusive | ||||||||||||||
cmdline:location=? | Override the command line -location option | ||||||||||||||
cmdline:lane=? | Override the command line -lane option | ||||||||||||||
cmdline:web=? | Override the command line -web option | ||||||||||||||
cmdline:debug=? | Override the command line -debug option | ||||||||||||||
default:name=value | Load the setting name to have the default value specified. This allows a setting value to be created, but overriden by the database or other levels if required. See Settings Management for more details on settings. | ||||||||||||||
force:name=value | Force the setting name to the specified value. | ||||||||||||||
licence:value | Loads the licence code to be used on this system | ||||||||||||||
dbcdao:type=value | Set the database engine type of an ODBC data source. In some cases when the POS is aware of the remote database type, it is able to make additional optimisations to suit the remote database. The keywords 'oracle' and 'sqlserver' can be used for the type argument. | ||||||||||||||
dbcdao:trace=N | Enable Database interface DLL tracing to the file dbcdao35.log. The argument N is a bit encoded number, with the following bitfield meanings.
|
Physical Database Structure
The command "database-physical:" can be used to define fields in the database that should be present. Shortly after startup the Point of Sale processes these commands in the background and verifies and database being used has the required format. This command can be used with either "database:physical:" or "database-physical:" syntax. As the timing of the commands is undefined you cannot ship a database-physical command to lanes and immediately expect it to be executed.
Example that might be found in fpos_all.ctldatabase-physical:table(goodsinhistory) field(linecost) datatype(money) create report(different) database-physical:table(products) field(abc) delete
Keyword | Description |
table(?) | Sets the name of the table to process |
field(?) | Sets the name of the field to process |
datatype(?) | Sets the datatype definition, using POS datatype definitions. For examples of this syntax read the file posmetadef.txt |
create | Create the field if it does not exist and the table does exist. If the table does not exist the field is not added. If the field exists already but is a different datatype it is not changed. |
delete | Delete the field if it exists. |
alter | Alter the field if, and only if, it already exists. This keyword alone will not cause a field to be added to the database. |
alter-if-bigger | |
alter-if-smaller | |
add-table | By default, the commands create, alter and delete only work if the table already exists in the database. If the keyword add-table is present then the table is created if required. |
delete-table | Indicates this operation is to delete the table completely. |
report(param) | If the field is present but does not match the datatype an event is generated. |
The database-physical differs from posmetadef.txt in that the PosMetaDef.txt file is defining the expected logical types but has no bearing on the actual database once the field is present in the database. The database-physical command however is only interested to verify the actual current database structure is as specified now. Database-physical does not read posmetadef.txt
Database-Physical Examples
database:physical:table(products) field(poscommand) datatype(string:128,zerolen) create alter alter-if-smaller
This command has the following effect
- If the field products.PosCommand does not already exist in the database it is added as varchar(128)
- If the field is present but not a varchar (or compatible) datatype it is converted to varchar(128)
- If the field is present, as a varchar (or compatible) datatype but is less than 128 characters long it is altered to be 128 characters.
- If the field is present, as a varchar (or compatible) datatype and has a length 128 characters or greater, then no change is made.
database:physical:table(products) field(poscommand) datatype(string:128,zerolen) create alter alter-if-smaller alter-if-bigger
This command has the following effect
- If the field products.PosCommand does not already exist in the database it is added as varchar(128)
- If the field is present but not a varchar (or compatible) datatype it is converted to varchar(128)
- If the field is present, as a varchar (or compatible) datatype but the length is not 128 characters it is altered to be 128 characters.
database:physical:table(products) field(poscommand) datatype(string:128,zerolen) create alter
The use of "alter" without "alter-if-smaller" and/or "alter-if-bigger" on string datatypes has an effect you might not immediately expect. This form of command would not generally be used
- If the field products.PosCommand does not already exist in the database it is added as varchar(128)
- If the field is present but not a varchar (or compatible) datatype it is converted to varchar(128)
- If the field is present, as a varchar (or compatible) datatype, no change is made. For string datatypes the length is not considered as part of what "alter" alone will change.
database:physical:table(products) field(poscommand) datatype(string:128,zerolen) create alter alter-if-smaller report(change)
This command does not change the database as the "report" keyword is present and the "execute" keyword is not present. It is used to scan and report systems that do not meet the criteria
- If the field products.PosCommand does not already exist in the database an error event is generated
- If the field is present but not a varchar (or compatible) datatype an error event is generated
- If the field is present, as a varchar (or compatible) datatype but is less than 128 characters long an error event is generated
- If the field is present, as a varchar (or compatible) datatype and has a length 128 characters or greater, then no report is generated.
database:physical:table(products) field(poscommand) datatype(string:128,zerolen) create alter alter-if-smaller report(change) execute(1)
database:physical:table(BobPlay2015) delete delete-table
Deletes the table BobPlay2015 if present.
database:physical:table(BobsNewTable) field(abc) datatype(number) create alter create-table database:physical:table(BobsNewTable) field(AnotherField) datatype(char(32),zerolen) create alter alter-if-smaller
- Creates the table BobsNewTable if not already present
- Adds the field "abc" if not present
- Alters the field "abc" to be integer if already present and not an integer datatype
- Adds the field "AnotherField" if not present
- Alters the field "Another" to be varchar(32) if already present, and ensure it is a minimum of 32 long
Fpos.ctl Example
cmdline:write=0default:ScreenWatermark=Development
default:BisTrace=1
; Turn off offline data
force:BSLanDisabled=1
force:HttpNoDefault=0
default:BSLanIdleVisible=1
force:HttpTempDir=c:\junk\