HP 3000 Manuals

Directives for Compiler/Generator (cont.) [ COBOL/HP-UX Operating Guide for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Operating Guide for the Series 700 and 800

Directives for Compiler/Generator (cont.) 

PROFILE 

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

Syntax: 

[]
Parameters: None Default: NOPROFILE Phase: Compile $SET: No See Chapter 7 , Running for details of the profiler facility. PROGID-COMMENT Allows comments following the program-id in the PROGRAM-ID paragraph. Syntax:
[]
Parameters: None Default: NOPROGID-COMMENT Phase: Compile $SET: Initial This directive is provided for compatibility with earlier versions of this product. QUAL Allows qualified data-names and procedure-names in your program. Syntax:
[]
Parameters: None Default: QUAL Phase: Compile $SET: Any If you have no qualified data-names or procedure-names in your source code, you can specify NOQUAL. This improves compilation speed. QUALPROC Allows qualified procedure-names in your program. Syntax:
[]
Parameters: None Default: QUALPROC Phase: Compile $SET: Any 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. For ANSI conformance you must specify QUALPROC. QUERY Makes the compiler ask, each time it is unable to find a COPY-file, what it should do. Syntax:
[]
Parameters: None Default: NOQUERY Phase: Compile $SET: Any With QUERY, if the compiler cannot find a COPY-file you are asked whether you want to stop the compilation, retry the search for the COPY-file, produce an error message and continue, or alter the path-name. 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: Compile $SET: No The opposite of this directive is the directive APOST which causes the single-quotation mark character (') to be used. RDW Allows 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: Compile $SET: Any 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 field. 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. For example: fdfile-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 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. RECMODE Specifies the default format of files. Syntax:
[]
Parameters: format F, V, or OSVS. Default: RECMODE "F" Phase: Compile $SET: Initial 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 will be in fixed length record format. Otherwise it will be 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 and COBOL/370 are also compatible with RECMODE"OSVS". For compatibility with VS COBOL II and COBOL/370, when compiled with NOCMPR2, you must instead 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. Syntax:
[]
Parameters: None Default: NOREF Phase: Compile $SET: Any The address is four digits long and appears on the right-hand side. If the current value for the line width setting is less than 90 when REF is specified, LW "90" is also specified. 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. 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: Compile $SET:No Either the VERBOSE or CONFIRM directive must also be set for the REFNO directive to have any effect. 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: Compile $SET: Initial This directive does not appear in the list created with the SETTING directive. The only words you cannot remove are those used to name and reference special registers. RESEQ Makes the compiler produce line numbers. Syntax:
[]
Parameters: None Default: RESEQ Phase: Compile $SET: Initial 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: Compile $SET: Any For the RETRYLOCK directive to be effective the +R run-time switch must be set. This restriction does not apply if the RETRYLOCK directive is set as a result of setting the RM directive. REWRITE-LS Allows REWRITE statements on line sequential files. Syntax:
[]
Parameters: None Default: REWRITE-LS Phase: Compile $SET: No 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 below Default: NORM Phase: Compile $SET: Initial 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. The ANSI parameter also sets SEQUENTIAL"RECORD"; if this parameter is not present it sets SEQUENTIAL"LINE". The RM directive sets: NOTRUNC, OLDINDEX, NOOPTIONAL-FILE, ALIGN"2", and RETRYLOCK. Specifying NORM sets: ALIGN"8" SEQUENTIAL"RECORD" NOOLDINDEX, TRUNC"ANSI", OPTIONAL-FILE, and NORETRYLOCK. These are not necessarily the default settings, and they are not set by setting this directive to its default. RNIM Causes Animator to be invoked instead of the compiler. Syntax:
[]
Parameters: None Default: NORNIM Phase: Compile $SET: No The effect is as if you had invoked Animator in the normal way. You must have already compiled the program using the ANIM directive to prepare it for animation. You can use Animator directives with RNIM. See Appendix F , Directives for Animator for details. With RNIM, no object file is produced by default. RTNCODE-SIZE Specifies the size of the RETURN-CODE special register and its alignment in memory. Syntax:
[]
Parameters: integer 2 or 4 Default: RTNCODE-SIZE "2" Phase: Compile $SET: Initial The possible values of integer are: 2 PIC S9(4) COMP: size two bytes, aligned on a two-byte boundary 4 PIC S9(8) COMP: size four bytes, aligned on a four-byte boundary If a program with a four-byte RETURN-CODE calls a program with a two-byte RETURN-CODE, then on return the value from the called program is in the lower two bytes of the four-byte RETURN CODE. The content of the upper two-bytes is undefined. If a program with a two-byte RETURN-CODE calls a program with a four-byte RETURN-CODE, then on return the lower two bytes of the value from the called program are in the two-byte RETURN-CODE. The content of the upper two bytes is lost. SAA Specifies that words reserved under the Systems Application Architecture (SAA) definition of COBOL are to be treated as reserved words. Syntax:
[]
Parameters: level An integer specifying the level of SAA support required Default: NOSAA Phase: Compile $SET: Initial The possible values of level are: 1 SAA level 1 supported 2 SAA level 2 supported Specifying SAA with no parameters is the same as specifying SAA"2". SAA also enables the DBCS"2" and DBSPACE directives. SEG Turns on COBOL segmentation. Syntax:
[]
Parameters: None Default: SEG Phase: Compile $SET: Initial SEQCHK Makes the compiler check the sequence numbers in columns 1 through 6 and identify source lines that are out of sequence. Syntax:
[]
Parameters: None Default: NOSEQCHK Phase: Compile $SET: Any SEQUENTIAL Specifies the default file type for files defined (implicitly or explicitly) as ORGANIZATION SEQUENTIAL. Syntax:
[]
Parameters: type ADVANCING, ANSI, LINE or RECORD Default: SEQUENTIAL "RECORD" Phase: Compile $SET: Initial The possible values of type are: ADVANCING RECORD SEQUENTIAL with LINE ADVANCING ANSI ANSI-conforming RECORD SEQUENTIAL file output LINE LINE SEQUENTIAL RECORD RECORD SEQUENTIAL (a standard SEQUENTIAL file). SETTING SETTINGS Makes the compiler include in the source listing a list of the settings of directives. Syntax:
[]
Parameters: None Default: NOSETTING Phase: Compile $SET: No A few directives provided only for compatibility with other COBOL systems are not shown. Directives that control code generation, that make specific changes to the reserved word list, or that specify other directives are also not shown. The directives list is produced before processing the program source, so any directives in $SET statements in the program are not shown. SHOW-DIR Makes the compiler show the contents of directives files in the source listing. Syntax:
[]
Parameters: None Default: NOSHOW-DIR Phase: Compile $SET: Any A directives file means cobol.dir or a file that appears in a DIRECTIVES or USE directive. For the contents of cobol.dir to appear in the source listing, SHOW-DIR must be specified at the start of cobol.dir, as this file is processed before any other directive. You can use SHOW-DIR and NOSHOW-DIR selectively so that only parts of the directives file are output to the listing. SIGN Specifies whether, for numeric DISPLAY items with included signs, the signs are to be interpreted according to the ASCII or EBCDIC convention. Syntax:
[]
Parameters: convention Either ASCII or EBCDIC Default: SIGN "ASCII" Phase: Compile $SET: Initial SPZERO Causes space characters in numeric data items of USAGE DISPLAY to be treated as zeros in native code. Syntax:
[]
Parameters: None Default: NOSPZERO Phase: Both $SET: Initial With NOSPZERO, space characters in numeric data items give unpredictable results. SQL This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: dbman Specifies which database manager/ requester to use Default: NOSQL Phase: Compile $SET: Initial SQLACCESS This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: access-plan The root of a file-name, or a null string Default: NOSQLACCESS Phase: Compile $SET: Initial SQLBIND This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: bindfile-name A full file specification or a null string Default: NOSQLBIND Phase: Compile $SET: Initial SQLBLOCK This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: block-mode The blocking mode to be used Default: SQLBLOCK "UNAMBIG" Phase: Compile $SET: Initial SQLDB This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: database-name An alphanumeric string obeying the rules for a Database Manager database name Default: NOSQLDB Phase: Compile $SET: Initial SQLDB2 This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: None Default: NOSQLDB2 Phase: Compile $SET: Initial SQLFORMAT This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: date-format Identifies the format to use Default: SQLFORMAT "LOC" Phase: Compile $SET: Initial SQLINIT This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: mode Specifies whether the database is to be used in shared or exclusive mode Default: NOSQLINIT Phase: Compile $SET: Initial SQLISOLATION This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: isol-level The isolation level to use Default: SQLISOLATION "CS" Phase: Compile $SET: Initial SQLNOT This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: integer The ASCII value, in decimal, of the character to use Default: SQLNOT "170" Phase: Compile $SET: Initial SQLPASS This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: password An alphanumeric string obeying the rules for a database password Default: NOSQLPASS Phase: Compile $SET: Initial SQLPRE This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: None Default: NOSQLPRE Phase: Compile $SET: Initial SQLPROT This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: None Default: NOSQLPROT Phase: Compile $SET: Initial STICKY-LINKAGE This directive is reserved for use on other environments. Do not change its setting. Syntax:
[]
Parameters: integer Either 1 or 2 Default: NOSTICKY-LINKAGE Phase: Compile $SET: Initial You can call a program via different entry-points that expect different parameters. When a Linkage Section record is used as a parameter in a called program, it is linked to the corresponding data item in the calling program. This directive causes such links to remain during subsequent calls of the called program, so that the record can be accessed during subsequent calls even if they are via entry-points that do not use it as a parameter. For example, in the calling program: call "entry-1" using hourly-rate employee call "entry-2" * >sticky-linkage"1" or "2" call "entry-1" using hourly-rate * >sticky-linkage"2" only In the called program: entry "entry-1" using hourly-rate employee. display hourly-rate display employee exit program. entry "entry-2". display hourly-rate exit program. STICKY-LINKAGE with no parameters is equivalent to STICKY-LINKAGE"2". If you specify STICKY-LINKAGE"1", the called program fills in any parameters not specified in the ENTRY... USING phrase. Thus, the DISPLAY HOURLY-RATE statement will work correctly for all three CALL statements, but DISPLAY EMPLOYEE will cause run-time error 203 (CALL parameter not supplied (fatal)) on the third call. If you specify STICKY-LINKAGE"2", the called program fills in any parameter not actually passed by the caller. The caller must be a COBOL program. Thus, the DISPLAY EMPLOYEE statement will now work correctly for the third call, as well as the first. If you specify NOSTICKY-LINKAGE, the second and third calls will cause run-time error 203 (CALL parameter not supplied (fatal)).


MPE/iX 5.0 Documentation