![]() |
![]() |
|
|
Supported Data Types
This section lists the following data types supported by XML Translator.
MFL Data Types
Table A-1 lists the MFL data types that XML Translator supports. These types are specified in the type attribute of a FieldFormat element.
Table A-1 Supported MFL Data Types
COBOL Copybook Importer Data Types
Table 4-1 lists the COBOL data types and the support provided by the Importer.
Table 6-1 COBOL Data Types
Support for these data types is limited. The following formats: will be converted to an unsigned 4 byte integer type, while the following will generate errors: In these samples, pic9(5) could be substituted for pic x(5). The following values are defined as follows:05 pic 9(5) comp-5
05 pic 9(5) comp-x
05 pic X(5) comp-5
05 pic X(5) comp-x
Some vendor-specific extensions are not recognized by the importer, however, any copybook statement that conforms to ANSI standard COBOL will be parsed correctly by the Importer. The Importer's default data model, which is based on the IBM mainframe model, can be changed in Format Builder to compensate for character set and data "endianness".
When importing copybooks, the importer may identify fields generically that, upon visual inspection, could easily be identified by a more specific data type. For this reason, the copybook importer creates comments for each field found in the copybook. This information is useful in assisting you in editing the MFL data to better represent the original Copybook. For example:
original copybook entry:
05 birth-date picxx/xx/xx
results in:
A field of type EBCDIC with a length of 8.
Closer inspection indicates that this is intended to be a date format and could be defined as:
A field of type Date: MM/DD/YY
or
A field of type Data: DD/MM/YY
C Structure Importer From Importing Meta Data
The C Struct importer does not parse files containing anonymous unions, bit fields, or in-line assembler code. The following samples of unsupported structures came from the pre-processor output of a hello.c file that contained an #include <windows.h>.
#line 353 "e:\\program files\\microsoft visual studio\\vc98\\include\\winnt.h"
typedef union_LARGE_INTEGER{
struct {
DWORD LowPart;
LONG HighPart;
};
struct {
DWORD LowPart;
LONG HighPart;
} u;
#line 363 "e:\\program files\\microsoft visual studio\\vc98\\include\\winnt.h"
LONGLONG QuadPart;
} LARGE_INTEGER
typedef struct_LDT_ENTRY {
WORD LimitLow;
WORD BaseLow;
union {
struct {
BYTE BaseMid;
BYTE Flags1;
BYTE Flags2;
BYTE BaseHi;
} Bytes;
struct
DWORD BaseMid : 8;
DWORD Type : 5;
DWORD Dpl : 2;
DWORD Pres : 1;
DWORD LimitHi : 4;
DWORD Sys : 1;
DWORD Reserved_0 : 1;
DWORD Default_Big : 1;
DWORD Granularity : 1;
DWORD BaseHi : 8;
} Bits;
} HighWord;
} LDT_ENTRY, *PLDT_ENTRY;
_inline ULONGLONG
_stdcall
Int64ShrlMod32(
ULONGLONG Value,
DWORD ShiftCount
)
{
_asm {
mov ecx, ShiftCount
mov eax, dword ptr [Value]
mov edx, dword ptr [Value+4]
shrd eax, edx, cl
shr edx, cl
}
}
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|