Micro Focus Compiler Options C

The Micro Focus compiler options are listed here alphabetically, you may browse them, click on the link to go directly to the error code or you may use the search feature of your browser to search for the information.

  • 01SHUFFLE - No segment boundary crossing
  • 64KPARA - Segment breaking
  • 64KSECT - Segment breaking
  • ACCEPTREFRESH - Update associated data on ACCEPT
  • ADDRSV - Add reserved word
  • ADDSYN - Add synonym
  • ADV - Adds control characters to print files
  • ALIAS - Subscripts
  • ALIGN - Data alignment
  • ALPHASTART - Numbering in ALPHABET
  • ALTER - Allow ALTER
  • ANALYZE - * For Analyze
  • ANIM - For Animator
  • ANS85 - ANSI'85
  • APOST - QUOTE = '
  • AREACHECK - AREA A tokens, treat as section/paragraph
  • ARITHMETIC - Arithmetic expressions
  • ASM - Produce object code listing
  • ASMLIST - File for assembly listing
  • ASSIGN - EXTERNAL or DYNAMI C
  • ASSIGN-PRINTER - Printer output
  • ASSUME - Modify behavior of some directives
  • AUTOLOCK - Default locking
  • BADSIGNS - Allow illegal sign nibbles
  • BELL - Bleep when stop
  • BOUND - Bound-check
  • BOUNDOPT - Optimize tables
  • BRIEF - No message texts
  • BROWSE - Create .SBR file
  • BWZSTAR - BLANK WHEN ZERO and PIC *
  • BYTE-MODE-MOVE - Control overlapping moves
  • CALLADIS - * External ACCEPT/DISPLAY handler
  • CALLFH - * External file handler
  • CALLMAP - Reserved for internal use
  • CALLMCS - Reserved for internal use
  • CALLSORT - External file handler
  • CANCELLBR - * Close COPY .LBR file
  • CASE - Case of program-name
  • CHANGE-MESSAGE - Change message severity
  • CHARSET - * ASCII or EBCDIC
  • CHECKDIV - Allow divide by zero
  • CHECKNUM - Check numeric fields
  • CHECKSTACK - Check for stack corruption
  • CHIP - Chip architecture
  • CICS - * Allow CICS
  • CICS-CPY - * Insert COPY "CICS-CPY"
  • CICSOPT - * Optimize BLL cells
  • CMPR2 - Mainframe compatible
  • COBFSTATCONV - * Convert EXTFH file status codes
  • COBIDY - Path for Animator file
  • COBOL370 - IBM COBOL 370
  • COBOLDIR - Use or ignore cobol.dir
  • COMP - Computational subset
  • COMP-5 - COMP-5 behavior
  • COMP-6 - COMP-6 behavior
  • COMS85 - ANSI'85 Comms
  • CONFIRM - Display directives
  • CONSTANT - Define constant
  • CONVERTPTR - Allow redefiniton of pointers
  • CONVERTRET - RETURNING item type
  • CONVSPACE - Convert db spaces in source code to sb
  • COPYEXT - Copyfile extensions
  • COPYLBR - * COPY-library = .LBR file
  • COPYLIST - List COPY files
  • CSI - * Create .CSI information file
  • CURRENCY-SIGN - PIC currency sign
  • CURRENT-DATE - DDMMYY or YY MMDD
  • DATACOMPRESS - Data compression
  • DATALIT - Literals in data seg.
  • DATE - Date for listings
  • DBCHECK - Check Double-Byte Chars.
  • DBCS - Double-Byte Chars.
  • DBCSSOSI - Shift-in, -out
  • DBSPACE - DBCS space
  • DE-EDIT - Num-edited behavior
  • DEFAULTBYTE - Initialize W-Storage
  • DEFAULTCALLS - CALL convention
  • DEFFILE - Produce .DEF file
  • DEFFILETYPE - Specify target for .DEF file
  • DETECT-LOCK - Detect record locks
  • DG - Data General
  • DIRECTIVES - File of directives
  • DIRECTIVES-IN-COMMENTS - Enable directives in comment lines
  • DLL - DLL or EXE
  • DOSVS - IBM DOS/VS COBOL
  • DYNAM - Ignore CANCEL
  • EANIM - For CodeView
  • EARLY-RELEASE - Enable Early User Syntax support
  • ECHO - Display errors
  • ECHOALL - Display full listing
  • EDITOR - Create error file for Editor
  • ENSUITE - * Internal use
  • ERRLIST - Print messages only
  • ERRQ - Pause on error
  • EXPANDDATA - Program compression
  • EXTINDEX - Reserved for internal use. Indexes EXTERNAL
  • FASTLINK - Restrict parameters
  • FASTSORT - Internal use
  • FCDREG - Registers for files
  • FDCLEAR - Clear record buffer after write
  • FILECASE - Internal use
  • FILESHARE - Default locking
  • FILETYPE - Data file format
  • FIXING - Optimizing jumps
  • FLAG - Flag outside the dialect
  • FLAGAS - Show flags as errors etc.
  • FLAGCD - Conflicting directives
  • FLAGMIG - Flag OSVS and VSC2 differences
  • FLAGQ - Pause on flag
  • FLAGINEDIT - Include flags in error file
  • FLAGSTD - Flag ANSI'85 level
  • FLAG-CHIP - Flag chip problems
  • FOLDCALLNAME - Fold call name
  • FOLDCOPYNAME - Fold COPY file names
  • FORM - Page length
  • FP-ROUNDING - Floating point items
  • GANIM - * For Xilerator
  • GNT - * File for object code
  • GNTANLZ - Use with add-on products
  • HIDE-MESSAGE - Set message to hide
  • HOST-NUMCOMPARE - Numeric comparisons
  • HOST-NUMMOVE - Disable RTS error 163 for MOVEs
  • IBM-MS - IBM / Microsoft V1.0
  • IBMCOMP - Word-storage mode
  • IDXFORMAT - Indexed file structure
  • INCLUDE-FILLER - Store FILLER information in .IDY
  • INDD - Transform ACCEPTs to READs
  • INFORETURN - Info msg return value
  • INITCALL - Execute a module
  • INT - * File for int code
  • INTLEVEL - * Portability level
  • IOCONV - READ-INTO/WRITE-FROM behavior
  • JAPANESE - Enable Double-Byte Language Extensions
  • KEEP-INT - Keep .int files
  • KEYCOMPRESS - Key compression
  • LIBRARIAN - Allow -INC
  • LINKCHECK - Check LS items
  • LINKCOUNT - Number of linked items
  • LINKLIB - Link-libraries
  • LIST - File for source listing
  • LISTPATH - Specify the path for list file
  • LISTWIDTH - Page width
  • LITLINK - Literals public
  • LITVAL-SIZE - BY VALUE size
  • LNKALIGN - Assume linkage items are aligned
  • LOCALCOUNT - Internal use
  • LOCKTYPE - Read locked records
  • LOGICOPT - Optimize CBL_ logical calls
  • MAKESYN - Make synonymous
  • MAPNAME - IBM prog-names
  • MASM - For Microsoft MASM
  • MAX-ERROR - Limit number of Compiler errors
  • MFCOMMENT - Alternate-format comments
  • MF - Level of MF
  • MF00 - Object Orientation syntax
  • MFSCCS - Look for source files in a SCCS system
  • MODEL - Model type
  • MS - Microsoft COBOL V1 or V2
  • NATIVE - Collating sequence
  • NCHAR - Enable Double-Byte Language Extensions
  • NESTCALL - Allow nested progs
  • NETLOCALSTORAGE - Internal use
  • NLS - Enable National Language Support
  • OBJ - File for object code
  • OBJLITE - Assembler-like code
  • ODOOSVS - Evaluate ODO like OS/VS COBOL does
  • ODOSLIDE - Variable length table
  • OLDBLANKLINE - Change behavior of BLANK LINE
  • OLDCOPY - ANSI'68 COPY
  • OLDFILEIO - Reserved
  • OLDINDEX - Indexes = subscripts
  • OLDNEXTSENTENCE - Change behavior of NEXT SENTENCE
  • OLDREADINTO - Change behavior of READ ... INTO statements
  • OLDSTRMIX - Allow PIC X and PIC N in statements
  • OLDSTRSUB - Change evaluation of subscripts
  • OMF - OBJ or GNT
  • OPT - Optimization level
  • OPTIONAL-FILE - All files optional
  • OPTSIZE - Optimize for size
  • OPTSPEED - Optimize for speed
  • OSEXT - Source file-name ext
  • OSVS - IBM OS/VS COBOL
  • OUTDD - Transform DISPLAYs to WRITEs
  • OVERRIDE - Change
  • PANVALET - Allow ++INCLUDE
  • PARAMCOUNTCHECK - Omit parameters
  • PARAS - Create list of paragraphs and sections
  • PC1 - IBM / Microsoft V1.0
  • PERFORMOPT - Optimize PERFORM of empty paragraph
  • PERFORM-TYPE - Returns from PERFORM
  • PREPLIST - Show original and preprocessed source
  • PREPROCESS - * Source from preprocessor
  • PRINT - File for source listing
  • PRINT-EXT - Specify print-file extension
  • PROFILE - Generate code for Profiler
  • PROGID-COMMENT - Comment in PROG-ID
  • PROTMODE - Produce protect mode only code
  • PROTECT-LINKAGE - Protects linkage items
  • PUBLICENTRY - Declare .OBJ entry points as public
  • QUAL - Allow qualification
  • QUALPROC - Allow qualification
  • QUERY - Pause if copyfile missing
  • QUOTE - QUOTE = "
  • RAWLIST - list with no variable information
  • RDEFPTR - COMP redefinitions of POINTER
  • RDW - Read length of variable-length record
  • REALOVL - Overlaying from disk
  • RECMODE - Fixed or var length
  • REF - Addresses in listings
  • REFNO - Compiler version-number in listings
  • REGPARM - Parameter passing
  • REMOVE - De-reserve
  • REPORT-LINE - Length of report writer lines
  • RESEQ - Generate line numbers
  • RETRYLOCK - Re-try locked record
  • REWRITE-LS - REWRITE on LINE SEQUENTIAL files
  • RM - Ryan-McFarland
  • RNIM - Animate, don't compile
  • RTNCODE-SIZE - RETURN-CODE size
  • SAA - Systems Application Architecture
  • SEG - Segmentation
  • SEGCROSS - Params on segments
  • SEGSIZE - Automatic segmentation
  • SEQCHK - Check line numbers
  • SEQUENTIAL - Variants of SEQUENTIAL organization
  • SETTING - Print directives
  • SHOW-DIR - Print directives files
  • SHOWSHUFFLE - Show 01SHUFFLE results
  • SIGN - Included signs
  • SIGNCOMPARE - EBCDIC numeric comparisons
  • SMALLDD - Params in segments
  • SOURCE-EXT - Source ext for CodeView
  • SOURCEASM - Source in assembly listing
  • SOURCEFORMAT - Allow free format code
  • SPZERO - Space = zero in nums
  • SQL - Allow EXEC SQL
  • SQLACCESS - Name of access plan
  • SQLBIND - Name of bind file
  • SQLBLOCK - Record blocking
  • SQLCOMMIT - Placement of generated commits
  • SQLCTRACE - List calls to precompiler services
  • SQLDB - Name of database
  • SQLDB2 - Mainframe compatibility
  • SQLECSPP - * Host compatibility
  • SQLFORMAT - Define date format
  • SQLINIT - Initialize &log on
  • SQLISOLATION - Isolation level
  • SQLNOT - Specify NOT character (ª)
  • SQLPASS - Give password
  • SQLPRE - Animate SQL programs
  • SQLPROT - Protect database
  • SQLRP - Compile on client workstation
  • SQLSTDLVL - Standards level of database manager
  • STDERR - Write messages to STDERR
  • STICKY-LINKAGE - Keep params linked
  • STICKY-PERFORM - Behavior of PERFORM
  • STRUCT - * For Structure Animator
  • SUPFF - No page-headings
  • SYMBSTART - Numbering in SYMBOLIC
  • SYSIN - Map I-O to SYSIN and SYSOUT
  • TABLESEGCROSS - Check for crossing of seg boundaries
  • TARGET - Chip-specific instrs.
  • TERMPAGE - Pad final page of report
  • TIME - Put time on listings
  • TRACE - Turn on READY TRACE
  • TRICKLE - Restrict PERFORM
  • TRICKLECHECK - Flag trickling
  • TRUNC - Truncation of binary
  • TRUNCCOPY - Truncate copyfile names
  • USE - File of directives
  • VERBOSE - Display Compiler messages
  • VSC2 - IBM VS COBOL II
  • WARNING - Level of message to output
  • WB - * Interface to other products
  • WB2 - * Internal use
  • WB3 - * Internal use
  • WRITELOCK - Default locking
  • WRITETHROUGH - * Unbuffered writes
  • XNIM - Compile and animate
  • XOPEN - X/Open
  • XREF - Produce cross-ref listing
  • ZEROLENGTHFALSE - Zero-length tests
  • ZEROSEQ - Zeros in line numbers
  • ZWB - Numeric comparisons

  • OBJ
    Specifies the name of the object code file.

    > >-|---|-|-----OBJ--"file-name"|----------- > < |-/-| |-NO--OBJ-------------|

    Parameters:
    file-name A full file specification.

    Properties:
    Default: OBJ".obj" (with OMF"OBJ") OBJ".gnt" (with OMF"GNT")
    Phase: Generate
    Environment: 16-bit, 32-bit OS/2
    $SET: Any

    Dependencies: OBJ and GNT are synonymous. Setting NOOBJ also sets NOGNT.

    Remarks: With NOOBJ, no object code file is produced. If this directive is not specified, the name of the object code file is the same as the source file with an extension of .obj.

    Setting this directive does not imply OMF"OBJ". To ensure that your .obj file contains .obj format object code you must make sure that OMF"OBJ" is also specified.

    In the 16-bit generator the OBJ directive also changes the name of the main entry point of a program unless your program contains a PROGRAM-ID phrase. So, if you want to change the name of your .obj file, but retain the same entry point name, use the PROGRAM-ID phrase.

    Example: Compiling the program tictac.cbl with no OBJ directive produces an object module called tictac.obj with main entry point tictac. Compiling with the directive OBJ"tictac2.obj" produces an object module called tictac2.obj with main entry point tictac2.

    In the 32-bit generator for OS/2, this directive does not change the entry-point name. If you are developing applications for both 16-bit and 32-bit targets, and require to use the OBJ directive, use the PROGRAM-ID phrase to ensure portability.


    OBJLITE
    Produces a version of your program that functions very much like an assembler subroutine.

    > >-|---|-|----|--OBJLITE------------------- > < |-/-| |-NO-|

    Properties:
    Default: NOOBJLITE
    Phase: Generate
    Environment: 16-bit
    $SET: Initial

    Dependencies: Set to NOOBJLITE at end by OPT"0" or OMF"GNT".
    OBJLITE sets LITLINK at end.

    Remarks: This directive affects only .obj files.

    Calling a program that was generated using OBJLITE is much faster than calling a normal program.

    The following are limitations for programs generated using OBJLITE:
    • It cannot be compiled with PERFORM-TYPE"OSVS"
    • It cannot use COBOL files, but can use byte-stream files
    • It cannot use any call-by-number routines
    • It cannot have more than 64K of data
    • It cannot be a main program
    • It must have any parameters to CALL statements in its Working-Storage Section or Local-Storage Section. Any subscripts used in these parameters are subject to the same restriction.
    • It cannot use the IS INITIAL clause
    • It does not always have its Data Division initialized by a cancel operation.


    ODOOSVS
    Makes the evaluation of OCCURS DEPENDING ON items more compatible with the OS/VS COBOL compiler.

    > >-|---|-|----|--ODOOSVS------------------- > < |-/-| |-NO-|

    Properties:
    Default: NOODOOSVS
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Dependencies: ODOOSVS sets ODOSLIDE at end.

    Remarks: When ODOOSVS is specified, the length of variable-length groups and the address of items following variable-length tables is evaluated at the time when the OCCURS DEPENDING ON item is modified, rather than at the time when the variable-length group or sliding data item is referenced.


    ODOSLIDE
    Moves data items that follow a variable-length table in the same record as the table's length changes.

    > >-|---|-|----|--ODOSLIDE------------------ > < |-/-| |-NO-|

    Properties:
    Default: NOODOSLIDE
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Dependencies: Set to ODOSLIDE at end by ODOOSVS.

    Remarks: This affects data items that appear after a variable-length table in the same record; that is, after an item with an OCCURS DEPENDING clause, but not subordinate to it.

    With ODOSLIDE, these items always immediately follow the table, whatever its current size; this means their addresses change as the table's size changes. With NOODOSLIDE, these items have fixed addresses, and begin after the end of the space allocated for the table at its maximum length.


    OLDBLANKLLINE
    Changes the behavior of the BLANK LINE clause in the Screen Section.

    > >-|---|-|----|--OLDBLANKLINE-------------- > < |-/-| |-NO-|

    Properties:
    Default: NOOLDBLANKLINE
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: When OLDBLANKLINE is specified, the BLANK LINE clause behaves exactly the same as ERASE EOL; that is all characters to the right of the cursor are deleted.

    With NOOLDBLANKLINE specified, the BLANK LINE clause causes the whole line to be deleted.


    OLDCOPY
    Makes COPY statements follow the ANSI'68 Standard.

    > >-|---|-|----|--OLDCOPY------------------- > < |-/-| |-NO-|

    Properties:
    Default: NOOLDCOPY
    Phase: Syntax check
    Environment: All
    $SET: Any


    OLDFILEIO
    This directive is reserved for internal use by the system. Because it might appear in the list of settings, it is included here for completeness. It is not intended for users' applications, and its setting should not be changed.

    > >-|---|-|----|--OLDFILEIO----------------- > < |-/-| |-NO-|

    Properties:
    Default: NOOLDFILEIO
    Phase: Syntax check
    Environment: All
    $SET: Initial


    OLDINDEX
    Causes indexes to be compiled as subscripts.

    > >-|---|-|----|--OLDINDEX------------------ > < |-/-| |-NO-|

    Properties:
    Default: NOOLDINDEX
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Dependencies: Set to NOOLDINDEX immediately by NORM.
    Set to OLDINDEX immediately by RM and RM"ANSI".

    Remarks: This directive is for compatibility with earlier products.


    OLDNEXTSENTENCE
    Changes the behavior of the NEXT SENTENCE statement.

    > >-|---|-|----|--OLDNEXTSENTENCE----------- > < |-/-| |-NO-|

    Properties:
    Default: NOOLDNEXTSENTENCE
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: When OLDNEXTSENTENCE is specified, the NEXT SENTENCE statement behaves like a CONTINUE statement.

    For more details on CONTINUE and NEXT SENTENCE, see your Language Reference.

    See also:
    CONTINUE statement


    OLDREADINTO
    Changes the behavior of the READ ... INTO statement.

    > >-|---|-|----|--OLDREADINTO--------------- > < |-/-| |-NO-|

    Properties:
    Default: NOOLDREADINTO
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: When OLDREADINTO is specified, the IMPLICIT move from the file's record area to the data item specified in the INTO phrase is executed even when the READ is not successful. If NOOLDREADINTO is specified, the MOVE only happens if the READ is successful.


    OLDSTRMIX
    Allows PIC X and PIC N fields to be specified in the same STRING, UNSTRING or INSPECT statement.

    > >-|---|-|----|--OLDSTRMIX----------------- > < |-/-| |-NO-|

    Properties:
    Default: NOOLDSTRMIX
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: This directive is provided for forward compatibility only.

    We recommend that you do not use it as it can lead to unexpected results and the corruption of double-byte data.


    OLDSTRSUB
    Changes the point at which subscripts are evaluated during STRING, UNSTRING and INSPECT statements.

    > >-|---|-|----|--OLDSTRSUB----------------- > < |-/-| |-NO-|

    Properties:
    Default: NOOLDSTRSUB
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: When OLDSTRSUB is specified, subscripts are evaluated after implicit move operations with STRING, UNSTRING or INSPECT statements.

    Since the resultant run-time behavior is not ANSI'85 compliant, this directive should be used only to maintain compatibility with versions of Micro Focus COBOL/2 and LEVEL II COBOL.


    OMF
    Specifies which format of object code to produce.

    > >-|---|--OMF--"code"---------------------- > < |-/-|

    Parameters:
    code Either OBJ or GNT.

    Properties:
    Default: OMF"OBJ"
    Phase: Generate
    Environment: 16-bit
    $SET: No

    Dependencies: Set to OMF"OBJ" at end by DEFFILE, EANIM, FASTLINK or LITLINK.
    OMF"GNT" sets NOOBJLITE and NOMASM at end.
    If OPT"0", OMF"GNT" sets OPT"1" at end.

    Remarks: The possible values of < code > are:

    • OBJ - Produce .obj format.
    • GNT - Produce .gnt code.

    Generated (.gnt) code is the Micro Focus standard format for native code. It is not available in the Micro Focus COBOL system for DOS, Windows and OS/2 without Toolset, Workbench or similar add-on products from Micro Focus. It is relocatable, dynamically linked and managed by an advanced version of the shared run-time system. It is not suitable for input to the Linker.


    OPT
    Specifies the level of optimization of the code produced in the .obj file.

    > >-|---|--OPT--"integer"------------------- > < |-/-|

    Parameters:
    integer 0, 1, or 2.

    Properties:
    Default: OPT"2"
    Phase: Generate
    Environment: 16-bit
    $SET: Any

    Dependencies: If OPT"0", set to OPT"1" at end by EANIM, GANIM or OMF"GNT".
    OPT"0" sets NOOBJLITE and NODATALIT at end.

    Remarks: The possible values of (integer) are:

    • 0 - Intermediate code as produced by the first pass of the Compiler. This is generally smaller than native code, but is slower for processor-bound operations. Programs compiled with OPT"0" cannot be linked with the static linked run-time system, LCOBOL.
    • 1 - Standard generated native code.
    • 2 - Optimized generated code. Optimization does not change the logic of your program, but there might be incidental effects because some statements might have no associated machine code and statement order is not preserved. For example, PERFORM TIMES of an empty paragraph causes no code to be generated, so this construct cannot be used to form a delay loop.


    OPTIONAL-FILE
    Makes the Compiler treat all files opened for I-O or EXTEND as optional.

    > >-|---|-|----|--OPTIONAL-FILE------------- > < |-/-| |-NO-|

    Properties:
    Default: OPTIONAL-FILE
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Dependencies: Set to OPTIONAL-FILE immediately by NORM.
    Set to NOOPTIONAL-FILE immediately by RM or RM"ANSI".

    Remarks: Under ANSI'85 Standard COBOL, a file is treated as optional only if it has the OPTIONAL phrase in its SELECT statement. For compatibility with the ANSI'85 Standard you must specify the NOOPTIONAL-FILE directive.


    OPTSIZE
    Makes the Compiler treat the size of the object program as a higher priority than its speed, within the constraints imposed by other directives.

    > >-|---|--OPTSIZE-------------------------- > < |-/-|

    Properties:
    Default: OPTSIZE
    Phase: Generate
    Environment: 16-bit
    $SET: Initial

    Remarks: The directives OPTSPEED and OPTSIZE are alternates. Hence, if you don't want OPTSIZE specify OPTSPEED.


    OPTSPEED
    Makes the Compiler treat the speed of the object program as a higher priority than its size, within the constraints imposed by other directives.

    > >-|---|--OPTSPEED------------------------- > < |-/-|

    Properties:
    Default: OPTSIZE
    Phase: Generate
    Environment: 16-bit
    $SET: Initial

    Remarks: The directives OPTSPEED and OPTSIZE are alternates. Hence, if you don't want OPTSPEED specify OPTSIZE.

    Other directives such as TRUNC also affect the speed of the program.


    OSEXT
    Tells the Compiler what extension to expect by default on the names of source files.

    > >-|---|--OSEXT--"ext"--------------------- > < |-/-|

    Parameters:
    ext The extension.

    Properties:
    Default: OSEXT"cbl" (on DOS, Windows and OS/2) OSEXT"" (on UNIX)
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: The extension is added if the source file-name used in the command or prompt does not have an extension or a trailing period. This happens only if the directive is specified in cobol.dir.

    It is also used if you specify a source file-name with no extension or trailing period in a COPY statement. The Compiler searches first for the file with the name given by adding the extension specified in this directive. If none is found, it adds the extension(s) specified by the COPYEXT directive and looks again. If that is not found it searches for the file with no extension.

    Specifying a null extension (OSEXT"") indicates that the file-name has no extension.

    See also:
    COPYEXT Compiler directive


    OSVS
    Specifies that words reserved in IBM OS/VS COBOL are to be treated as reserved words.

    > >-|---|-|----|--OSVS---------------------- > < |-/-| |-NO-|

    Properties:
    Default: NOOSVS
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Dependencies: OSVS sets NODOSVS immediately.

    See also:
    DOSVS Compiler directive


    OUTDD
    Causes DISPLAY and EXHIBIT statements to be written to a specified output file. Also causes the output from TRACE to be sent to the specified output file.

    > >-|---|-|-------OUTDD--"fname rsize rtype ctype"-| > < |-/-| |-------OUTDD--"fname rsize rtype"-------| |-------OUTDD--"fname rsize"-------------| |-------OUTDD--"fname"-------------------| ||----|-OUTDD----------------------------| |-NO-|

    Parameters:

    • fname - Name of file to be written for the specified DISPLAY statements, EXHIBIT statements and for the TRACE output. When this parameter is not specified the name used is SYSOUT.
    • rsize - Size of the data records in the file. When this parameter is not specified the size used is 132.
    • rtype - Either L for Line Sequential or R for Record Sequential. When this parameter is not specified, L is used.
    • ctype - Either A for ASCII or E for EBCDIC. When this parameter is not specified, A is used.
      E only has effect when the CHARSET(EBCDIC) directive is used.

    Properties:
    Default: NOOUTDD
    Phase: Syntax check
    Environment: DOS, Windows and OS/2
    $SET: Initial

    Dependencies: OUTDD sets NOSYSIN immediately
    Set to NOOUTDD immediately by SYSIN

    Remarks: When OUTDD is specified, all format 1 DISPLAY statements which either have no UPON option or specify UPON SYSOUT, and all EXHIBIT statements and the output from TRACE are transformed into WRITE statements, writing to a file with the specified external file-name.

    The file-name can be mapped onto physical file-names in the same way as other files with external file-names; that is, by using environment variables or the External File Mapper, MFExtmap.

    The default settings for this directive are the same as those that would be used for this type of DISPLAY and EXHIBIT statement and TRACE output, when the SYSIN directive is used.

    See also:
    DISPLAY statement
    EXHIBIT statement
    INDD directive
    SYSIN directive
    TRACE directive


    OVERRIDE
    Replaces a reserved word by a new one.

    On DOS, Windows and OS/2: |------------------------| . | > >-|---|-OVERRIDE--"rsv-word" = "user-word"-- > < |-/-| On UNIX: |---------------------------| . | > >-|---|-OVERRIDE--"(rsv-word) == (user-word)"-- > < |-/-|

    Parameters:

    • rsv-word - Existing reserved word.
    • user-word - Any COBOL word not the same as an existing reserved word.

    Properties:
    Default: No change of reserved words takes place.
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Remarks: This directive equates an existing reserved word to the specified user-defined word, so that, in the program, (user-word) is treated as a reserved word, and (rsv-word) can be used as a user-defined word.

    The equals signs must be surrounded by spaces. If the parameters are repeated they must be separated by spaces.

    This directive does not appear in the list created with the SETTING directive.


    PANVALET
    Allows ++INCLUDE statements in your program.

    > >-|---|-|----|--PANVALET------------------ > < |-/-| |-NO-|

    Properties:
    Default: NOPANVALET
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: The ++INCLUDE statement specifies a file for inclusion in the source program. The string ++INCLUDE must be written as a contiguous sequence of upper-case characters starting in area-A or area-B, followed by one or more spaces, and then, on the same line, by the name of a file containing COBOL source. This file is included in the program at the point where the ++INCLUDE statement appears.

    If you specify PANVALET and LIBRARIAN together, a warning message is given advising that the compiled program might not be mainframe-compatible.


    PARAMCOUNTCHECK
    Enables the program to be called with fewer parameters than are specified in the relevant entry-point's USING clause.

    > >-|---|-|----|--PARAMCOUNTCHECK----------- > < |-/-| |-NO-|

    Properties:
    Default: NOPARAMCOUNTCHECK (with OMF"OBJ") PARAMCOUNTCHECK (with OMF"GNT")
    Phase: Generate
    Environment: 16-bit
    $SET: Initial

    Remarks: You must use this directive if any of the following apply:

    • The program is called with a variable number of parameters, or
    • The program contains a Linkage Section, and is to be used both as a main program run from the command line and as a subprogram called from another program
    • The program is compiled with STICKY-LINKAGE"2" specified

    Otherwise the program can be compiled with NOPARAMCOUNTCHECK for efficiency. A program to be called from a language other than COBOL must be compiled with NOPARAMCOUNTCHECK.

    Unless you specify the LINKCHECK directive, trying to reference a Linkage Section item that does not exist might result in a system hang on DOS, or a protection violation on OS/2.

    See also:
    LINKCHECK Compiler directive
    STICKY-LINKAGE Compiler directive


    PARAS
    Creates a list of paragraphs and sections in a program.

    > >-|---|-|----|--PARAS--------------------- > < |-/-| |-NO-|

    Properties:
    Default: NOPARAS
    Phase: Generate
    Environment: 16-bit
    $SET: Initial

    Remarks: Specifying PARAS causes the generated code addresses of all paragraphs and sections to be produced. This list is placed in the listing file specified by the ASMLIST directive. The assembler listing that is normally in this file is suppressed if PARAS is specified.

    The ANIM directive must also be specified for the PARAS directive to work.

    See also:
    ASMLIST Compiler directive
    ANIM Compiler directive


    PC1
    Specifies that words reserved in IBM COBOL 1.00 are to be regarded as reserved words, and changes the behavior of certain features to be compatible with that system.

    > >-|---|-|----|--PC1----------------------- > < |-/-| |-NO-|

    Properties:
    Default: NOPC1
    Phase: Syntax check
    Environment: All

    $SET: Initial

    Dependencies: PC1 sets DEFAULTBYTE"0" and ACCEPTREFRESH immediately.

    Remarks: This directive is synonymous with the IBM-MS and MS"1" directives.


    PERFORM-TYPE
    Specifies the behavior of return jumps from nested PERFORM statements.

    > >-|---|--PERFORM-TYPE--"dialect"---------- > < |-/-|

    Parameters:
    dialect MF, OSVS, or RM.

    Properties:
    Default: PERFORM-TYPE"MF"
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Dependencies: PERFORM-TYPE"OSVS" sets TRICKLE at end.

    Remarks: The possible values of are:

    • MF - Only the exit point of the innermost PERFORM currently being executed is recognized and its return jump taken.
    • OSVS - The exit point of any PERFORM statement currently being executed is recognized if reached; the return jump taken is the first reached. PERFORM statements with the same exit point can be nested to a depth of two (one inner and one outer). If they are nested deeper, they do not return correctly. The end of a section is regarded as the same point as the end of its last paragraph. PERFORM-TYPE"OSVS" provides compatibility with the mainframe behavior of OS/VS COBOL, DOS/VS COBOL, VS COBOL II and COBOL/370.
    • RM - The exit point of any PERFORM statement currently being executed is recognized if reached; the return jump taken is the first reached. PERFORM statements with the same exit point cannot be nested; if they are they do not return correctly. The end of a section is regarded as a separate point from the end of its last paragraph.

    See also:
    STICKY-PERFORM Compiler directive


    PREPLIST
    Causes the list file produced during a compilation to show both the original and modified source created by the preprocessor as well as to show all data passed to the Compiler by a preprocessor.

    > >-|---|-|----|--PREPLIST------------------ > < |-/-| |-NO-|

    Properties:
    Default: NOPREPLIST
    Phase: Syntax check
    Environment: All
    $SET: No

    Remarks: This directive is provided as a debugging aid to preprocessor writers.

    This directive only affects what the listing file, if produced, contains. It does not determine if a listing file is produced, or the name of the file.


    PREPROCESSP
    Makes the Compiler take the source program from a preprocessor instead of a source file.

    > >-|---|-|----|-PREPROCESS-|-"name"|------||------|| > < |-/-| | |-P----------| |-dirs-||-ENDP-|| |-NO-|-PREPROCESS-|-----------------------| |-P----------|

    Parameters:

    • name - The preprocessor to use.
    • dirs - Directives to be passed directly to the preprocessor.

    Properties:
    Default: NOPREPROCESS
    Phase: Syntax check
    Environment: All
    $SET: On very first source line only No (with NOPREPROCESS)

    Remarks: This directive informs the Compiler that an integrated preprocessor is to be used.

    For more information on using this directive, see the chapter Integrated Preprocessor Interface in your COBOL System Reference.


    PRINT
    Specifies the destination of the source listing file.

    > >-|---|-|-------PRINT-|-"destination"-||-- > < |-/-| | |-()------------|| ||----|-PRINT------------------| |-NO-|

    Parameters:
    destination A full file specification, or a device-name.

    Properties:
    Default: NOPRINT
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: PRINT is synonymous with LIST. All rules that apply to LIST also apply to PRINT.

    See also:
    LIST Compiler directive


    PRINT-EXT
    Specifies the extension to be added to the file-name associated with the ASSIGN TO PRINTER clause.

    > >-|---|--PRINT-EXT--"extension"----------- > < |-/-|

    Parameters:
    extension The extension to be added.

    Properties:
    Default: No extension is added
    Phase: Syntax check
    Environment: All
    $SET: Any

    Remarks: This directive is ignored unless ASSIGN-PRINTER() is specified with no file-name.

    See also:
    ASSIGN-PRINTER Compiler directive


    PROFILE
    Includes code in your program to produce detailed performance statistics each time you run the program.

    > >-|---|-|----|--PROFILE------------------- > < |-/-| |-NO-|

    Properties:
    Default: NOPROFILE
    Phase: Syntax check
    Environment: All
    $SET: No


    PROGID-COMMENT
    Allows comments following the Program-ID in the PROGRAM-ID paragraph.

    > >-|---|-|----|--PROGID-COMMENT------------ > < |-/-| |-NO-|

    Properties:
    Default: NOPROGID-COMMENT
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Remarks: This directive is provided for compatibility with earlier versions of this system.


    PROTMODE
    Causes the Compiler to optimize certain statements in such a way that the resulting object code can only be run in protect mode environments.

    > >-|---|-|----|--PROTMODE------------------ > < |-/-| |-NO-|

    Properties:
    Default: NOPROTMODE
    Phase: Generate
    Environment: 16-bit (If DOS, only under XM)
    $SET: Initial

    Remarks: The statements optimized are SET ADDRESS OF, SET ... UP and SET ... DOWN.

    Code created with PROTMODE can only be run under DOS with XM, OS/2, or Windows. If you try to run it under DOS without XM, a run-time error occurs.

    See also:
    SET statement


    PROTECT-LINKAGE
    Extends the standard COBOL semantics so that the lengths of parameters can differ between the calling and the called program.

    Normally, the result of ignoring the constraints would give undefined results, possibly including severe errors such as protection violations or memory access faults.

    > >-|---|-|----|--PROTECT-LINKAGE----------- > < |-/-| |-NO-|

    Properties:
    Default: NOPROTECT-LINKAGE
    Phase: Syntax check
    Environment: All
    $SET: Initial

    Remarks: The ANSI COBOL standard states in the general rules for each parameter passed by the CALL statement that "The description of the data item in the called program must describe the same number of character positions as described by the description if the corresponding data item in the calling program.". This restriction must be observed when using this COBOL system unless the program is compiled with the PROTECT-LINKAGE directive.

    The restriction is lifted when the PROTECT-LINKAGE directive is set. The called program only uses mismatched parameters as sending items in a statement and does not use them as receiving items.

    Any character positions in a parameter for which there is no correspondence in the called and calling programs is a mismatched character. The contents of any mismatched character is undefined for a parameter used as a sending item in a called program.

    Using this directive affects the performance of your application.

    Example: Calling program: ... 03 x1 pic x. 03 x2 pic x(100). procedure division. ... call subprog using x1 ... Subprogram: working-storage section. 01 y1 pic x(1000). linkage section. 01 z1 pic x(1000). procedure division using z1. move z1 to y1 * This operation works, and transfers the contents of x1. It * also transfers any data following x1 in the calling program, * up to 1000 bytes or the end of allocated memory, whichever * occurs first. If less than 1000 bytes is transferred, the * remainder of y1 is space filled. move y1 to z1. * This operation is not protected and fails, either by * corrupting data beyond x1 in the calling program, or * trying to write beyond allocated memory, which might * result in a protection violation.
    PUBLICENTRY
    Specifies whether entry-points in .obj files are to be declared as public.

    > >-|---|-|----|--PUBLICENTRY--------------- > < |-/-| |-NO-|

    Properties:
    Default: PUBLICENTRY
    Phase: Generate
    Environment: 16-bit
    $SET: Initial

    Remarks: NOPUBLICENTRY specifies that entry-points in .obj files are not to be declared as public. This is useful if you want to link two or more .obj files which have common entry-point names.

    This directive affects only .obj files.