RPDBFUP Database Synchronizer

From RPOWERWiki

Jump to: navigation, search

RPDBFUP (along with RPDBFGET) is an API that facilitates the transfer and installation of RPOWER DBF (DBase) files from one master location to one or more client locations. RPDBFUP uses several batch files and ships free with RPOWER. The batch files can be found in \rpower\winrun.

RPDBFUP is typically used in a multi-store environment to maintain menu information, i.e.: Sales Categories, Discount Itemizers, Menu Items, Menu Item Descriptions, Menu Item Buttons, and Menu Panels including Switches. But RPDBFUP can also be used to distribute other RPOWER dbase files, for example employees, customers, general ledger accounts, day/times or even payment methods. The master location can either be a corporate server running RPOWER or any one designated store.

RPDBFUP uses RFX (RPOWER File Exchange) as the transfer mechanism to move files from the master location to the client locations. Because the client locations use their own RFX and its polling mechanism to effect the files transfers, no port forwarding is required!

Upon execution of RPDBFUP (typically through an Execute Batch button in Manager Functions) RPOWER gathers the appropriate dbf files based on a list found in rpdbfup.txt, and transfers them to RPOWER's corporate server, where they are copied to the master's ServerIn folder. Still at HQ, RPOWER's file distributor then copies the files to the designated client's ClientOut folders, where they await the next RFX poll from the client stores. At the client store, RPDBFGET is running on a designated workstation, typically the file server, and monitoring the store's local ClientIn folder for new files. Upon discovery of new files, they are automatically updated if necessary, indexed, and moved into RPOWER's data folder. An Update Menu Display is then automatically performed. The transfer and installation are complete!

Contents

Considerations

  • RPOWER version 11 or later is required to implement RPDBFUP.
  • Client stores MAY be running a later version of RPOWER than the master, RPDBFGET will update data files as necessary during installation. Client stores MAY NOT be running an earlier version of RPOWER than the master.
  • If attempting to synchronize files other than menu items, performing a synchronization while client stores are in operation may fail, possibly causing RPOWER to crash. While, in general, menu file updates may be performed at any time, it is usually preferable to perform any transfer when client stores are idle.

Configure the Master Location

Printer Lettering

Some database preparation is required as RPOWER will be looking for the same remote printer letters at all locations. So, for instance, if the master is using remote printers Hot(A), Cold(B) and Expo(C), the printers must also exist, with the same lettering scheme, at the client locations. The master location's remote printers may be a superset of all client location's if necessary. If so, all appropriate remote printers must be flagged in all menu items.

RFX.ini

RFX.ini (found in \rpower\winrun\ini) at the master location, contains information used by RFX including the designated local server workstation and port, the API name, the url of RPOWER's HQ server and the store CG (consolidation group) as well as the location's serial number and name. Edit or create RFX.ini as needed. An example Master RFX.ini is shown below:

 [Setup]
 Server=OFFICE:32112
 ServerKey=12345678
 API=RPDBFUP,Host=rpower.dyndns.org:32150,CG=1234
 LOCATION=1234,Name=Joe's Corporate Server
  • Important note: Background RPOWER must be running on the designated server workstation. Edit the appropriate _Workstation.ini as necessary. If changes are made to RFX.ini, RPOWER must be restarted on that workstation for those changes to go into effect.

RPDBFUP.txt

RPDBFUP.txt, found in \rpower\winrun, contains a list of files to be transferred out. Following a filename with ",NC" tells the system to transfer the file and use it to create updated files but not move it into the live remote database folder, e.g. System files. Following a filename with ",NT" tells the system not to transfer the file to the remote location but move the file into the live remote database folder. There is one file that uses this option: MID, because it is constructed, on the fly, from other menu files. Edit RPDBFUP.txt as necessary. An example RPDBFUP.txt, configured specifically for menu transfer, is shown below:

 ; System
 GIN,NC ; NC = do transfer (for update) but no copy to final
 SIN,NC ;
 RIN,NC ;

 ; Employees and Jobs
 ; EEEPIN
 ; EEE
 ; TPL
 ; JBDPIN
 ; JBD
 ; EEJ

 ; Customers
 ; CUSPIN
 ; CUS
 ; CCD

 ; G/L accounts
 ; GLA

 ; Departments, (Sales categories, Payment methods, Taxes), Discount itemizers
 ; DEPADJ
 ; TPCADJ
 ; DEPINV
 ; TPCINV
 ; DEPOUT
 ; TPCOUT
 ; DEPPAY
 ; TPCPAY
 ; DEPPRL
 ; TPCPRL
 DEPSLS
 TPCSLS
 ; DEPTAX
 ; TPCTAX
 DIZ

 ; Menus, Menu items, Discount itemizers
 MITPIN
 MIT
 MIP
 MNUPIN
 MNU
 MNB
 MID,NT ; NT = no transfer but do copy to final

 ; Day/times, Meal times, Profit centers
 DTM
 MTM
 PCE

 ; Void reasons, Courses, Menu item drops, Coupons,
 VRE
 CRS
 MDR
 CPNPIN
 CPN

  • Important note: While many of the files shown are optional, the System section of this file is REQUIRED for all transfer scenarios. It should be left as shown.

Optionally, a file named RPDBFUPexclude.txt may be created in \rpower\winrun, containing a list of underscore-delimited store serial numbers that will NOT receive file updates. If not found, the file will be created automatically and will contain the master store's serial number, excluding it.

Setup a Menu Transfer button

From Manager Functions, System Setup, System Information, More Options, create an Execute Batch Button with the name Menu Transfer or Push Menus, or something to that effect, with File: RPDBFUP, no boxes checked and Save.

Configure the Distributor

No setup is required. All files and folders are setup automatically using the parameters found in the master and client RFX.ini upon connection to the HQ server.

Configure the Client Location(s)

RFX.ini

RFX.ini (found in \rpower\winrun\ini) at the client location contains information used by RFX including the designated local server workstation and port, the API name, the url of RPOWER's HQ server and the store CG (consolidation group) as well as the location's serial number and name. Edit or create RFX.ini as needed. An example Client RFX.ini is shown below:

 [Setup]
 Server=BAR
 ServerKey=12345678
 API=RPDBFUP,HOST=rpower.dyndns.org:32150,CG=1234
 LOCATION=4321,Name=Joe's Bar and Grille Store #4321
  • Important note: Background RPOWER must be running on the designated server workstation. Edit the appropriate _Workstation.ini as necessary. If changes are made to RFX.ini, RPOWER must be restarted on that workstation for those changes to go into effect.

Include RPDBFGET in Startup Procedure

Create a new text file in \rpower\winrun named NTSTART.txt with one comma separated line containing a window title, command line parameters and file name, e.g.:


RPDBFGET Menu Loader,/min,rpdbfget.bat

This will cause RPOWER to run RPDBFGET automatically on the file server on a boot.

Run it!

At the master, make menu changes as appropriate and Update Menu Display. Press Menu Push (or whatever). That's it!

Views
Personal tools