PreviousCompiler Directives and Dialects File HandlingNext

Chapter 7: Run-time Triggers, Configuration and Switches

This chapter describes:

7.1 Triggers

The COBOL statements ACCEPT ... FROM ARGUMENT-NUMBER and ACCEPT ... FROM ARGUMENT-VALUE are defined in the X/Open COBOL standard. The standard states that the values returned should exclude the executable name itself (except when DISPLAY 0 UPON ARGUMENT-VALUE is used). This is documented in the Language Reference.

If the COBOL program you use to start your application is a system executable, the executable name is argument 0, and any arguments on the command line are returned as expected; for example, ./progname arg1 arg2 returns two arguments, arg1 and arg2.

In Object COBOL Developer Suite V4.1 and earlier, if you used cobrun, argument 0 was the cobrun trigger. The program name was thus the first of the arguments; for example cobrun progname arg1 arg2 returned three arguments, progname, arg1 and arg2. While this conformed with the X/Open standard, it was inconsistent.

In Server Express, if you use the cobrun (or cobrun_t) trigger program, the trigger is ignored, and the program name becomes argument 0. Therefore, only the parameters are returned as arguments. For example, cobrun progname arg1 arg2 returns two arguments, arg1 and arg2

However, this does mean that the behavior is inconsistent with Object COBOL Developer Suite V4.1 and earlier (except if you are using system executables). You might, therefore, have to change the setting of the arguments_are_initial run-time tunable to enable your application to run correctly.

If arguments_are_initial is set to TRUE, then the arguments are accepted as for Object COBOL Developer Suite V4.1 and earlier. If arguments_are_initial is set to FALSE, the trigger name is ignored. By default arguments_are_initial is FALSE; this provides consistency between all executable file types, and with Net Express.

For information on setting run-time tunables, and for information on the format of the arguments_are_initial run-time tunable, see the chapter Run-time Configuration in your Server Express User's Guide.

7.2 Switches

This section describes those run-time switches that have been removed from Server Express, but were available in previous versions of COBOL for UNIX, and those switches that are new to Server Express.

For a full list of the switches available in Server Express, see the Descriptions of Run-time Switches chapter in your Server Express User's Guide.

Removed switches:

A1 - Invoke Base Animator
e - COBOL symbol
K - Indexed files sequence check
p - Dynamic linkage fixup
S - Sort
s - Sort memory

New switches:

A1 - Display trailing spaces. Enables or disables the display of trailing spaces. This switch provides compatibility with earlier Micro Focus COBOL systems.

7.3 Run-time Tunables

For a full list of the run-time tunables available in Server Express, see the chapter Run-time Configuration in your Server Express User's Guide. The following run-time tunables have changed, or are superseded by new tunables or different methods of configuration.


command_line_accept

The behavior of the run-time tunable command_line_accept now affects the first READ from STDIN as well as the first ACCEPT.


isam_block_size

The isam_block_size tunable has been removed from Server Express. Instead, you should use the NODESIZE configuration option in the file handler configuration file. See the chapter File Handler Configuration in your File Handling book for details.


isam_open_key_check

The isam_open_key_check tunable has been removed from Server Express. Instead, you should use the KEYCHECK configuration option in the file handler configuration file. See the chapter File Handler Configuration in your File Handling book for details.


noretry_on_decl

The noretry_on_decl tunable has been removed from Server Express. There is no equivalent to this tunable in the file handler configuration options, although the RETRYLOCK option can be switched on and off for particular files. See the chapter File Handler Configuration in your File Handling book for details.


posix_lock_prob

The posix_lock_prob tunable has been superseded by the intra_process_record_locking tunable.


skip_on_lock

The skip_on_lock tunable has been removed from Server Express. Instead, you should use the SKIPLOCK configuration option in the file handler configuration file. See the chapter File Handler Configuration in your File Handling book for details.


7.4 COBCTRLCHAR Environment Variable

The COBCTRLCHAR environment variable enabled you to output Escape sequences to the screen for cursor and color handling. It has been removed from this product and is obsolete. More effective methods are provided by the enhanced ACCEPT/DISPLAY syntax (for example, DISPLAY text-item AT yyxx), or run-time CBL_ calls. These methods:

For more information, refer to the Language Reference and the Adis chapter of your Programmer's Guide to Creating User Interfaces.

Examples:

If an existing program outputs escape sequences and/or writes directly to tty to provide screen I/O, this code should be replaced by COBOL syntax. For example, if your program:


Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousCompiler Directives and Dialects File HandlingNext