Was this helpful?
Micro Focus Cobol
Micro Focus COBOL is a record manager that many applications use for data storage. Using this connector, Map Editor can read and write:
Micro Focus COBOL files of fixed-length files in Line Sequential, Sequential, Relative, and indexed formats
Micro Focus COBOL files of variable-length files in Sequential, Relative, or Indexed formats, if the variable length field is the last data field in the file. For these variable-length files, Map Editor pads all the records to the longest record length.
Note:  DataConnect v11 supports Micro Focus COBOL connector 64-bit only.
Prerequisites
The following are the prerequisites:
Install licensed COBOL run-time server (COBOL Server) and add runtime libraries in system PATH.
If data file and index file are separate, then the files must be available in the same directory from which you will connect.
If you do not have Micro Focus COBOL file in system encoding (OEM or ANSI), then set CodePage property to the related encoding value. This will transform it to system encoding before setting the field widths.
Micro Focus COBOL Connector Properties
You can set the following source (S) and target (T) properties.
Property
Source/Target
Description
CodePage
S/T
Allows to use the required encoding for reading and writing the data. The following code pages are available:
ANSI (default)
OEM
0037 US (EBCDIC)
0273 Germany (EBCDIC)
0277 Norway (EBCDIC)
0278 Sweden (EBCDIC)
0280 Italy (EBCDIC)
0284 Spain (EBCDIC)
0285 UK (EBCDIC)
0297 France (EBCDIC)
0437 MSDOS United States
0500 Belgium (EBCDIC)
0850 MSDOS Multilingual (Latin 1)
0860 MSDOS Portuguese
0861 MSDOS Icelandic
0863 MSDOS Canadian French
0865 MSDOS Nordic
1051 Roman-8
DataCompression
S/T
Allows DataConnect to read (Source) or write (Target) to the Micro Focus COBOL data using data compression (CBLDC001).
If set to True, compression is used.
If set to False, compression is not used.
The default value is False.
FileType
S/T
Allows to read or write the data to any of the five types of Micro Focus COBOL file formats. The available file format options are:
Line Sequential
Sequential
Relative
Indexed
Unknown
The default file format is Line Sequential for source and target.
Note:  If the file format for source is Indexed file, then this property is ignored as the connector detects indexed type. Otherwise, you must set FileType.
Map Editor creates a data file that is indexed only on the first Target field (by default). You cannot use Map Editor to further index the target file. To further index, use the application that is using the Micro Focus COBOL record manager.
Note:  The Unknown file type property is used when you do not know the type (organization) of the file. Micro Focus COBOL uses the correct organization type during run time.
InsertNulls
S/T
If set to True, Map Editor uses Null characters to escape control characters in Line Sequential files. The default value is True.
InsertTabs
S/T
If set to True, allows Map Editor to support tab insertion in Line Sequential Micro Focus COBOL files. The default value is False.
Record Mode
T
Allows to record the recording mode. Recording mode is a part of MF FCD structure and indicates if the record is fixed or variable. The options are:
Fixed
Variable
To write a variable-length in Micro Focus COBOL file, change the setting to Variable. The default setting is Fixed.
Note:  Map Editor reads fixed and variable-length files automatically when Micro Focus COBOL is the source connector.
Supported Output Modes
Micro Focus COBOL connector supports the Replace and Append output modes. For information about output modes, see Target Output Modes.
Limitations
Spaces in File Names: Target paths and file names cannot contain spaces. If Map Editor encounters a space in the Target path or file name when writing to a Micro Focus COBOL file, it attempts to write the data to the specified location up to the space and displays an error message. For example:
Error 25519 opening target 'Micro Focus COBOL': File or path cannot contain spaces error
Multiple Structured Schemas: This connector does not support multiple record types. This means you cannot manually add Structured Schemas beyond a single record type. However, for some types of COBOL data, you may be able to use the following connectors instead:
Binary
ASCII (Fixed)
Unicode (Fixed)
Additional Information
This section provides information about the following:
File Control Description (FCD)
The File Control Description (FCD) is a data area which contains information about the file in use. Micro Focus COBOL connector supports FCD version 3 on 64-bit operating system. For more information about FCD, see
Source Schema
Index files specify the record length and not the structure of the source file. Map Editor automatically detects the end of the record data, but the Micro Focus COBOL source file is not automatically separated into fields. You must define the fields by parsing the data in the Schema Editor.
Note:  You must provide schema information with copybook or create manually using the Schema Editor. If you build a schema using copybook, then use metadata connector to generate the schema.
To define the structure of a Micro Focus COBOL source file, create a Schema > select the Connector > select Use Data Parser. For more information about parsing data, see Creating Schema Using Data Parser.
Target Schema
Define the structure of your target Micro Focus COBOL file. You can define the schema in the following ways:
Generate from copybook
Create the schema manually
Use the existing schema
For more information, see Managing Schemas. Specify the information in target for Micro Focus COBOL files:
Target Field Name: These are field names displayed in the target data table. If you are writing data to a new table, then you can enter a name for each field. If you are writing data to an existing table, then the field names default in the selected table.
Target Field Expression in Mapping tab: These options allow you to map the data exactly as it is in the source data file, or to make updates to the actual data in any field. You can perform the following:
Calculations
Concatenate data to the existing data
Combine data from two or more fields
Write data in a blank field and make changes or updates
Type: These are the data types stored in your target data file or table:
Comp
Comp-1
Comp-2
Comp-3
Comp-5
Comp-X
Display
Display justified
Display sign leading
Display sign leading
Display sign trailing
Display sign trailing
Packed decimal
Text
Zoned decimal
Zoned, leading sign
Zoned, trailing sign
Last modified date: 08/02/2023