Element: COBOLCONFIG

This element describes the COBOL-specific configuration. Among other facilities, it allows for the definition of the mapping between XMLBooster types and host types, for instance by using:
<COBOLCONFIG USECLASSPREFIX="FALSE"             NUMBERLINES="6">   <INTEGERTYPE>PIC S9(6)V COMP</INTEGERTYPE></COBOLCONFIG>
This picture clauses generated as defined above can then be overridden on a field by field basis, by using a specific META tag:
    <FIELD NAME="Quan" TYPE="INTEGER" >      <META NAME="COBOLPIC">PIC 9(3)</META>    </FIELD>

Attributes

Name Type Optional
NUMBERLINES INTEGER Yes By default, XMLBOOSTER's COBOLcode generator produces text without linenumbers. If given a positive value this variableis used as width for the line numberingscheme. For instance, the sample programbelow has been generated with NUMBER-LINES="6", as lines are numbered usinga numbering scheme with 6 digits.
MAXLINELENGTH INTEGER Yes By default, XMLBOOSTER's COBOLcode generator assumes that there is nohard limit in terms of the line length.It will use newlines liberally, but it mightsometimes lines longer than what a given COBOLcompiler might accept.By setting this attribute, one can force XMLBoosterto ensure that it never generates any linelonger than a given limit.
TRUNCATEIDENTIFIERS INTEGER Yes If set, this attribute causes the COBOL identifiers generatedby XMLBooster to be truncated to the length it specifies. Thismechanism does not provide any disambiguation mechanism for thetruncated identifers.
USECLASSPREFIX BOOLEAN Yes If set to TRUE, XMLBOOSTER will usethe element name as prefix for all identifiers.For instance, the field named DAYin ENTRY will translated onto a COBOLvariable named ENTRY-DAY. This attributeoverrides PREFIX and POST-FIXas described above.
USEINITIALIZE BOOLEAN Yes If set to TRUE, XMLBOOSTER will usethe INITIALIZE statement to initialize theCOBOL data structures, rather than initializing itsfields one by one, according to their type.
USESTRINGSFORENUMS BOOLEAN Yes If set to TRUE, XMLBOOSTER will translatefields marked using an enumerated type to a characterstring, as opposed to an integer with 88 leveldeclarations.Using this option will make the generated data structureslargers, but in some cases, easier to use, as plain stringscan then be used from within ther user's application to testand set values in these fields.
In any case, using this option does not deactivate checkingwhen parsing items denoted by an enumerated type: they must stillmatch one of the type's entries.
MAXLEN INTEGER Yes When a field denotes a character stringtype, the COBOL-level MAXLEN attributecan be used to indicate the stringlength to use unless overriden locally.
ARRAYSIZE INTEGER Yes When a field contains an array of instancesdenoted by another element, the COBOL-levelARRAYSIZE attribute can be usedto indicate the number of elements it containsif not overriden locally.
CHECKFORSLICELEN BOOLEAN Yes If set to TRUE, this attribute causes the lengthof a slice to be checked for explicitly when dealing withan expression such as XMLB-BUFF(XMLB-PTR:XMLB-LEN)as some compilers crash when the length of the slice(XMLB-LEN in the example above) is zero.
DATAPREFIX STRING Yes If specified, DATAPREFIX is used as prefixfor all field names (unless overridden explicitlyusing the OVERRIDE attribute)in the COBOL structures generated byXMLBOOSTER.
LABELPREFIX STRING Yes If specified, LABELPREFIX is used as prefixfor all labels in XMLBooster-generated code.The default value for this attribute is"XMLBL-".
COUNTERPOSTFIX STRING Yes If specified, COUNTERPOSTFIX is used as postfix toderive the counter in a collection from the nameof the field itself. The default value for this attributeis "COUNTER".
BUFFERPREFIX STRING Yes If specified, BUFFERPREFIX is used as prefix todefine the buffer data name for the buffer for theelement.The default value for this attributeis DATAPREFIX+"BUFF-".
ENUMBUFFERPREFIX STRING Yes If specified, ENUMBUFFERPREFIX is used as prefix todefine the buffer data namethat will hold the work value for anenumeration.The default value for this attributeis DATAPREFIX+"EBUFF-".
INHERITEDPREFIX STRING Yes If specified, INHERITEDPREFIX is used as prefix todefine the buffer data namethat will hold the inherited fields in caseof inheritance.The default value for this attributeis DATAPREFIX+"INH-".
ACCEPTPREFIX STRING Yes If specified, ACCEPTPREFIX is used as prefixfor all labels that parse top-level elements.The default value for this attributeis LABELPREFIX+"ACCEPT-".
UNPARSEPREFIX STRING Yes If specified, UNPARSEPREFIX is used as prefixfor all labels that unparse top-level elements.The default value for this attributeis LABELPREFIX+"UNPARSE-".
LOCALACCEPTPREFIX STRING Yes If specified, LOCALACCEPTPREFIX is used as prefixfor all locally defined labels that parse something(elements, enumerations, etc.)itself. The default value for this attributeis LABELPREFIX + "LACC-".
LOCALACCEPTBODYPREFIX STRING Yes If specified, LOCALACCEPTBODYPREFIX is used as prefixfor all locally defined labels that parse the bodyof elements, excluding attributes.The default value for this attributeis LABELPREFIX + "LACB-".
LOCALACCEPTENUMPREFIX STRING Yes If specified, LOCALACCEPTENUMPREFIX is used as prefixfor labels used to recognize enumeration values.The default value for this attributeis LOCALACCEPTPREFIX+"ENUM-".
LOCALUNPARSEPREFIX STRING Yes If specified, LOCALUNPARSEPREFIX is used as prefixfor all locally defined labels that unparse something(elements, enumerations, etc.)itself. The default value for this attributeis LABELPREFIX + "LUNP-".
LOCALUNPARSEBODYPREFIX STRING Yes If specified, LOCALUNPARSEBODYPREFIX is used as prefixfor all locally defined labels that unparse the body ofelements (exclusing the attributes).The default value for this attributeis LABELPREFIX + "LUNB-".
FORCEUPPER BOOLEAN Yes If set to TRUE, this attributescauses all identifier generated by theXMLBOOSTER COBOL code generatorto be made of uppercase charactersonly.

