Convert COBOL - Data360_Analyze - 3 - 3.12

Data360 Analyze Server Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 Analyze
Version
3.12
Language
English
Product name
Data360 Analyze
Title
Data360 Analyze Server Help
Copyright
2023
First publish date
2016

Converts an input COBOL copybook specification to obtain the Data Reader Input XML Specification (DRIX) and Data Reader Output XML Specification (DROX).

These can then be used within the Data360 Analyze Data Reader in order to parse a file which is specified by the COBOL copybook specification.

Properties

CobolCopybookFilename

Optionally specify the filename of the COBOL copybook specification to be used. In general, this cannot be used in conjunction with the CobolSpec property, and one of these two properties must be used.

If constructing a more complicated DRIX, whereby the copybooks are supplied in a different manner than the default, then these properties can be ignored.

CobolCopybook

Optionally specify the COBOL copybook specification to be used. In general, this cannot be used in conjunction with the CobolSpecFile property, and one of these two properties must be used.

If constructing a more complicated DRIX, whereby the copybooks are supplied in a different manner than the default, then these properties can be ignored.

Library

Specify the name of the library for the generated COBOL DRIX file. This library will simply contain the DRIX copybook definition.

A DRIX file will also be produced with the library: {{^Library^}}Wrapper

This will then contain the wrapping types needed to ensure that the file organization is taken into account.

The {{^Library^}}Wrapper library should be used to read the COBOL files.

A value is required for this property.

Version

Optionally specify the version number for the generated COBOL DRIX file.

Namespace

Specify the namespace under which all of the types will be defined in the generated COBOL DRIX file.

A value is required for this property.

TopLevelType

Optionally specify the type within the COBOL specification which is the top level type. This type defines how to read the data file.

DRIXOutputDir

Specify the directory to which the output DRIX files are to be written.

The following files are produced:

  • {{^DRIXOutputDir^}}/{{^Library^}}.drix

    The DRIX used to read single copybook records.

  • {{^DRIXOutputDir^}}/{{^Library^}}Wrapper.drix

    The wrapping DRIX, taking into account file organization and alignment, used to read COBOL copybook-specified files.

A value is required for this property.

DROXOutputDir

Specify the directory to which the output DRIX file is to be written.

The following file is produced:

  • {{^DROXOutputDir^}}/{{^Library^}}.drox

    The DROX to be used in conjunction with the DRIX file generated in {{^DRIXOutputDir^}}/{{^Library^}}Wrapper.drix to read the COBOL files.

A value is required for this property.

copyLibDir

Optionally specify the directory within which the copylibs referenced by any COPY statements in the COBOL specification are to be found.

If there are no COPY statements, this property has no effect. If this property is set, it is used for the location of all copylibs. Or, if the COBOL copybook is specified in the COBOLCopybookFilename property, the directory containing the COBOL copybook is used for the location of all copylibs. Otherwise, you will receive an error.

PadByte

Optionally specify the padding, or uninitialized byte which is used.

Often, COBOL records are initialized using a statement such as MOVE SPACES or MOVE ZEROES to the entire record. Alternatively, the entire record might not be initialized with any values. In such cases, if individual fields are not set, and the record is written, then the output will simply contain the default uninitialized values, or the values that were initially moved to the entire record.

In some cases, this cannot be distinguished from correct data (e.g. if " " is used, and we are trying to read an X field, or for any binary integer cases).

However, in other cases, this will lead to an invalid encoding which will throw errors. In such cases, the padByte should be set to the bytes used as initializers over the entire record. Then, this will be used while decoding the record to ensure that unset items are not recognized as bad data. If this padByte is not set, then no such checking is performed.

strictFormatting

Optionally specify the formatting of the COBOL specification. If the specification is strictly formatted, the specification can only exist between columns 7 and 72. Column 6 is reserved for control chars. All data outside these margins is ignored. On the other hand, if this is not set, a free-format mode is set and no columns are ignored. If the first non whitespace character in the document is a control character, then this is used as a control.

RecordMarkerLength

Optionally specify the length of the record marker used in cases of relative file organization. The record marker indicates whether or not a record is normal, or, for example, has been deleted in the system prior to writing to file. This is normally 2 bytes when the files are written on Windows platforms & 1 byte when the files are written on Unix platforms.

LibrarySearchPaths

