HP NonStop Data Transformation Engine Type Tree Maker Reference Guide Abstract This document contains information about the HP NonStop™ Data Transformation Engine (NonStop DTE) Type Tree Maker. Product Version NonStop Data Transformation Engine 6.7.
Document History Part Number Product Version Published 427648-001 NonStop Data Transformation Engine 1.0 December 2000 522445-001 NonStop Data Transformation Engine 5.0.3 November 2001 522445-002 NonStop Data Transformation Engine 6.7.
Contents About This Document Related References........................................................................................... 6 Chapter 1 - Introduction Creating Document Files .................................................................................... 7 Example Files.................................................................................................. 7 Command Files ................................................................................................
Contents ValueRestrictions ....................................................................................... 53 Command Element Descriptions .......................................................................... 54 BCD........................................................................................................ 54 BinFloat................................................................................................... 55 BinInt ..........................................................
Contents Chapter 6 - Error and Warning Messages Errors and Warnings ....................................................................................... 123 Appendix A - Return Codes and Error Messages Type Tree Generation Error Messages ................................................................. 124 Type Tree Generation Logic Warning Messages ......................................................
About This Document This document contains information about the Mercator Type Tree Maker. This document assumes that the reader knows the Windows environment, has used the Mercator Design Studio, and understands words such as mapping, type trees, and other basic Mercator terminology. Related References The Mercator Online Library contains information about all products. Refer to the following references for more information about topics frequently discussed in this document.
Chapter 1 - Introduction The Type Tree Maker is an application that is installed in the Mercator directory as part of the Design Studio. The Type Tree Maker reads in an XML document file (.mts file extension) containing type tree commands and uses these commands to create or update a type tree. Creating Document Files The document file that the Type Tree Maker uses may be produced in one of the following ways: ♦ Using the Type Designer to export all or part of a type tree.
Chapter 2 - Using the Type Tree Maker This chapter discusses how to create type trees using the Type Tree Maker. Creating an XML Document File The Type Tree Maker uses document files in an XML format (.mts file extension) to create type trees. The following steps describe how to use the Type Designer to export the example type tree xreftbl.mtt to the XML document file xreftbl.mts. The Type Tree Maker is then used to convert this file into a type tree. To create an XML document file (.
Chapter 2 - Using the Type Tree Maker 8 Creating a Type Tree Click Save. The exported .mts file is saved as xreftbl.mts. 9 Close the Type Designer. Creating a Type Tree Use the Type Tree Maker to create the type tree. To create a type tree using the Type Tree Maker 1 From the Start menu, select Programs > Mercator version > Design Studio > Type Tree Maker. The Open Type Tree Maker Command File dialog box appears.
Chapter 2 - Using the Type Tree Maker Creating a Type Tree 2 Navigate to the install_dir\examples\dsgnstud\ttmaker\export folder to select Xreftbl.mts. This is the file you created in the previous section. 3 Click Open. The Mercator Type Tree Maker window shows the type tree as it is being created. After the Type Tree Maker completes, the Type Tree Maker window and an information window are displayed.
Chapter 2 - Using the Type Tree Maker Type Tree Maker Importer Because there were no errors or warnings the information window shows that the Type Tree Maker completed successfully. 4 Click OK to remove the information window. The Mercator Type Tree Maker window displays the type tree that was generated. Scroll through the type tree to view all of it. 5 Click Close to exit the Type Tree Maker application.
Chapter 2 - Using the Type Tree Maker 4 Enter the name of the file you are importing or click .mts file. Type Tree Maker Importer (browse) and select an Note If the destination file already exists, it will be overwritten. 5 Click Next. The type tree is displayed in the Importer Wizard-Type Tree Maker dialog box.
Chapter 2 - Using the Type Tree Maker 6 Type Tree Maker Importer Click Finish. Note You must open the newly created type tree (.mtt) in the Type Designer.
Chapter 2 - Using the Type Tree Maker Invoking the Type Tree Maker from a Command Line Invoking the Type Tree Maker from a Command Line When you invoke the Type Tree Maker from a command line, the following command line options can be used: Command Line Option Use -A Automatically analyze trees that are created or modified. Related to the ANALYZE command described on page 18. -B Batch mode. Automatically closes the Type Tree Maker window when finished.
Chapter 3 - Type Tree Maker Document File This chapter covers the syntax and structure of the Type Tree Maker document file. Type Tree Maker Document File The document file used by the Type Tree Maker to create a type tree is an XML document file with a specific structure. The document file contains command elements that must be specified in a particular way and in a specific sequence. The following is the ttmaker60.
Chapter 3 - Type Tree Maker Document File Type Tree Maker Document File The composition of the ttmaker60.mts document file is represented in the ttmaker60.mtt type tree, which can be viewed with the Type Designer: Note The ttmaker60.mtt type tree is provided during installation in the Mercator\ \ttmaker\tree directory. Document File Structure A Type Tree Maker document file begins with an XML prolog and is followed by a TTMAKER element.
Chapter 3 - Type Tree Maker Document File Type Tree Maker Document File The TTMAKER element contains a series of lines where each line in the TTMAKER element must be either a command or comment. Commands and Comments Commands and comments begin in the first character position of a line. ♦ A command line begins with a command initiator. ! Command initiators are XML start-tags.
Chapter 3 - Type Tree Maker Document File Type Tree Maker Document File Processing Instructions Processing instructions act on a tree or the Type Tree Maker window. One or more of the following processing instructions can be used: Processing Instruction Effect on Type Tree or Window Automatically closes the Type Tree Maker window after the document file has been processed. The command line option is –B.
Chapter 3 - Type Tree Maker Document File Type Tree Maker Document File The TTMAKER Element consists of one or more NEWTREE and OPENTREE elements. The NEWTREE element begins with a start tag and end tag . For example: PAGE 20Chapter 3 - Type Tree Maker Document File Type Tree Maker Document File The NEWTREE and OPENTREE elements instruct the Type Tree Maker to create a new tree or open an existing one. A Choice expression determines the sequence of actions to be performed at a particular location in the type tree. Each Choice is a sequence of commands that acts on a particular type. The class of the active type determines the valid command sequence.
Chapter 3 - Type Tree Maker Document File Type Tree Maker Document File XML Tag Notation Each element in the document file has a start tag and an end tag. NEWTREE and OPENTREE elements contain other elements.
Chapter 4 - Commands and Command Elements This chapter describes the Type Tree Maker commands and command elements. Command Descriptions This section contains an alphabetical list of commands. Note In a Type Tree Maker document file, command components appear on the same line as the command in which they are contained to make it easier to identify an error detected by the Type Tree Maker. In the following examples, components may appear on separate lines for documentation only.
Chapter 4 - Commands and Command Elements Command Descriptions Components of AddComponent The following group window displays the components of the AddComponent command. The AddComponent element has as an attribute the complete type name of the type to which the component is to be added. It then has either a SequenceComponent, ChoiceComponent or UnorderedComponent command element.
Chapter 4 - Commands and Command Elements Command Descriptions AddRestriction The AddRestriction command adds a restriction to the item type specified as the active type. Components of AddRestriction The following group window displays the components of the AddRestriction command. The AddRestriction element has as an attribute the complete type name of the type to which the restriction is to be added.
Chapter 4 - Commands and Command Elements Command Descriptions BinaryDatetime The BinaryDatetime command defines a binary date & time item. Components of BinaryDatetime The following group window displays the components of the BinaryDatetime command. In addition to its Presentation attribute (PACKED or BCD) and its BinaryDateTimeFormatString element, the BinaryDatetime command can have either ValueRestrictions or RangeRestrictions command.
Chapter 4 - Commands and Command Elements Command Descriptions BinaryNumber The BinaryNumber command defines a binary numeric item. Components of BinaryNumber The following group window displays the components of the BinaryNumber command. The BinaryNumber command must have either a BCD, BinFloat, BinInt, or Packed element and either a ValueRestrictions or RangeRestrictions command.
Chapter 4 - Commands and Command Elements Command Descriptions BinaryText The BinaryText command defines a binary text item. Components of BinaryText The following group window displays the components of the BinaryText command. The BinaryText command can have a Size, ForNONE, or ValueRestrictions element.
Chapter 4 - Commands and Command Elements Command Descriptions CATEGORY The CATEGORY command adds or replaces a category type as a subtype of the active type. Note If the active type is a group or item, the CATEGORY command is ignored and an error message is written to the error file. Components of CATEGORY The following group window displays the components of the CATEGORY command.
Chapter 4 - Commands and Command Elements Command Descriptions The CATEGORY command can have TypeSyntax, a Sequence, Choice, or Unordered group subclass command and one of the item subclass command elements.
Chapter 4 - Commands and Command Elements Command Descriptions CharDateTime The CharDateTime command defines a character date & time item. Components of CharDateTime The following group window displays the components of the CharDateTime command. In addition to its required CharDateTimeFormatString command element, the CharDateTime command can have PadText, Zero and ForNONE command elements, as well as either a ValueRestrictions or RangeRestrictions command.
Chapter 4 - Commands and Command Elements Command Descriptions CharNumber The CharNumber command defines a character number item. Components of CharNumber The following group window displays the components of the CharNumber command. The CharNumber command has a required CharNumber_1 Choice Expression, which is either a CharInt, Decimal, or Zoned command element and can have Western, Zero, and ForNONE command elements and either a ValueRestrictions or RangeRestrictions command.
Chapter 4 - Commands and Command Elements Command Descriptions CharRestrictions The CharRestrictions command adds a character restriction to an item. Components of CharRestrictions The following group window displays the components of the CharRestrictions command. The CharRestrictions command has attributes for indicating whether or not the case of restrictions should be ignored and for specifying a syntax item for a release character and have either a IncludeChar or ExcludeChar command element.
Chapter 4 - Commands and Command Elements Command Descriptions CharTextJapanese The CharRestrictions command defines a character text item. Components of CharTextJapanese The following group window displays the components of the CharTextJapanese command. The CharTextJapanese command can have Size, PadText, ForNONE, and Japanese command elements and a ValueRestrictions command.
Chapter 4 - Commands and Command Elements Command Descriptions CharTextWestern The CharTextWestern command defines a character text item. Components of CharTextWestern The following group window displays the components of the CharTextWestern command. The CharTextWestern command can have Size, PadText, ForNONE, and Western command elements, as well as a ValueRestrictions, RangeRestrictions or CharRestrictions command.
Chapter 4 - Commands and Command Elements Command Descriptions Choice The Choice command defines a character text item. Components of Choice The following group window displays the components of the Choice command. The Choice command can have a WhiteSpace, FloatingComponent and ChoiceComponent command.
Chapter 4 - Commands and Command Elements Command Descriptions ChoiceComponent The ChoiceComponent command defines a character text item. Components of ChoiceComponent The following group window displays the components of the ChoiceComponent command. The ChoiceComponent command can have RelativeTypeName and Rule command elements. Component Description RelativeTypeName Specifies the relative type name of the syntax item used as the separator.
Chapter 4 - Commands and Command Elements Command Descriptions GROUP The GROUP command adds a new group as a subtype of the active type. Note If the active type is an item, this command is ignored and an error message is written to the error file. Components of GROUP The following group window displays the components of the GROUP command. The GROUP command can have TypeSyntax, a Sequence, Choice, or Unordered group subclass command.
Chapter 4 - Commands and Command Elements Command Descriptions ITEM The ITEM command adds a new item to the active type. Note If the active type is a group, this command is ignored and an error message is written to the error file. Components of ITEM The following group window displays the components of the ITEM command. The ITEM command can have CharTextWestern, CharTextJapanese, CharNumber, CharDateTime, BinaryText, BinaryDatetime, BinaryNumber, and SyntaxItem commands.
Chapter 4 - Commands and Command Elements Example - MyItem 0S
Command Descriptions
Chapter 4 - Commands and Command Elements Command Descriptions NEWTREE The NEWTREE command creates a new type tree. Components of NEWTREE The following group window displays the components of the NEWTREE command. The NEWTREE command can have a ROOT command element and an OPENTREE command. Example c:\mercator6.0\mytree.
Chapter 4 - Commands and Command Elements Command Descriptions OPENTREE The OPENTREE command modifies an existing type tree file. Components of OPENTREE The following group window displays the components of the OPENTREE command. The OPENTREE command can have a CATEGORY, GROUP, ITEM, or Modify command. Example c:\mercator6.0\mytree.
Chapter 4 - Commands and Command Elements Command Descriptions PROPAGATE The PROPAGATE command allows propagation and deletion of subtypes of the active type. Keyword Description INITIATOR Propagates all initiator properties of the active type to all types in the sub-tree of the active type. TERMINATOR Propagates all terminator properties of the active type to all types in the sub-tree of the active type.
Chapter 4 - Commands and Command Elements Command Descriptions Range Range can be a command and a command element. Range Command The Range command defines a range restriction for an item. For example, x,y Range Command Element The Range command element defines a range for a component. For example, [x,y] Components of Range The following group window displays the components of the Range command/command element. Component Description Min Specifies the integer value of the minimum range.
Chapter 4 - Commands and Command Elements Command Descriptions RangeRestrictions The RangeRestrictions command specifies that an item will have range restrictions. Components of RangeRestrictions The following group window displays the components of the RangeRestrictions command. The RangeRestrictions command can have ValueRestrictions and Range commands.
Chapter 4 - Commands and Command Elements Command Descriptions Sequence The Sequence command defines a group as a sequence group. Components of Sequence The following group window displays the components of the Sequence command. The Sequence command can have an Implicit or Explicit command element and a SequenceComponent command.
Chapter 4 - Commands and Command Elements Command Descriptions SequenceComponent The SequenceComponent command defines a component as a sequence group. Components of SequenceComponent The following group window displays the components of the SequenceComponent command. The SequenceComponent command can have a RelativeTypeName, Range, or Rule command. Component Description RelativeTypeName Specifies the relative type name of the syntax item used as the separator.
Chapter 4 - Commands and Command Elements Command Descriptions SyntaxItem The SyntaxItem command defines a syntax item. Components of SyntaxItem The following group window displays the components of the SyntaxItem command. The SyntaxItem command can have a Size, Western, or Japanese command element and a ValueRestrictions command.
Chapter 4 - Commands and Command Elements Command Descriptions Unordered The Unordered command specifies a value restriction for an item. Components of Unordered The following group window displays the components of the Unordered command. The Unordered command can have a Delimited or WhiteSpace command elements and either a FloatingComponent or UnorderedComponent command.
Chapter 4 - Commands and Command Elements Command Descriptions UnorderedComponent The UnorderedComponent command defines a component for an unordered group. Components of UnorderedComponent The following group window displays the components of the UnorderedComponent command. The UnorderedComponent command can have a RelativeTypeName, Range, or Rule command. Component Description RelativeTypeName Specifies the relative type name of the syntax item used as the separator.
Chapter 4 - Commands and Command Elements Command Descriptions Value The Value command specifies a value restriction for an item. Components of Value The following group window displays the components of the Value command.
Chapter 4 - Commands and Command Elements Command Descriptions ValueRestrictions The ValueRestrictions command specifies that an item will have value restrictions. Components of ValueRestrictions The following group window displays the components of the ValueRestrictions command. The ValueRestrictions command can have an IgnoreCase or Rule attribute and a Value command. Component Attribute Description IgnoreCase Yes No Not case sensitive. Case sensitive.
Chapter 4 - Commands and Command Elements Command Element Descriptions Command Element Descriptions This section contains an alphabetical list of command elements. Command elements consist of other elements and expressions. Expressions are implied groups within a command that are not enclosed in XML tags. Elements have XML start and end tags. BCD The BCD command element specifies BCD properties for an item type.
Chapter 4 - Commands and Command Elements Command Element Descriptions BinFloat The BinFloat command element specifies binary float properties for a item type. Components of BinFloat The following group window displays the components of the BinFloat command element. The BinFloat command element can have a Length attribute. Component Name Attributes Description Length 1, 2, 4 Specifies a length restricted to 1, 2, or 4 bytes.
Chapter 4 - Commands and Command Elements Command Element Descriptions BinInt The BinInt command element specifies binary integer properties for an item type. Components of BinInt The following group window displays the components of the BinInt command element. The BinInt command element can have a Length, Sign, or ByteOrder attribute. Component Name Attributes Description Length 1, 2, 4 Specifies a length restricted to 1, 2, or 4 bytes. Sign Yes Default setting.
Chapter 4 - Commands and Command Elements Command Element Descriptions CharInt The CharInt command element specifies character integer number properties. Components of CharInt The following group window displays the components of the CharInt command element. The CharInt command element can have TotalDigits, PadNumber, IntegerFormatString and ThousandsItem command elements. Component Description IntegerFormatString Specifies the syntax of the character integer item.
Chapter 4 - Commands and Command Elements Command Element Descriptions Decimal The Decimal command element specifies character decimal number properties. Components of Decimal The following group window displays the components of the Decimal command element. The Decimal command element can have TotalDigits, PadNumber, DecimalFormatString, ThousandsItem, and FractionItem command elements. Component Description DecimalFormatString Specifies the syntax of the character decimal item.
Chapter 4 - Commands and Command Elements Command Element Descriptions Leading-Sign The following table describes the optional Leading-Sign format string. Sub-string Values Description "L" + Positive + Negative + Zero(1) A leading sign is required for positive numbers and negative numbers. "L"+ "[" + Positive + "]" + Negative + Zero(1) A leading sign is optional for positive numbers and required for negative numbers.
Chapter 4 - Commands and Command Elements Command Element Descriptions Sub-string Values Description "##" +max-digits(1) required and the range of fraction digits. If mindigits is not used, default is zero. If max-digits is not used, default is S. "[" + value + mindigits(1) + "##" +maxdigits(1) + "]" Specifies the value of the decimal separator to be optional if there is no fractional portion of the number. It also specifies the range of fraction digits. If min-digits is not used, default is zero.
Chapter 4 - Commands and Command Elements Sub-string Values Command Element Descriptions Description not used, default is S. "[" + value + mindigits(1) + "##" +maxdigits(1) + "]" Specifies the value of the decimal separator to be optional if there is no fractional portion of the number. It also specifies the range of fraction digits. If min-digits is not used, default is zero. If max-digits is not used, default is S. Trailing-Sign The following table describes the optional Trailing-Sign format string.
Chapter 4 - Commands and Command Elements Sub-string name Zero Command Element Descriptions Sub-string Values Meaning the text uses a single-quote or "/" in the format string. positive numbers and "–" for negative numbers. "Z" + value Specifies the required leading sign value if the number is zero. If Zero is not used, there is no sign associated with a zero. "[" + "Z" + value + "]" Specifies the optional leading sign value if the number is zero.
Chapter 4 - Commands and Command Elements Command Element Descriptions Delimited The Delimited command element is a sequence element that specifies delimited properties of a group type. Note Delimited consists of a location attribute and a Delimiter Choice. Components of Delimited The following group window displays the components of the Delimited command element. The Delimited command element can have a location attribute, and DelimiterLiteral and Variable command elements.
Chapter 4 - Commands and Command Elements Command Element Descriptions Examples Record Separator #
Chapter 4 - Commands and Command Elements Command Element Descriptions DelimiterLiteral The DelimiterLiteral command element specifies the properties of a western literal. Components of DelimiterLiteral The following group window displays the components of the DelimiterLiteral command element. The DelimiterLiteral command element can have Western and Japanese and command elements.
Chapter 4 - Commands and Command Elements Command Element Descriptions empty The following group window displays the components of the empty command element. The empty command element can have IgnoreCase or Required attributes, Western or Japanese commands and a LiteralValue command. Component Attribute Description IgnoreCase Yes No Not case sensitive. Case sensitive. Required OnInput OnOutPut Always Never Only required on input. Only required on output. Always required. Never required.
Chapter 4 - Commands and Command Elements Command Element Descriptions ExcludeChar The following group window displays the components of the ExcludeChar command element. The ExcludeChar command element can have an ExcludeValue or RefString command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions ExcludeRange The ExcludeRange command element defines the range restriction to be excluded for an item. Components of ExcludeRange The following group window displays the components of the ExcludeRange command element. The ExcludeRange command element can have a Min or Max command elements.
Chapter 4 - Commands and Command Elements Command Element Descriptions ExcludeValue The ExcludeValue command element defines the values to be excluded for an item. Components of ExcludeValue The following group window displays the components of the ExcludeValue command element. The ExcludeValue command element can have a Description attribute. Enter the values to be excluded from the restriction list in the item window.
Chapter 4 - Commands and Command Elements Command Element Descriptions Explicit The Explicit command element specifies the attributes and syntax for an explicit group. Components of Explicit The following group window displays the components of the Explicit command element. The Explicit command element can have a Track attribute and a Delimited command. Component Attribute Description Track Content Track only content. Places Track existing components even if they have only a placeholder.
Chapter 4 - Commands and Command Elements Command Element Descriptions FractionItem The following group window displays the components of the FractionItem command element. The FractionItem command element can have a Find attribute and RelativeTypeName command element. Component Attribute Description Find Yes Specifies to find the item separator. No Default setting. Specifies not to find the item separator.
Chapter 4 - Commands and Command Elements Command Element Descriptions Implicit The Implicit command element specifies the attributes and syntax for an implicit group. Components of Implicit The following group window displays the components of the Implicit command element. The Implicit command element can have a Delimited or WhiteSpace command and a FloatingComponent command.
Chapter 4 - Commands and Command Elements Command Element Descriptions IncludeChar The following group window displays the components of the IncludeChar command element. The IncluceChar command element can have an IncludeFirst or IncludeAfter command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions INITIATOR The INITIATOR command element properties of the initiator of a type. Components of INITIATOR The following group window displays the components of the INITIATOR command element. The INITIATOR command element can have a Literal or Variable command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions Japanese The Japanese command element specifies the Japanese character set. Components of Japanese The following group window displays the components of the Japanese command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions Literal The following group window displays the components of the Literal command element. The Literal command element can have an IgnoreCase attribute, a Western or Japanese command element, and a LiteralValue command. Component Attribute Description IgnoreCase Yes No Not case sensitive. Case sensitive.
Chapter 4 - Commands and Command Elements Command Element Descriptions Modify The following group window displays the components of the Modify command element. The Modify command element can have a PROPAGATE, AddComponent, or AddRestriction command.
Chapter 4 - Commands and Command Elements Command Element Descriptions OneByteLiteral The following group window displays the components of the OneByteLiteral command element. The OneByteLiteral command element can have a LiteralValue or Western command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions Packed The Packed command element specifies binary packed properties for an item type. Components of Packed The following group window displays the components of the Packed command element. The Packed command element can have a Length, ImplicitDecimalPlaces, or TrailingSign attribute. Component Attribute Description Length Specifies the length of the packed number.
Chapter 4 - Commands and Command Elements Command Element Descriptions PaddedToFixedSize The following group window displays the components of the PaddedToFixedSize command element. PadNumber The PadNumber command element the one-byte pad character for number text items. Components of PadNumber The following group window displays the components of the PadNumber command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions The PadNumber command element can have Justify, ApplyPad, or Fill attributes, and either a PadValue or PaddedToFixedSize command. Component Name Attributes Description PadNumber Justify LEFT: Default setting. Specifies left justification. RIGHT: Specifies right justification. ApplyPad ANYCONTEXT: Specifies to pad the number text in any context. FIXEDGROUP: Default setting.
Chapter 4 - Commands and Command Elements Command Element Descriptions The PadText command element can have a Justify or ApplyPad attributes and a PadValue or PaddedToFixedSize command element. Component Attribute Description Justify LEFT Default setting. Specifies left justification. RIGHT Specifies right justification. ANYCONTEXT Specifies to pad the text in any context. FIXEDGROUP Default setting. Specifies to pad the text only in a fixed context.
Chapter 4 - Commands and Command Elements Command Element Descriptions RELEASE The RELEASE command element the release character for the active type. Components of RELEASE The following group window displays the components of the RELEASE command element. The RELEASE command element can have a OneByteLiteral or Variable command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions ROOT The ROOT command element specifies the properties for the root of the type tree. Components of ROOT The following group window displays the components of the ROOT command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions The ROOT command element can have a SimpleTypeName, Description, SetUpProperties, SetUpComponents, or OrderSubtypes attributes. The ROOT command element can also have a Sequence, Choice, or Unordered group subclass command and one of the item subclass command elements. Component Attribute Description SimpleTypeName Specifies the simple type name of the category added or replaced.
Chapter 4 - Commands and Command Elements Command Element Descriptions Size The Size command element specifies the size properties of an item. Components of Size The following group window displays the components of the Size command element. The Size command element can have a Min or Max attributes. Component Description Min Specifies the integer value of the minimum size. Max Specifies the value of the maximum size: either an integer or the value (S) for an unspecified maximum size.
Chapter 4 - Commands and Command Elements Command Element Descriptions TERMINATOR The TERMINATOR command element specifies the terminator of the active type. Components of TERMINATOR The following group window displays the components of the TERMINATOR command element. The TERMINATOR command element can have a Literal or Variable command elements.
Chapter 4 - Commands and Command Elements Command Element Descriptions ThousandsItem The ThousandsItem command element specifies the thousands separator of a character decimal number or a character integer as an item. Components of ThousandsItem The following group window displays the components of the ThousandsItem command element. The ThousandsItem command element can have a Find attribute and a RelativeTypeName command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions TotalDigits The TotalDigits command element specifies the digits properties for a character number. Components of TotalDigits The following group window displays the components of the TotalDigits command element. The TotalDigits command element can have a Min or Max attributes. Component Name Attributes Description TotalDigits Min Max Specifies the minimum and maximum digits of the character decimal number.
Chapter 4 - Commands and Command Elements Command Element Descriptions TTMAKER The following group window displays the components of the TTMAKER command element. The TTMAKER command element can have a Version attribute and a NEWTREE or OPENTREE commands.
Chapter 4 - Commands and Command Elements Command Element Descriptions TypeSyntax The following group window displays the components of the TypeSyntax command element. The TypeSyntax command element can have an INITIATOR, TERMINATOR, RELEASE, or empty command elements.
Chapter 4 - Commands and Command Elements Command Element Descriptions Variable The Variable command element specifies properties of a variable syntax object. Components of Variable The following group window displays the components of the Variable command element. The Variable command element can have a Find attribute and a RelativeTypeName or DefaultSyntaxValue command elements. Component Attribute Description Find YES Specifies to find the value of the variable delimiter. NO Default setting.
Chapter 4 - Commands and Command Elements Component DefaultSyntaxValue Attribute Command Element Descriptions Description Specifies the literal used as a default whenever a value for the syntax item has not been set in the data. If unprintable, enter as symbolic values. If entering a symbolic value in a map rule to be interpreted by the Type Tree Maker, separate the first character from the rest.
Chapter 4 - Commands and Command Elements Command Element Descriptions Western The Western command element specifies western character set properties. Components of Western The following group window displays the components of the Western command element.
Chapter 4 - Commands and Command Elements Command Element Descriptions WhiteSpace The following group window displays the components of the WhiteSpace command element. The WhiteSpace command element can have a BuildAs attribute and a Western command element. Component Description BuildAs Enter the characters that will replace white spaces.
Chapter 4 - Commands and Command Elements Command Element Descriptions Zero The Zero command element specifies a special value for zero. Components of Zero The following group window displays the components of the Zero command element. The Zero command element can have a RequiredOnInput attribute. Attribute Description RequiredOnInput The special value is required on input.
Chapter 4 - Commands and Command Elements Command Element Descriptions Zoned The Zoned command element specifies character zoned number properties. Components of Zoned The following group window displays the components of the Zoned command element. The Zoned command element can have an ImplicitDecimalPlaces or Sign attribute and either a TotalDigits or PadText command element. Component Attribute ImplicitDecimalPlaces Sign Description Specifies the number of implied decimal places.
Chapter 5 - Examples This chapter discusses examples that are provided with the Design Studio. These examples show how to use the Type Tree Maker and Type Tree Maker document files. Examples Folders When you install the Design Studio, two example folders are created. One example folder is created at: install_dir\examples\dsgnstud\ttmaker. This ttmaker directory at this location contains the following folders: Folder Description export Export Example.
Chapter 5 - Examples Export Example Installed Export Example Files The following files are installed in the export folder: File Use export.mms Map file that uses the .mts file as input to create the xref.txt file. element.mtt Type tree that contains the item with the restriction list. xreftbl.mtt Type tree that defines the cross-reference table to be produced. readme.txt Readme file that briefly describes the Export example. ttmaker60.
Chapter 5 - Examples Export Example Generating a Cross-Reference Table from a Restriction List The following section explains in detail how a Type Tree Maker document file containing a restriction list is mapped to a cross-reference table. To generate a cross-reference table from a restriction list 1 In the Type Designer, open the element.mtt type tree. 2 Double-click the item type Acc’t#Qual’rCd. The item window appears. The restriction list appears in the Include column.
Chapter 5 - Examples 6 Export Example Click Save. The element.mts file contains commands with information that will be used to create the cross-reference file. The following is the elements.mts file opened in Notepad: The cross-reference table to be created will have a row for each restriction. Before building and running the map, you may want to view the two type trees used by the maps: ♦ ttmaker60.
Chapter 5 - Examples Export Example The xreftbl.mtt type tree defines the cross-reference table, which is the output file. The ttmaker60.mtt type tree contains type definitions for the commands in the .mts file. The ValueRestrictions Element defines the inputs for the functional map: Note The ttmaker60.mtt file includes all the types needed to use any Type Tree Maker document file as input or output. You may find other uses for ttmaker60.mtt if you need to generate an .mts file from a map.
Chapter 5 - Examples Export Example The map source file export.mms contains two maps: an executable map exprstrc and a functional map It’sARow. As shown below, the executable map exprstrc takes as its input the type tree document file that resulted from exporting the Acc’t#Qual’rCd Element type. The output is the table of rows, in which each row represents a single restriction value and its description.
Chapter 5 - Examples Export Example The input card’s type is Document XML from the ttmaker60.mtt type tree.
Chapter 5 - Examples Export Example The output card’s type is XREFTable Data from the xreftbl.mtt type tree.
Chapter 5 - Examples Export Example The map exprstrc references a functional map It’sARow to produce each row in the table using each ValueRestriciton element in the exported type tree command file.
Chapter 5 - Examples Export Example In the functional map It'sARow, the input card's type is Value Element XML from the ttmaker60.mtt type tree. 8 From the Map menu, choose Build. 9 From the Map menu, choose Run. 10 From the Map menu, choose Run Results.
Chapter 5 - Examples Import Example The input and output results appear. The cross-reference file now contains the necessary information from the item restriction list. Import Example The import folder is installed in the install_dir\examples\ dsgnstud\ttmaker folder. It contains files that can be used to create a Type Tree Maker document file from a file that contains metadata. Metadata is data about data; it defines the syntax, structure, and semantic rules of data.
Chapter 5 - Examples Import Example Briefly, this procedure consists of the following: ♦ Define the map that generates a Type Tree Maker document file from the input metadata. ♦ The Type Tree Maker generates a type tree from the document file. The type tree defines several tables, their data fields and rows. ♦ This type tree could then be used by another map (which is not supplied as part of this example). The map could read or update rows in database tables with the contents of some other input.
Chapter 5 - Examples Import Example MyImport.mtt Type Tree The myImport.mtt is a customized version of ttmaker60.mtt. The ttmaker60.mtt type tree is generic; it can be used for any Type Tree Maker document file. A customized version helps to visualize the solution to a specific problem. In ttmaker60.mtt, a type tree consists of either a NEWTREE or OPENTREE element, which in turn consists of a series of OPENTREE Choice Expression(s).
Chapter 5 - Examples Import Example The myImport.mtt type tree replaces the generic OPENTREE Choice Expression with specific components for constructing a specific type tree. The ttmaker60.mtt type tree was made more specific for this example, as follows: ttmaker60.mtt was saved as myImport.mtt. The layout of the type tree to be created was designed. The following is the structure of the type tree to be created: The input metadata defines the properties of specific Fields, Rows, and Tables.
Chapter 5 - Examples Import Example After all the subtypes were made, the components of NEWTREE were changed to incorporate the specific types for this example: Now, you are ready to make the map using the modified MyImport type tree.
Chapter 5 - Examples Import Example Mapping from Metadata to a TTMAKER Document In the createtable.mms source file, tblimp is the executable map. It takes as its input the Acme metadata file and produces a type tree command file that will create a new type tree file defining this data. The following is the TableImport map that generates the .
Chapter 5 - Examples Import Example The input card for the map uses the definitions of the metadata contained in the Acmemeta.mtt type tree file and uses the actual metadata contained in ACMEDEF.
Chapter 5 - Examples The acmemeta.
Chapter 5 - Examples Import Example The type of the output card for the map is Document XML from the myimport.mtt type tree. The executable map, TableImport, contains rules that create the .mts file from the input metadata.
Chapter 5 - Examples Import Example When you build and run the map and then choose Run Results from the Map menu, the Type Tree Maker document file is generated: When you run the Type Tree Maker with the acme_tables.mts file as input, the Type Tree Maker window shows the type tree being built.
Chapter 5 - Examples Import Example The Type Tree Maker generates the acme_tables.mtt type tree. This type tree contains types for all the fields, rows, and tables defined in acmedef.txt. This type tree can then be used to describe the input or output data for some other map.
Chapter 5 - Examples DTD Example DTD Example The following .dtd file is installed in the Dtd folder: File Use ttmaker60.dtd The document type definition (DTD) defining the structure for the Type tree Maker document file.
Chapter 6 - Error and Warning Messages This chapter discusses errors and warnings that may result when the Type Tree Maker is run. Errors and Warnings When the Type Tree Maker finds a problem with a command, it creates either an error message or a warning message, depending on the severity of the problem. These error and warning messages that can be viewed from the Type Tree Maker window are also stored in the file ttmaker.log in your Mercator directory.
Appendix A - Return Codes and Error Messages This appendix discusses error and warning messages that result when generating a type tree using the Type Tree Maker. When the Type Tree Maker finds a problem with a command, it returns either an error message or a warning message, depending on the severity of the problem. These error and warning messages, viewable from the Type Tree Maker, are also stored in the install_dir/ttmaker.log file. The ttmaker.
Appendix A - Return Codes and Error Messages Type Tree Generation Error Messages Message Description Cannot set description The type was not created properly. Cannot set current type (Type does not exist.) The type was not created properly. Cannot create type (already exists?) The type cannot fit under the active type (for example: a group cannot be placed under an item), the active type name is too long, or the number of types exceeds the maximum number of types allowed in a type tree.
Appendix A - Return Codes and Error Messages Type Tree Generation Error Messages Message Description Cannot add restriction The active type is not an item. Only items can have restrictions. Cannot propagate The type was not created properly. Cannot get type information The type was not created properly. Cannot get initiator The type was not created properly. Cannot get terminator The type was not created properly. Cannot get release character The type was not created properly.
Appendix A - Return Codes and Error Messages Messages Type Tree Generation Logic Warning Message Description Overwrote existing type (and possible subtree) The type already existed in the tree and was overwritten. Separator option has Find set but no default For the Separator option, you must specify Default when you specify Find. Analysis warnings occurred The Type Tree Analyzer produced warnings.
Appendix A - Return Codes and Error Messages Messages Type Tree Generation Logic Warning Return Code Message L215 DELIMITER length greater than maximum allowed in TYPE: ‘type name’ Hint: Delimiters, initiators, and terminators are limited to 120 bytes. L216 The Padded To length for item - ‘type name’ was less than the maximum content size. L217 Fixed TYPE - ‘type name’ must include white space or have a terminator. L218 RELEASE CHARACTER for TYPE - ‘type name’ must have a value.
Appendix A - Return Codes and Error Messages Messages Type Tree Generation Logic Warning Return Code Message L232 Default 1000’s separators not specified TYPE ‘type name’ L233 Default 1000’s separator not in restriction list TYPE ‘type name’ L234 1000’s separator type is not a SYNTAX ITEM TYPE ‘type name’ L235 1000’s separator type has no restriction list TYPE ‘type name’ L236 Decimal separator type neither inherited nor local TYPE ‘type name’ L237 Default separator type is not a SYNTAX ITEM
Index Literal, 74 Modify, 75 OneByteLiteral, 76 Packed, 77 PaddedToFixedSize, 78 PadNumber, 78 PadText, 79 RELEASE, 81 ROOT, 82 Size, 84 TERMINATOR, 85 ThousandsItem, 86 TotalDigits, 87 TTMAKER, 88 TypeSyntax, 89 Variable, 90 Western, 92 WhiteSpace, 93 Zero, 94 Zoned, 95 command elements definion of, 21 list of, 52 command file examples, 11 command files, 7 command line options, 14 commands AddComponent, 22 AddRestriction, 24 ANALYZE, 18 AUTOCLOSE, 18 BinaryDatetime, 25 BinaryNumber, 26 BinaryText, 27 CATEG
Index ITEM, 38 list of, 22 NEWTREE, 40 OPENTREE, 41 PROPAGATE, 42 Range, 43 RangeRestrictions, 44 REPLACE, 18 Sequence, 45 SequenceComponent, 46 SyntaxItem, 47 Unordered, 48 UnorderedComponent, 49 Value, 50 ValueRestrictions, 51 comments defined, 17 D Decimal command element, 56 Delimited command element, 61 DelimiterLiteralcommand element, 63 document files creating, 7 DTD, 117 E empty element, 64 errors messages, 118 examples DTD files, 117 export files, 97 import, 107 import files, 106, 107 installed,
Index definition of, 21 ThousandsItem element, 86 TotalDigits element, 87 TTMAKER element, 88 ttmaker.