Content

Permutation of
Optional INTEGERTYPE
Optional LONGTYPE
Optional REALTYPE
Optional BOOLEANTYPE
Optional ENUMTYPE

Example

<CONFIG>
  <LICENCE>
    caTapRgSvLXXBVsfg0qU
    RgQpJPRAvlBK7nFhxR2p
    j1mR93bnkp6Hv7Og8BSN
    ZgK7rI4sTxkBHpatRQ3Z
    lYmpqUS5qG5KLcwsh1cP
    EUifF4sxnK
  </LICENCE>
  <JAVACONFIG PACKAGE="MetaXmlB"
              COLLECTIONCLASS="ArrayList"
              COLLECTIONSTART="ZERO">
    <IMPORT>
      /////////////////////////////////////
      // Automatically inserted import list
      /////////////////////////////////////
      import java.util.*;
    </IMPORT>
  </JAVACONFIG>
  <CSHARPCONFIG NAMESPACE="MetaXmlB"
                COLLECTIONCLASS="ArrayList"
                COLLECTIONSTART="ONE">
    <USING>
      /////////////////////////////////////
      // Automatically inserted import list
      /////////////////////////////////////
      using System.COllections;
    </USING>
  </CSHARPCONFIG>
  <YAFLCONFIG>
    <IMPORT>
      FROM Meta IMPORT BaseFormula;
    </IMPORT>
  </YAFLCONFIG>
  <HTMLCONFIG TITLE="Phidani Software" STYLE="xmlb.css">
    <HTMLPAGE DOCELEMENT="INDEX" POSITION="HEADER">
    <![CDATA[
    <BODY BGCOLOR="BLACK" VCOLOR="yellow" vlink="#FFFF00" alink="#FF0000" link="#FFFF00" TEXT="WHITE">
     <TABLE WIDTH="100%">
     <TD ALIGN="RIGHT">
     <IMG SRC="logo.gif"/>
     </TD>
     </TABLE>
    ]]>
    </HTMLPAGE>
    <HTMLPAGE DOCELEMENT="INDEXES" POSITION="HEADER">
    <![CDATA[
    <BODY BGCOLOR="BLUE" VCOLOR="yellow" vlink="#FFFF00" alink="#FF0000" link="#FFFF00" TEXT="WHITE">
    ]]>
    </HTMLPAGE>
    <HTMLPAGE DOCELEMENT="LISTINDEX" POSITION="HEADER">
    <![CDATA[
    <BODY BGCOLOR="GREEN" VCOLOR="yellow" vlink="#FFFF00" alink="#FF0000" link="#FFFF00" TEXT="WHITE">
    ]]>
    </HTMLPAGE>
    <HTMLPAGE DOCELEMENT="ELEMENT" POSITION="HEADER">
    <![CDATA[
    <BODY BGCOLOR="GRAY" VCOLOR="yellow" vlink="#FFFF00" alink="#FF0000" link="#FFFF00" TEXT="WHITE">
     <TABLE WIDTH="100%">
     <TD ALIGN="RIGHT">
     <IMG SRC="logo.gif"/>
     </TD>
     </TABLE>
    ]]>
    </HTMLPAGE>
  </HTMLCONFIG>
  <DELPHICONFIG  COLLECTIONSTART="ZERO" />
  <COBOLCONFIG
    USECLASSPREFIX="TRUE"
    NUMBERLINES="6" />
  <CCONFIG MAXLEN="80" GLOBALPREFIX="cfg_">
  </CCONFIG>