Optionally specify the absolute path of the directories containing any referenced DRIX files. Each path entry must be on a new line.

All search paths must exist at a location on the file system where the Data360 Analyze server is located.

Example: {{nil.brain.home}}/lib/ldr/commonTypes

{{nil.brain.home}}/lib/ldr/converters/asn1

FileOrgDrix

Optionally specify the DRIX file to use to wrap the DRIX produced by the COBOL converter. This uses the information relating to FileOrganisation, FixedOrVariable file format and BDW/RDW properties to produce a DRIX/DROX to correctly read the file.

DroxGenerator

This DROX primarily contains dump and dumper tags. The DROX and these dump and dumper tags are then applied to the LDR after initializing it with the generated DRIX files to generate a new DROX with all of the required fields to output. The DROX can be modified to include other fields, or change the dump pattern and add other dump patterns to specify a different output format.

FileOrganization

Optionally specify the File Organization of the COBOL File. Choose from:

  • sequential
  • relative
  • mainframe

Sequential and Relative file organization follow the standard described in http://supportline.microfocus.com/documentation/books/sx40/fhfile.htm

Mainframe file organization uses Block Descriptor Words (BDWs) & Record Descriptor Words (RDWs) to wrap the COBOL records.

The exact usage of these properties is dependant on the FileOrgDrix property, and the FixedOrVariable property.

For Mainframe file organization, the following properties are also used to construct the correct DRIX:

  • BDWLength
  • BlockeLengthIncludesBDW
  • RDWLength
  • RecordLengthIncludesRDW

The default value is sequential.

FixedOrVariable

Optionally specify whether the COBOL records are of a fixed or variable length.

Even if the COBOL records are of a variable length, the variable option should only be set if the output files have used a file organization or recording mode specifying variable length records.

In all other cases, fixed should be used, as variable length records in such cases will always be output padded up to the maximum allowable record length.

The default value is fixed.

BDWLength

Optionally specify the length of the Block Descriptor Word (BDW).

This property is only important if mainframe file organization is set, and variable length records are selected. Choose from:

  • ZeroBytes (no BDW)
  • TwoBytes
  • FourBytes (in such a case, only the first 2 bytes contain the length and the last 2 bytes are skipped)

The default value is FourBytes.

BlockLengthIncludesBDW

Optionally specify whether or not the block length specified by the Block Descriptor Word (BDW) includes the length of the BDW itself.

The default value is True.

RDWLength

Optionally specify the length of the Record Descriptor Word (RDW).

This property is only important if mainframe file organization is set, and variable length records are selected. Choose from:

  • ZeroBytes (no RDW)
  • TwoBytes
  • FourBytes (in such a case, only the first 2 bytes contain the length & the last 2 bytes are skipped)

The default value is FourBytes.

RecordLengthIncludesRDW

Optionally specify whether or not the record length specified by the Record Descriptor Word (RDW) includes the length of the RDW itself.

The default value is True.

floatEncoding

Optionally specify the floating point representation used by COMP-1 and COMP-2 fields. Generally will be IEE-754 except for the IBM floating point cases (where an IBM COBOL compiler/hardware is used).

Choose from:

  • IEEE - standard IEEE-754 Floating point encoding.
  • IBM - IBM float encoding.

The default value is IEEE.

storage

Optionally specify the storage alignment for all of the data specified in a COBOL copybook. Choose from:

  • ST_1_8 - allows for all storage sizes (1,2,3,..8 etc)
  • ST_1_2_4_8 - allows for storage size 1, 2, 4, 8, etc
  • ST_2_4_8 - allows for storage size 2, 4, 8, etc

The default value is ST_2_4_8.

encoding

Optionally specify the encoding used by the data specified in a COBOL copybook for all non-binary types. Choose from:

  • ASCII - all non-binary items are ASCII encoded.
  • EBCDIC - all non-binary items are EBCDIC encoded.

The default value is ASCII.

sync

Optionally specify the alignment/synchronization for all elementary binary data is turned on by compiler directive or command line. Choose from:

  • NO_SYNC - SYNC clause where present has no effect
  • SYNC_16 - where a SYNC clause is present, all data items are sync'd on 16 bit boundaries regardless of the size of the data item
  • SYNC_32 - where a SYNC clause is present, all data items are sync'd on 32 bit boundaries regardless of the size of the data item
  • SYNC_2_4 - where a SYNC clause is present, all data items are sync'd according to the storageSize property, and the size of the data item - data items greater than 4 bytes will be sync'd to 4 bytes
  • SYNC_VARY - where a SYNC clause is present, all data items are sync'd according to the storageSize property, and the size of the data item, there is no maximum byte size to which the sync will be applied.

