Directives & Configuring
Micro Focus Compiler & File Handler
|The SimoTime Home Page|
This document provides information about how to specify and use the Micro Focus COBOL compiler directives that may be required to control program behavior in the Linux, UNIX or Windows environments in a manner compliant with the compiler options and subsequent execution on the Mainframe System. In the world of computer systems and programming there are many alternatives for providing solutions. The approaches described in this document offer a few alternatives.
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2022
SimoTime Technologies and Services
All Rights Reserved
Compiler directives may be individually specified in the source code of a COBOL program, as part of a Net Express project or grouped together in a directives file that may be referenced by the project or command that is doing the compile. For most of the compiles this suite of examples uses directives files, two for the batch environment and two for the online environment. The following sections describe each in more detail.
When the NOFORM directive is used the listing will be created without print carriage control and page headers. This makes for easier viewing from the screen and produces a listing file with the included copy files. This listing file could be renamed with a .CBL extension and compiled.
Note: The NOFORM directive must follow the LIST() directive. The LIST directive will set FORM"60".
The following (OS390AscCBLBAT.dir) is a listing of the DIR file used when compiling COBOL batch programs for an ASCII-encoded environment. These are programs without "EXEC CICS" and without "EXEC SQL" syntax.
DIALECT"OS390" CHARSET"ASCII" ASSIGN"EXTERNAL" IDXFORMAT"8" IBMCOMP NOTRUNC HOSTNUMMOVE HOSTNUMCOMPARE NOSIGN-FIXUP HOSTARITHMETIC CHECKNUM NOOPTIONAL-FILE NOHOSTFD NOQUERY SSRANGE COBIDY ANIM outdd"SYSOUT 121 L" SHARE-OUTDD DATE TIME DATAMAP settings list() noform
The following (OS390AscCBLBSQ.dir) is a listing of the DIR file used when compiling COBOL batch programs for an ASCII-encoded environment. These are programs without "EXEC CICS" and with "EXEC SQL" syntax.
DIALECT"OS390" CHARSET"ASCII" SQL(DBMAN=ODBC, autocommit) SQL(ALLOWNULLCHAR) SQL(PASS) SQL(INIT=PROT) SQL(THREAD=ISOLATE) SQL(BEHAVIOR=MAINFRAME) WARNING"1" IBMCOMP NOTRUNC HOSTNUMMOVE HOSTNUMCOMPARE NOSIGN-FIXUP HOSTARITHMETIC CHECKNUM NOOPTIONAL-FILE NOHOSTFD NOQUERY COBIDY ANIM outdd"SYSOUT 121 L" SHARE-OUTDD DATAMAP SETTING"COL3" list() noform
The following (OS390AscCBLONL.dir) is a listing of the DIR file used when compiling COBOL onlne programs for an ASCII-encoded environment. These are programs with "EXEC CICS" and without "EXEC SQL" syntax.
DIALECT"OS390" CHARSET"ASCII" CICSECM() IBMCOMP NOTRUNC HOSTNUMMOVE HOSTNUMCOMPARE NOSIGN-FIXUP HOSTARITHMETIC CHECKNUM NOQUERY COBIDY ANIM outdd"SYSOUT 121 L" SHARE-OUTDD DATAMAP settings list() noform
The following (OS390AscCBLOSQ.dir) is a listing of the DIR file used when compiling COBOL onlne programs for an ASCII-encoded environment. These are programs with "EXEC CICS" and with "EXEC SQL" syntax.
DIALECT"OS390" CHARSET"ASCII" SQL(DBMAN=ODBC, AUTOCOMMIT) SQL(THREAD=ISOLATE) SQL(INIT=PROT) SQL(BEHAVIOR=MAINFRAME) WARNING"1" CICSECM() IBMCOMP NOTRUNC HOSTNUMMOVE HOSTNUMCOMPARE NOSIGN-FIXUP HOSTARITHMETIC CHECKNUM NOQUERY COBIDY ANIM outdd"SYSOUT 121 L" SHARE-OUTDD DATAMAP settings(COL3) list() noform
This section describes various Micro Focus compiler directives that may be required to control program behavior in the Linux, UNIX or Windows environments in a manner compliant with the compiler options and subsequent execution on the Mainframe System. The following directives will affect the way programs process and format numeric fields. Once the data is stored in a data file on s permanent storage media the format of the records and their content structure must be maintained.
If a program attempts to access the record buffers defined in the FD section of a COBOL program this will result in a 114 error return code if the file has not been opened. Normally, this memory area is not allocated and available until after the file is opened. This causes the 114 error message and can be very time consuming to diagnose. To make the record buffers available before a file open a compiler directive (NOHOSTFD) must be used.
Management (i.e. processing, storage and retrieval) of the various numeric formats has been and continues to be a challenge on the mainframe. When transferring data files that contain the various numeric formats from the Mainframe to a Windows or UNIX platform the challenges are transferred along with the files. Micro Focus (on the Windows and UNIX platforms) offers a number of COBOL compiler directives to help deal with the challenges of managing the various numeric formats.
NUMPROC is a mainframe compiler option. When NUMPROC(MIG) is in effect, the compiler generates code that is similar to that produced by OS/VS COBOL. This option can be especially useful if you migrate OS/VS COBOL programs to IBM Enterprise COBOL for z/OS.
Use NUMPROC(MIG) to aid in migrating OS/VS COBOL programs to Enterprise COBOL. When NUMPROC(MIG) is in effect, the following processing occurs at the mainframe:
|When NUMPROC(MIG) is in effect, the preceding processing occurs at the mainframe|
For Micro Focus the use of a mainframe dialect DIALECT(ENTCOBOL) will set other compiler options for mainframe compatibility. For example IBMCOMP and NOTRUNC directives will be included when a mainframe dialect is use. This will maintain numeric integrity and size for COMP or BINARY fields. Next the use of the directives HOSTNUMMOVE HOSTNUMCOMPARE SIGNFIXUP HOSTARITHMETIC CHECKNUM will emulate the mainframe NUMPROC(NOPFD)
The sequence in which the directives are specified is also important since some directives will set other directives. For example, the DIALECT directive that specifies a mainframe dialect will set CHARSET(EBCDIC). If the desired encoding is ASCII then the CHARSET(ASCII) directive must follow the DIALECT directive.
|An Overview of Compiler Directives/Options for Numeric Processing|
When trying to do an arithmetic operation on a packed field that has a non-numeric value or an invalid sign the operation will ABEND with a S0C7 Program check on the Mainframe System. The operation will ABEND with a 163 RTS error on a Micro Focus System.
On the Mainframe System the NUMPROC(NOPFD) Compiler option may be used to avoid the S0C7 ABEND.
In the Micro Focus environment the SIGNFIXUP Compiler directive may be used in conjunction with not using the CHECKNUM Compiler directive.
Note: the process that causes the packed fields to contain SPACE characters should be addressed. The Compiler options only prevent the ABEND but may produce incorrect results when used in arithmetic processing.
The file extfh.cfg is the file handler configuration file. By default, the file handler looks for it in the current directory. You can use the EXTFH environment variable to specify its path and/or name explicitly. For example: the following will explicitly define the location of the configuration file.
The following shows the content of a sample EXTFH configuration file.
[XFH-DEFAULT] filemaxsize=8 idxformat=8 filepointersize=8 INDEXCOUNT=32 IGNORELOCK=ON READSEMA=OFF USEVSAMKEYDEFS=OFF
This document provides information about how to specify and use the Micro Focus COBOL compiler directives that may be required to control program behavior in the Linux, UNIX or Windows environments in a manner compliant with the compiler options and subsequent execution on the Mainframe System. This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.
In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.
SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact, Comment or Feedback section of this document.
Software Agreement and Disclaimer
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.
SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.
This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.
Note: A SimoTime License is required for the items to be made available on a local system or server.
The following links may be to the current server or to the Internet.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon.
Explore a Scripted Application Build Process for an application that has been moved from a Mainframe System to a Windows system running a Micro Focus sub-system such as Enterprise Server, Application Server or Net Express.
Explore the File Formats and various Numeric Formats being used in a multi-system complex consisting of Mainframe (z/OS), Linux, UNIX or Windows systems.
Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and/or QSAM files.
The following links will require an internet connect.
A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection
Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies and Services. If you have any questions, suggestions, comments or feedback please use the following contact information.
|1.||Send an e-mail to our helpdesk.|
|2.||Our telephone numbers are as follows.|
|2.1.||1 415 763-9430 office-helpdesk|
|2.2.||1 415 827-7045 mobile|
We appreciate hearing from you.
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
|Directives & Configuration Alternatives, the Micro Focus Compiler and External File Handler - EXTFH|
|Copyright © 1987-2022
SimoTime Technologies and Services
All Rights Reserved
|When technology complements business|