Directives & Configuration Alternatives
Micro Focus Compiler & File Handler
|When technology complements business||Copyright © 1987-2013 SimoTime Enterprises All Rights Reserved|
|The SimoTime Home Page|
This document provides information about how to specify and use the 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. 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.
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 COBIDY ANIM outdd"SYSOUT 121 L" SHARE-OUTDD 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(DB=CUSTACC1) SQL(PASS) SQL(INIT=PROT) SQL(THREAD=ISOLATE) SQL(TARGETDB=DB2) 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 for Numeric 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
The purpose of this document is 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 document and the links to other documents are intended to provide a choice of alternatives.
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. 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 Enterprises.
SimoTime Enterprises 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 Enterprises 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.
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 Micro Focus Files 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 via Internet Connect for access to white papers, program examples and product information.
Explore The Micro Focus Web Site via Internet Connect for more information about products and services available from Micro Focus.
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 copyrighted and maintained by SimoTime Enterprises.
If you have any questions, suggestions, comments or feedback please call or send an e-mail to: firstname.lastname@example.org
We appreciate hearing from you.
Founded in 1987, SimoTime Enterprises 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. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. 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.
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|
|Copyright © 1987-2013 SimoTime Enterprises All Rights Reserved|
|When technology complements business|