Home › Forums › Knowledge Base › Other Modules › DataPost File Modification Utility
- This topic has 0 replies, 1 voice, and was last updated 19 years ago by
Rob.
-
AuthorPosts
-
April 14, 2006 at 4:46 pm #1527
Rob
MemberDataPost File Modification Utility
DataPost.Exe 6.01Last edited: December 15, 2003 08:07 AM
This utility changes media names, printer ports, and several fields in Local Options, based on values passed to it from TouchPro. It allows a stylist to make these options user changeable, eliminating the need for Editnet. Integration of DataPost into an application requires advanced styling knowledge, and should not be attempted by someone who is not familiar with TouchPro at a file level.
Syntax
DATAPOST /FILE=x {/DEBUG}
* /FILE=x – Specify which type of file modification will occur. Allowable values for x are:
o M – Media.Dat
o P – Printers.Dat
o L – Configuration file as defined by Memo2.
* /Debug – Optional parameter to display the data as it is received from and returned to TouchPro. Without this switch, there is no screen output.Implementation
1. Unzip DataPost into the Tools directory.
2. Using EditPro, create a shell that runs DataPost with the correct /FILE=x switch. Check Preserve Screen, Store Variables, Swap to XMS/EMS/VMS, Initialize Mouse, and Get Variables.
3. Write an instruction chain that provides a method for loading Memo1 with the new value, then calls the shell. Here is a section of a possible chain:… (code) … ;loads Memo1 and Bucket Row variables.
Variable Index = 9 ;Index used for shell status result.
Shell to DataPost ;Write to the file.If Index = 8 ;Invalid data. Could not post.
Window = BadPost
Delay 2 Seconds
Close 1 Window
Stop – Ignore Rest
End IfIf Index = 9 ;Shell has failed.
Window = ShellErr
Delay 2 Seconds
Close 1 Window
Stop – Ignore Rest
End If‘END’
Variable Usage
Passed to DataPost
Variable Media.Dat Printers.Dat Config File
Memo1 Media Name Printer Port Letter Report Cut Code
Memo2 not used not used Nodename
Number1 not used not used Timeout Minutes
Number2 not used not used Enable Sound
Bucket Row Media Number+1 Printer File Row not usedReturned to TouchPro
Index – Program termination result
0 – Data posting successful
8 – Data posting failed
9 – Reserved for use by Touchnet to indicate shell failureTechnical
DataPost is designed to run with List-it as a low end file editing utility. List-it can be made to display the raw contents of a file, and some file, including both the Media.Dat and Printers.Dat files are comma delimited, and therefore readable as text. If a line is highlighted by a user, List-it can return the line number of the line to be changed, into the Bucket Row variable. A second window can then pop up to allow the user to enter a value into Memo1, representing the new entry. Alternatively, a user interface can be built into the application itself.
DataPost does not change the entire line. If writing to Media.Dat, it takes the first 16 characters of Memo1 and writes it as the media name to the line as specified by bucket row. Note that Medias are numbered starting at zero, but DataPost expects the line number, not the media number. Therefore a Bucket Row value of five would be needed to change the name of media four. Media names for medias zero through three are not user changeable, and DataPost will return a Data Posting Failed error value in the index field if the user tries to change these medias.
If writing to Printers.Dat, only the first character of Memo1 is used. This character must be an upper case A through an upper case H, or DataPost will return a Data Posting Failed error value in the index field. Letter values correspond to ports as follows:
* A – COM1
* B – COM2
* C – LPT1
* D – LPT2
* E – LPT3
* F – LPT4
* G – COM3
* H – COM4If setting Local Options, all four variables must be defined, as all four options are changed. You cannot change just one option. Values are interpreted as follows:
* Memo2 – The first eight characters are used to determine the nodename.
* Memo1 – The first twenty characters are used to determine the cut code.
* Number1 – Valid values 0-99. If value is over 99, then timeout minutes is set to 99.
* Number2 – If 0, then Enable Sound is turned off. For any other value, Enable Sound is turned on.Although DataPost screens all data for validity, it is recommended that when designing a user interface, the stylist pre-screen the data and provide appropriate error messages to the user.
Revisions6/29/99 6.00 rw
* Initial Release
9/24/99 6.01 rw
* Added ability to change the cut code, timeout minutes, and enable sound option in Local Options.
-
AuthorPosts
- You must be logged in to reply to this topic.