Format Builder
Format Tester
Once you have build a format definition, you can test it using Format Tester. Format Tester parses and reformats data as a validation test and generates sample non-XML or XML data. This sample data can be edited, searched, and debugged to product the expected results.
Format Tester Window
Format Tester Menus
Format Tester Window
The following topics discuss the elements of the Format Tester main window and provide instructions for navigating and executing commands from the Format Tester main window.
Using the Non-XML Window
Using the XML Window
Using the Debug Window
Using the Resize Bars
Format Tester Menus
The following menus are available in Format Tester. All Format Tester menus are expandable from your keyboard by pressing Alt + underlined letter. Some menu commands are also executable using Ctrl + letter keystrokes.
File Menu
Edit Menu
Display Menu
Generate Menu
Translate Menu
Shortcut Menu
File Menu
The following commands are available from the File menu.
Menu Command
|
Description
|
Open Non-XML
|
Allows you to select a non-XML file to be displayed in the Non-XML window.
Note: The default file extension for non-XML files is .DATA.
|
Open XML
|
Allows you to select a file to be displayed in the XML section of the Format Tester window.
Note: The default file extension for XML files is .XML.
|
Save Non-XML
|
Allows you to save the contents of the Non-XML window.
|
Save XML
|
Allows you to save the contents of the XML window.
|
Debug Log
|
Allows the debug information to be saved in a text file.
|
Close
|
Closes the Format Tester window.
|
Edit Menu
The following commands are available from the Edit menu.
Menu Command
|
Description
|
Cut
|
Removes the currently selected text and places it on the clipboard for pasting into another location.
|
Copy
|
Copies the currently selected text and places it on the clipboard for pasting into another location.
|
Paste
|
Inserts the cut or copied text at the cursor location.
|
Find
|
Allows you to search for a hex or text value in the non-XML data.
|
Find Next
|
Continues your search to the next instance of the specified value.
|
Go To
|
Allows you to move the cursor in the Non-XML editor to a specified byte offset.
|
Display Menu
The following commands are available from the Display menu.
Menu Command
|
Description
|
XML
|
Allows the XML data panel to be hidden or shown. If hidden, the non-XML data window expands to fill the width of the tester. The To XML button remains, but the splitter disappears.
|
Debug
|
Allows the Debug output window to be hidden or shown.
|
Clear—>Non-XML
|
Resets the contents of the Non-XML data window to be empty.
|
Clear—>XML
|
Resets the contents of the XML window to be empty.
|
Clear—>Debug
|
Resets the contents of the debug window to be empty.
|
Hex—>Offsets as Hexadecimal
|
Displays the offset values as hexadecimal. Selecting this option turns off the Offsets as Decimal display.
|
Hex—>Offsets as Decimal
|
Displays the offset values as decimal. Selecting this option turns off the Offset as Hexadecimal display.
|
Generate Menu
The following commands are available from the Generate menu.
Menu Command
|
Description
|
Non-XML
|
Generates non-XML data to match the current format specification.
|
XML
|
Generates XML data to match the current format specification.
|
Prompt while generating data
|
If selected, you are prompted during the generation process to determine if optional fields or groups should be generated, determine which choice of children should be generated, and determine how many times a repeating group should repeat.
|
Translate Menu
The following commands are available from the Translate menu.
Menu Command
|
Description
|
Non-XML to XML
|
Converts the contents of the Non-XML window to XML.
|
XML to Non-XML
|
Converts the contents of the XML window to non-XML data.
|
Shortcut Menu
Instead of using the standard menus to find the command you need, use the right mouse button to click an item in the pop-up shortcut menu.
The following commands are available from the Shortcut menu.
Note: Some commands may be unavailable, depending on which display panel currently contains the mouse pointer.
Menu Command
|
Description
|
Cut
|
Removes the currently selected text and places it on the clipboard for pasting into another location.
|
Copy
|
Copies the currently selected text and places it on the clipboard for pasting into another location.
|
Paste
|
Inserts the cut or copied text at the cursor location.
|
Clear
|
Resets the contents of the Non-XML or XML window to be empty.
|
Generate
|
Generates Non-XML or XML data to match the current format specification.
|
To XML
|
Converts the contents of the Non-XML window to XML.
|
To Non-XML
|
Converts the contents of the XML window to non-XML data.
|
Using the Non-XML Window
The Non-XML data display panel acts as a hexadecimal editor or a text editor, depending on which tab is selected.
The hexadecimal editor panel displays data offsets, the hex value of individual bytes, and the corresponding text. The corresponding text can be optionally displayed as ASCII or EBCDIC characters. The editor allows for editing of the hex byte or the text value. If a hex data value is modified, the corresponding text value is updated, and vice versa.
See Also
Using the Data Offset Feature
Using the Text Feature
Using the Data Offset Feature
The data offset feature of the hexadecimal editor allows you to display your data offsets as Hexadecimal or Decimal.
To change your data offsets:
- Choose Display—>Hex. The following two data offset options display.
- Offsets as Hexadecimal
- Offsets as Decimal
- Click the display option that best suits your needs. The data offset panel of the Non-XML window dynamically changes to reflect your choice.
Using the Text Feature
To use the Text feature, select the Text tab from within the Non-XML window to view all printable characters, such as carriage returns. The Text window shows these as text with line breaks.
Using the XML Window
The XML data panel displays XML data that has been converted or transformed from the contents of the Non-XML panel. The contents of the XML panel can be cleared or edited to suit your needs.
You can also use this window to enter or generate the XML data to be transformed into non-XML format.
Using the Debug Window
The Debug window displays the actions that take place during the transformation operation, any errors that are encountered, and field and group values and delimiters. To determine the location of the error, determine the last field that parsed successfully and examine the specification of the next field on the Using the Tree Pane of Format Builder.
When you open the Format Tester, only the Non-XML and XML windows are visible. To open the Debug window, choose Display—>Debug to toggle the Debug window on and off. The Debug window opens below the Non-XML and XML windows.
Note: Debug output is restricted to the most recent 64 KB of messages. Full debug information can be captured to a file. See Using the Debug Log for more information.
Using the Resize Bars
Resize bars are located between the Non-XML, XML, and Debug windows. These resize bars enable each window to be resized to suit your needs. Each resize bar can be selected and dragged up and down, or left and right, as appropriate, to enlarge one of the windows and reduce the other.
Each resize bar also contains two directional buttons that can be clicked to enlarge or diminish any of the three windows.
Debugging Format Definitions
The following topics discuss the various Format Tester utilities you can use to debug and correct your data.
Searching for Values
Searching for Offsets
Using the Debug Log
Searching for Values
The Find feature allows you to search for hex or text values in the Non-XML data. The following fields are available from the Find dialog.
Field
|
Description
|
Find What
|
Value
|
Enter the value you want to find.
|
Text
|
Select this option if you want to find a text value.
|
Hex
|
Select this option if you want to find a hex value.
|
Direction
|
Forwards
|
Select this option if you want to search from the selected location to the end of the document.
|
Backwards
|
Select this option if you want to search from the selected location to the beginning of the document.
|
From
|
Beginning of File
|
Select this option if you want to start the search at the beginning of the file.
|
Current Position
|
Select this option if you want to start the search at the current cursor location.
|
End of File
|
Select the option if you want to start the search at the end of the file.
|
Action Buttons
|
OK
|
Begins the search operation.
|
Cancel
|
Closes the Find dialog without performing a search.
|
Searching for Offsets
The Goto feature allows you to move the cursor in the Non-XML editor to a byte offset you specify. The following fields are available from the Goto dialog.
Field
|
Description
|
Bytes to Move
|
Offset
|
Enter the offset value you want to find.
|
Dec
|
Select this option if you want to go to a decimal value.
|
Hex
|
Select this option if you want to go to a hex value.
|
Direction
|
Forwards
|
Select this option if you want to search from the selected location to the end of the document.
|
Backwards
|
Select this option if you want to search from the selected location to the beginning of the document.
|
From
|
Beginning of File
|
Select this option if you want to start the search at the beginning of the file.
|
Current Position
|
Select this option if you want to start the search at the current cursor location.
|
End of File
|
Select the option if you want to start the search at the end of the file.
|
Action Buttons
|
OK
|
Begins the search operation.
|
Cancel
|
Closes the Goto dialog without performing a search.
|
Using the Debug Log
The debug log allows you to save your debug information to a text file.
To use the debug log, choose File—>Debug Log. A dialog displays allowing you to enter a new path and file name or choose an existing file in which to save the debug information.
Note: If you select an existing file, the new debug information is appended to the end of the file.