HP 3000 Manuals

Descriptions of Directives [ Micro Focus COBOL System Reference, Volume 2 ] MPE/iX 5.0 Documentation


Micro Focus COBOL System Reference, Volume 2

Descriptions of Directives 

Descriptions for all of the Compiler directives 
appear alphabetically.  Each description contains the following entries.

Key 

Syntax:.   

[]
The syntax of the Compiler directives is shown using diagrams called "railroad tracks", in which a directive and its parameters are shown joined by lines indicating the order in which they should be written. You read these diagrams left-to-right. Each diagram starts with '' and ends with '". Sometimes the track forks to show alternatives and then joins up again. The length of a track has no significance. Parameters for directives are shown in quotation marks(" "), although parentheses can be used instead, unless otherwise stated. On UNIX, the equals sign (=) can be used as an alternative. When quotation marks are used the parameter can contain spaces, whereas no spaces are allowed in a parameter surrounded by parentheses. On DOS, Windows and OS/2, if a parameter is specified after a comma, but the file-name is omitted, then the directive must be preceded by a slash (/). Otherwise, the directive will incorrectly be assumed to be a file-name. On UNIX, if you use quotation marks or the equals sign, you must escape them using the backslash character (\). The slash (/) in the syntax diagrams is for use on DOS, Windows and OS/2. It should be ignored for UNIX environments and does not appear in diagrams for UNIX-specific directives. Parameters:. Lists and describes valid parameter(s), if any, for the directive. Default:. Indicates the directive's default setting Phase:. Shows the phase controlled by this directive. One of: Syntax check Generate Both Environment:. Shows the environments where this directive has an effect: All Available for use on all environments DOS, Windows, OS/2 and/or UNIX (in any combination) Available for use on the specified operating systems 16-bit The Generator and run-time system for 16-bit operating systems using segmented addressing. These include Micro Focus COBOL for DOS, Windows and OS/2 and Microsoft COBOL V3.0 and later. 32-bit The Generator and run-time system for 32-bit operating systems using flat addressing. These include Micro Focus COBOL for UNIX and Micro Focus COBOL for 32-bit OS/2. $SET:. Shows whether you can put the directive on a $SET statement in your source program; "Initial" in this entry means it is only allowed on an initial $SET statement. Dependencies:. Shows if the setting of this directive changes the setting of any other directives, or if any other directives affect the setting of this directive. There are a number of different cases, identified under this heading by the following keywords: immediately The change specified is done immediately, as a part of the processing of this directive. This enables you to reset the value by specifying the second directive after the first. Don't do this unless you know what you are doing. at end The change specified takes place when all the directives have been processed. This prevents you from overriding the new value. 01SHUFFLE Changes the addresses of 01-level items in the Working-Storage Section so that they do not cross 64K segment boundaries. Syntax:.
[]
Parameters:. None Default:. NO01SHUFFLE Phase:. Syntax check Environment:. DOS, Windows and OS/2 $SET:. Initial Dependencies:. Set to NO01SHUFFLE at end by NESTCALL Remarks:. If a data item would cross a segment boundary but is smaller than a segment, specifying 01SHUFFLE causes the 01-level item to be moved in memory so that it starts at the segment boundary. The gap left is filled with 01-level items following the moved item that fit. This results in 01-level items not being contiguous in memory when the program is loaded. Use of this directive can cause an increase in the size of the data segment of a program. This directive is not valid for nested programs. 64KPARA Makes the Compiler produce segment-breaking information more often than at each paragraph, for programs containing paragraphs that produce more than 64K of code. Syntax:.
[]
Parameters:. None Default:. NO64KPARA Phase:. Generate Environment:. 16-bit $SET:. Initial Remarks:. Use of this directive lengthens the compilation process slightly but does not affect the code produced. This directive is mandatory for programs which contain paragraphs that produce more than 64K of code. See also:. 64KSECT 64KSECT Makes the Compiler produce segment-breaking information at each paragraph instead of each section, for programs containing sections that produce more than 64K of code. Syntax:.
[]
Parameters:. None Default:. NO64KSECT Phase:. Generate Environment:. 16-bit $SET:. Initial Remarks:. Use of this directive lengthens the compilation process slightly but does not affect the code produced. This directive is mandatory for programs which contain sections that produce more than 64K of code. See also:. 64KPARA ACCEPTREFRESH Specifies whether the data areas associated with Screen Section data are updated from their corresponding Working-Storage Section items before an ACCEPT statement. Syntax:.
[]
Parameters:. None Default:. NOACCEPTREFRESH Phase:. Syntax check Environment:. All $SET:. Initial Dependencies:. Set to ACCEPTREFRESH immediately by MS, IBM-MS or PC1 Remarks:. With ACCEPTREFRESH specified, before an ACCEPT statement that references a Screen Section data item, all data areas associated with Screen Section items subsidiary to the item being accepted are modified as follows: * if the Screen Section item includes the USING phrase, an implicit MOVE is generated from the corresponding Working-Storage Section item * if the Screen Section item includes the TO phrase, the data area is initialized to spaces. With NOACCEPTREFRESH specified, the Screen Section data area is left as it was following the last ACCEPT or DISPLAY. ADDRSV Adds one or more specific reserved words to the reserved word list so that they are recognized as reserved words within the user program. The specified reserved words are added, whatever dialect directives are in force. Syntax:.
[]
Parameters:. rsv-word A reserved word in some dialect of COBOL, but not necessarily in a dialect specified for this compilation Default:. No additional reserved words are created. Phase:. Syntax check Environment:. All $SET:. Initial Remarks:. The specified reserved words are added, whatever dialect directives are in force. This directive does not appear in the list created with the SETTING directive. See also:. SETTING ADDSYN Defines a user-defined reserved word to be synonymous with an existing reserved word. Syntax:. On DOS, Windows and OS/2:
[]
On UNIX:
[]
Parameters:. rsv-word Existing reserved word. user-word Any COBOL word not the same as an existing reserved word. Default:. No reserved word synonyms are created. Phase:. Syntax check Environment:. All $SET:. Initial Remarks:. The equals signs must be surrounded by spaces. This directive does not appear in the list created with the SETTING directive. ADV Causes a control character to be inserted at the start of each line in a print-file. This is for compatibility with mainframe operation. Syntax:.
[]
Parameters:. None Default:. NOADV Phase:. Syntax check Environment:. All $SET:. Any ALIAS Prevents the Compiler from performing certain optimizations that are unsafe when a program uses aliasing. Syntax:.
[]
Parameters:. None Default:. NOALIAS Phase:. Generate Environment:. 16-bit $SET:. Initial Remarks:. Using the SET ADDRESS OF statement you can access the same data in two different ways; that is, in the Working-Storage Section and as an item in the Linkage Section. This technique is known as "aliasing". Any program that uses aliasing must be compiled with ALIAS specified. ALIGN Specifies the memory boundaries on which data items of 01-level or 77-level are aligned. Syntax:.
[]
Parameters:. integer The distance from the start of one 01-level to the start of the next is multiple of this. Can take any value from 1 to 255. Default:. ALIGN"8" Phase:. Syntax check Environment:. All $SET:. Initial Dependencies:. Set to ALIGN"8" immediately by IBMCOMP or NORM. Set to ALIGN"2" immediately by RM or RM"ANSI". Remarks:. Data items of 01-level are aligned on byte boundaries that are multiples of the value given. This can help produce more efficient execution results but does mean more memory might be used. Setting integer to a number that is not a multiple of four could impair the efficiency of the generated code. ALPHASTART Sets the number from which the Compiler counts positions in the collating sequence when compiling the ALPHABET clause. Syntax:.
[]
Parameters:. integer The number to be used. Default:. ALPHASTART"1" Phase:. Syntax check Environment:. All $SET:. Initial Remarks:. For ANSI conformance use ALPHASTART"1". Example:. With ALPHASTART"1", the COBOL statement: ALPHABET MYALPHA IS 66,67 declares an alphabet consisting of "A" and "B" since, counting from 1, these are the 66th and 67th characters in the ASCII collating sequence. With ALPHASTART"0", MYALPHA consists of "B" and "C". ALTER Allows ALTER statements in your program. Syntax:.
[]
Parameters:. None Default:. ALTER Phase:. Syntax check Environment:. All $SET:. Initial Dependencies:. If ASSUME is set, set to NOALTER at end by NOTRICKLE Remarks:. If you know there are no ALTER statements in your program, specifying NOALTER enables the Compiler to produce slightly more efficient code. ANALYZE Makes the Compiler produce extra information so that you can use the analyzer feature of Advanced Animator. Syntax:.
[]
Parameters:. None Default:. NOANALYZE Phase:. Syntax check Environment:. All $SET:. No Dependencies:. ANALYZE sets ANIM immediately Remarks:. This directive is reserved for use with add-on products supplied by Micro Focus. Do not change its setting unless you have an appropriate add-on product. ANIM Makes the Compiler produce extra information so that you can use Animator. Syntax:.
[]
Parameters:. None Default:. NOANIM Phase:. Syntax check Environment:. All $SET:. No Dependencies:. Set to ANIM immediately by WB. Set to ANIM at end by ANALYZE, BROWSE, CSI, GANIM or STRUCT. Set to NOANIM at end by NOINT or RNIM. Remarks:. On DOS, Windows and OS/2, this directive causes an OPT"0" object code file (containing intermediate code) to be created and automatically linked with COBLIB.LIB and either COBAPI.LIB or OS2.LIB depending on the operating system you are compiling on. If you specify your own libraries with a LINKLIB directive, they are used instead. Specifying OPT"0" causes the automatic link step to be omitted. Any other OPT directives are ignored. On OS/2, a .dll file is created using the .def file with root-name the same as the source-file-name. In this case, the DEFFILE directive is enabled causing the Compiler to create a suitable .def file. If you need to use your own .def file, you must specify NODEFFILE. On UNIX the intermediate code is contained in a file with extension .int, and can be animated or run without the need for a link step. On DOS, Windows and OS/2 this facility is also available in an add-on product from Micro Focus. In all cases, a file with extension .idy, is also created. This contains the additional information needed to animate the program. The location of the .idy file is controlled by the COBIDY directive. See also:. COBIDY, DEFFILE, LINKLIB, OPT ANS85 Specifies that words reserved in the ANSI'85 COBOL Standard are to be treated as reserved words, and changes the behavior of certain features to be compatible with that Standard. Syntax:.
[]
Parameters:. SYNTAX Makes the directive affect syntax only and not behavior. Default:. ANS85 Phase:. Syntax check Environment:. All $SET:. Initial Dependencies:. Set to ANS85 at end by VSC2 or SAA Remarks:. This directive causes the following behavior changes: * the I/O status values are those defined in ANSI'85. * the ALPHABETIC class test regards lower case as alphabetic. * control variables in PERFORM operations are initialized in the order specified by ANSI'85. * Move operations to a variable-length group item use the maximum length of the target if the DEPENDING ON item is within the group. APOST Makes the Compiler interpret the figurative constant QUOTE as the single-quote character ('). Syntax:.
[]
Parameters:. None Default:. QUOTE Phase:. Syntax check Environment:. All $SET:. Any Remarks:. The opposite of this directive is the directive QUOTE which causes the double-quote character to be used. AREACHECK Causes the Compiler to treat any token which starts in area A in the Procedure Division as a paragraph or section label, regardless of the preceding tokens. Syntax:.
[]
Parameters:. None Default:. NOAREACHECK Phase:. Syntax check Environment:. All $SET:. Any Remarks:. The AREACHECK directive is Early User Syntax support. You must set the EARLY-RELEASE directive to enable this feature. This directive may change or be removed in a later revision of this product. If AREACHECK is not specified, only tokens which follow a period are treated as possible labels. This directive provides closer compatibility with mainframe error handling, where omitting a period before the label produces a less serious message. It is recommended that such erroneous source code is corrected. See also:. EARLY-RELEASE ARITHMETIC Specifies how arithmetic expressions are to be evaluated. Syntax:.
[]
Parameters:. arith-type The behavior to adopt. Default:. ARITHMETIC"MF" Phase:. Syntax check Environment:. All $SET:. No Remarks:. The possible values of arith-type are: OSVS Truncate according to the rules of OS/VS COBOL. VSC2 Truncate according to the rules of VS COBOL II and COBOL/370. MF Do not truncate intermediate results. With ARITHMETIC"MF" specified, expressions are calculated as accurately as possible because no truncation takes place.


MPE/iX 5.0 Documentation