</CONFIG>

DTD declaration

<!ELEMENT COBOLCONFIG
(INTEGERTYPE?| LONGTYPE?| REALTYPE?| BOOLEANTYPE?| ENUMTYPE?)*
>

<!ATTLIST COBOLCONFIG
NUMBERLINES CDATA #IMPLIED
MAXLINELENGTH CDATA #IMPLIED
TRUNCATEIDENTIFIERS CDATA #IMPLIED
USECLASSPREFIX (TRUE|YES|yes|Y|y|ON|On|on|true|True|1|FALSE|NO|no|N|n|OFF|Off|off|false|False|0) #IMPLIED
USEINITIALIZE (TRUE|YES|yes|Y|y|ON|On|on|true|True|1|FALSE|NO|no|N|n|OFF|Off|off|false|False|0) #IMPLIED
USESTRINGSFORENUMS (TRUE|YES|yes|Y|y|ON|On|on|true|True|1|FALSE|NO|no|N|n|OFF|Off|off|false|False|0) #IMPLIED
MAXLEN CDATA #IMPLIED
ARRAYSIZE CDATA #IMPLIED
CHECKFORSLICELEN (TRUE|YES|yes|Y|y|ON|On|on|true|True|1|FALSE|NO|no|N|n|OFF|Off|off|false|False|0) #IMPLIED
DATAPREFIX CDATA #IMPLIED
LABELPREFIX CDATA #IMPLIED
COUNTERPOSTFIX CDATA #IMPLIED
BUFFERPREFIX CDATA #IMPLIED
ENUMBUFFERPREFIX CDATA #IMPLIED
INHERITEDPREFIX CDATA #IMPLIED
ACCEPTPREFIX CDATA #IMPLIED
UNPARSEPREFIX CDATA #IMPLIED
LOCALACCEPTPREFIX CDATA #IMPLIED
LOCALACCEPTBODYPREFIX CDATA #IMPLIED
LOCALACCEPTENUMPREFIX CDATA #IMPLIED
LOCALUNPARSEPREFIX CDATA #IMPLIED
LOCALUNPARSEBODYPREFIX CDATA #IMPLIED
FORCEUPPER (TRUE|YES|yes|Y|y|ON|On|on|true|True|1|FALSE|NO|no|N|n|OFF|Off|off|false|False|0) #IMPLIED
>