HP 3000 Manuals

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


Micro Focus COBOL System Reference, Volume 2

Descriptions of Directives (cont) 

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.

Syntax:.   

[]
Parameters:. None Default:. NOPROTMODE Phase:. Generate Environment:. 16-bit (Only under XM on DOS) $SET:. Initial Remarks:. The statements optimized are SET ADDRESS OF, SET...UP and SET... DOWN. Code that is created with PROTMODE can only be run under DOS with XM, OS/2, or Windows. If you attempt to run it under DOS without XM, a run-time error occurs. See also:. SET statement PUBLICENTRY Specifies whether entry-points in .obj files are to be declared as public. Syntax:.
[]
Parameters:. None 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. QUAL Allows qualified data-names and procedure-names in your program. Syntax:.
[]
Parameters:. None Default:. QUAL Phase:. Syntax check Environment:. All $SET:. Any Remarks:. If you have no qualified data-names or procedure-names in your source code, you can specify NOQUAL. This improves compilation speed. See also:. QUALPROC QUALPROC Allows qualified procedure-names in your program. Syntax:.
[]
Parameters:. None Default:. QUALPROC Phase:. Syntax check Environment:. All $SET:. Any Remarks:. If you have no qualified procedure-names in your source code, you can specify NOQUALPROC. This improves compilation speed. If you have qualified data-names but no qualified procedure-names, you should specify QUAL and NOQUALPROC. See also:. QUAL QUERY Makes the Compiler ask, each time it is unable to find a COPY-file, what it should do. Syntax:.
[]
Parameters:. None Default:. QUERY (DOS, Windows and OS/2) NOQUERY (UNIX) Phase:. Syntax check Environment:. All $SET:. Any Remarks:. With QUERY, if the Compiler cannot find a COPY-file it asks you whether to terminate the compilation, try the search again, produce an error message and continue, or try again with an alternative path specified by you. With NOQUERY, the Compiler simply produces an error message and continues. QUOTE Makes the Compiler interpret the figurative constant QUOTE as the double-quote character ("). Syntax:.
[]
Parameters:. None Default:. QUOTE Phase:. Syntax check Environment:. All $SET:. Any Remarks:. The opposite of this directive is the directive APOST which causes the single-quote character to be used. RAWLIST Prevents changeable information, such as page headers, date, time, Compiler release level, from being included in any listing file produced. Syntax:.
[]
Parameters:. None Default:. NORAWLIST Phase:. Syntax check Environment:. All $SET:. Any Remarks:. Specifying this directive does not affect whether a listing is produced or the name of the listing file. See also:. LIST RDEFPTR Causes COMP redefinitions of POINTER data items to be stored in machine-specific format; that is, treated as COMP-5 data items. Syntax:.
[]
Parameters:. None Default:. NORDEFPTR Phase:. Syntax check Environment:. All $SET:. Any Remarks:. The RDEFPTR 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. IBM VS COBOL II and COBOL/370 let you use the REDEFINES clause on a POINTER data item to redefine it as a PIC 9(9) COMP data item. You can then perform arithmetic operations on this item, giving the program the ability to shift the address referred to by a pointer up or down. If RDEFPTR is specified, COMP redefinitions of POINTER data items are held in machine-specific format; that is, they are treated as COMP-5 data items. This means that arithmetic carried out on the redefinition should have the expected effect on the pointer, though unexpected behavior might occur if the arithmetic causes the pointer to cross the boundary of a data segment. See also:. EARLY-RELEASE RDW Enables you to find out the length of a record that has just been read from a variable-length sequential file. Syntax:.
[]
Parameters:. None Default:. NORDW Phase:. Syntax check Environment:. All $SET:. Any Remarks:. If you specify the RDW directive, a four-byte record-length field is allocated immediately before the record area for the file. After a READ, the length (in binary) of the record just read is put in the first two bytes of this record area. The length returned includes the record-length field itself, so is four bytes longer than the actual record length. You can access this field by defining the record area as a table, and using negative or zero subscripting. The RDW directive is intended only for mainframe compatibility; for new programs you should use the RECORD IS VARYING DEPENDING ON phrase of the FD statement. Example:. fd file-1. 01 rec-1 pic x(100). 01 rec-2. 03 rdw-table pic x(4) occurs 25. working-storage section. 01 rdw-area. 03 rec-length pic 9(4) comp. 03 filler pic 9(4) comp. procedure division. ... read file-1 move rdw-table (0) to rdw-area See also:. FD statement REALOVL Causes overlays to be regarded as real rather than pseudo so that overlaying is done from disk. Syntax:.
[]
Parameters:. None Default:. REALOVL Phase:. Generate Environment:. 16-bit $SET:. Initial Remarks:. This directive only affects .obj files. This directive only affects programs that use COBOL segmentation. It affects only the generated .lnk file. REALOVL makes the overlays real by putting them in brackets in the file. NOREALOVL makes overlays pseudo. If you are compiling a segmented program for use on OS/2, you should specify NOREALOVL. RECMODE Specifies the default format of files. Syntax:.
[]
Parameters:. format F, V, or OSVS. Default:. RECMODE"F" Phase:. Syntax check Environment:. All $SET:. Initial Remarks:. The possible values of format are: F Fixed length record format. V Variable length record format. OSVS Fixed or variable depending on a file's record definitions. If all record definitions for the file have the same length and are fixed length, the file is fixed length record format. Otherwise, it is in variable length record format. This setting is compatible with OS/VS COBOL and DOS/VS COBOL. When compiled with their CMPR2 directive, both VS COBOL II COBOL/370 are also compatible with RECMODE"OSVS". For compatibility with VS COBOL II and COBOL/370 when compiled with NOCMPR2, you must specify RECMODE"F". For an individual file this directive is overridden if the FD contains either a RECORD IS VARYING phrase (which specifies variable format) or a RECORDING MODE clause. REF Makes the Compiler include in the source listing the intermediate code address of each data item or Procedure Division statement. On DOS, Windows and OS/2, it includes in the object code listing, the address of each Procedure Division statement. Syntax:.
[]
Parameters:. None Default:. NOREF Phase:. Both Environment:. All (syntax check), 16-bit (generate) $SET:. Any Dependencies:. REF sets LISTWIDTH"90" immediately unless LISTWIDTH already has a value greater than 90. Set to NOREF at end by NOASMLIST, NOLIST or LISTWIDTH with a value less than 90. Remarks:. The address is four digits long and appears on the right-hand side. Using both source and object code listings together, you can identify the code generated for each line of source code. This directive can also be useful in determining the locations reported in run-time error messages. See also:. LISTWIDTH REFNO Makes the Compiler display its internal reference number at the start of a compilation as well as at the bottom of every listing. Syntax:.
[]
Parameters:. None Default:. NOREFNO Phase:. Syntax check Environment:. All $SET:. No REGPARM Makes the object program use an alternative parameter-passing mechanism, used in some other COBOL compilers. Syntax:.
[]
Parameters:. when-used IN or OUT. Default:. NOREGPARM Phase:. Generate Environment:. 16-bit $SET:. Initial Dependencies:. If ASSUME is set, REGPARM"IN" sets NOFASTLINK at end. If ASSUME is set, REGPARM"OUT" sets LITLINK at end. Remarks:. This directive only affects .obj files. when-used shows when the alternative mechanism is to be used. Its possible values are: IN For parameters passed to the program. OUT For passing parameters to other programs. REGPARM with neither parameter causes this mechanism to be used in both cases. With this alternative mechanism, the first parameter is passed in ES:DI, the second in DS:SI, and subsequent parameters on the stack, such that the third item in the USING clause is popped off the stack last, and the last item popped first. The BP register is saved over calls, emulating the call functions of other COBOL compilers If this directive is used with FASTLINK, no USING clause should have more than three parameters. If REGPARM"OUT" is used, LITLINK is assumed; do not try to turn it off with NOLITLINK. REGPARM cannot be used with BY VALUE parameters. REMOVE Removes words from the reserved word list, so that they can be used as user-defined words. Syntax:.
[]
Parameters:. rsv-word A reserved word. Default:. No reserved words are removed. Phase:. Syntax check Environment:. All $SET:. Initial Remarks:. This directive does not appear in the list created with the SETTING directive. REPORT-LINE Specifies the maximum length of a report writer line. Syntax:.
[]
Parameters:. integer The maximum length, in characters. Default:. REPORT-LINE"256" Phase:. Syntax check Environment:. All $SET:. Initial RESEQ Makes the Compiler produce line numbers. Syntax:.
[]
Parameters:. None Default:. RESEQ Phase:. Syntax check Environment:. All $SET:. Initial Dependencies:. Set to RESEQ immediately by XREF. Set to NORESEQ immediately by SEQCHK. Set to NORESEQ at end by SOURCEFORMAT"FREE". Remarks:. These are COBOL line sequence numbers, starting at 1 and increasing in increments of 1. RETRYLOCK Specifies that when a READ statement finds that a record is locked the read operation is to be retried repeatedly until the record is available. Syntax:.
[]
Parameters:. None Default:. NORETRYLOCK Phase:. Syntax check Environment:. All $SET:. Any Dependencies:. Set to NORETRYLOCK immediately by NORM. Set to RETRYLOCK immediately by RM or RM"ANSI". Remarks:. This directive affects a file only if the file has a FILE STATUS item but there is no declarative specifically for that file. On DOS, Windows and OS/2, RETRYLOCK overrides the setting of the R run-time switch. You should use this directive instead of the R run-time switch. See also:. R RTS switch REWRITE-LS Allows REWRITE statements on line sequential files. Syntax:.
[]
Parameters:. None Default:. REWRITE-LS Phase:. Syntax check Environment:. All $SET:. No Remarks:. You must make sure that the record you write is the same size as the one it replaces. RM Specifies that words reserved in Ryan-McFarland COBOL V2.0 are to be regarded as reserved words, and changes the behavior of certain features to be compatible with that product. Syntax:.
[]
Parameters:. ANSI See Remarks below. Default:. NORM Phase:. Syntax check Environment:. All $SET:. Initial Dependencies:. RM sets SEQUENTIAL"LINE", NOTRUNC, OLDINDEX, NOOPTIONAL-FILE, RETRYLOCK and ALIGN"2" immediately. RM"ANSI" sets SEQUENTIAL"RECORD", NOTRUNC, OLDINDEX, NOOPTIONAL-FILE, RETRYLOCK and ALIGN"2" immediately. NORM sets SEQUENTIAL"RECORD", TRUNC"ANSI", NOOLDINDEX, OPTIONAL-FILE, NORETRYLOCK and ALIGN"8" immediately. Remarks:. With the ANSI parameter these features behave as they do when a program is compiled in that system with the ANSI switch set. See your Language Reference - Additional Topics.


MPE/iX 5.0 Documentation