The default value is NO_SYNC.

binarySignMode

Optionally specify the encoding mechanism used for COMP-4 and COMP-5 binary fields in data specified in a COBOL copybook. Most pure binary integers use 2's-complement, but each vendor is free to chose their own method for all types. Choose from:

  • ONES_COMP
  • TWOS_COMP
  • SIGN_MAG
  • UNSIGNED

The default value is TWOS_COMP.

recordAlignment

Optionally specify the alignment for each of the level 01 COBOL items. If set, this should be an integer value. This corresponds to the Microfocus ALIGN directive, and when used, is often set to 8.

The default value is 0.

nationalCharset

Optionally specify the character set to use for national PIC clauses specified in the COBOL copybook.

The default value is UTF-16.

display1Charset

Optionally specify the character set to use for characters specified in the COBOL copybook with a USAGE DISPLAY-1 in the PIC clause .

The default value is UTF-16.

endian

Optionally specify the endian-ness of all of the data specified by a COBOL copybook. Endian-ness is the ordering of individually addressable sub-units (words, bytes, or even bits) within a longer data word stored in external memory.

The DEFAULT option specifies that the endian value to use will be taken from the defaultByteOrder property which sets the endian-ness for the entire file (and not just the copybook specified section of the file). Choose from:

  • DEFAULT
  • LITTLE_ENDIAN
  • BIG_ENDIAN
  • NATIVE

The default value is DEFAULT.

comp5Endian

Optionally specify the endian-ness of all the COMP-5 data specified by a COBOL copybook.

Endian-ness is the ordering of individually addressable sub-units (words, bytes, or even bits) within a longer data word stored in external memory.

The DEFAULT option specifies that the endian value to use will be taken from the general endian property. Choose from:

  • DEFAULT
  • LITTLE_ENDIAN
  • BIG_ENDIAN
  • NATIVE

The default value is DEFAULT.

compEndian

Optionally specify the endian-ness of all the COMP-4, COMP and BINARY data specified by a COBOL copybook. Endian-ness is the ordering of individually addressable sub-units (words, bytes, or even bits) within a longer data word stored in external memory.

The DEFAULT option specifies that the endian value to use will be taken from the general endian property. Choose from:

  • DEFAULT
  • LITTLE_ENDIAN
  • BIG_ENDIAN
  • NATIVE

The default value is DEFAULT.

BigToString

Optionally specify whether java.lang.BigInteger and java.lang.BigDecimal fields should be converted to Strings and output as such. The internal BRD formats numeric types (double, long) cannot handle numeric values greater than 8 bytes long. If these types are not converted to String, then they must be output as byte array data.

The default value is True.

StringToUnicode

Optionally specify whether or not all java Strings should be output as Unicode in the output records

The default value is False.

ByteArrayToBase64

Optionally specify whether or not byte arrays can be output as Base64 encoded strings. When this is set to False, byte arrays cannot be output by this node.

The default value is False.

RedefinesErrorLevel

Optionally specify the error level to use for error filtering on REDEFINES clauses.

REDEFINES clauses can cause a set of bytes in the data file to be read into multiple different types. The idea is that only one of these types will be valid. However, there is not enough information in the copybook or the data to determine which of the types is valid. Therefore, these cannot be simply placed into an "or" tag. Instead, each of these fields need to be read independently. In such cases, it is possible for one of the REDEFINES fields to have encoding errors.

Error filtering is then applied to these errors based on the specified RedefinesErrorLevel.

Choose from:

  • ignore
  • info
  • warning
  • recoverableError
  • fatalError
  • none

Where each of these options are handled according to the corresponding LDRException.ErrorLevel value, except for none. When none is selected, no error filtering is performed on redefines errors.

The default value is ignore.

ErrorPinName

Optionally specify the name of the error output pin where warning and error messages are to be logged.

DeprecatedErrorLevel

Optionally specify the error level for error messages relating to deprecated features/types.

Inputs and outputs

Inputs: multiple optional.

Outputs: multiple optional.