Compiler Directives and Dialects | File Handling |
This chapter describes:
arguments_are_initial
run-time tunable to change the argument order 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.
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.
A1 - Invoke Base Animator
e - COBOL symbol
K - Indexed files sequence check
p - Dynamic linkage fixup
S - Sort
s - Sort memory
A1 - Display trailing spaces. Enables or disables the display of trailing spaces. This switch provides compatibility with earlier Micro Focus COBOL systems.
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.
The behavior of the run-time tunable command_line_accept
now affects the first READ from STDIN as well as the first ACCEPT.
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.
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.
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.
The posix_lock_prob
tunable has been superseded by the
intra_process_record_locking
tunable.
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.
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.
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:
DISPLAY ... [AT ...]
or the library routine:
CBL_WRITE_SCR_CHATTRS
CBL_GET_SCR_LINE_DRAW
CBL_GET_SCR_GRAPHICS
both of which return arrays of line and graphics characters correct for the current environment.
CBL_READ_SCR_CHATTRS
DISPLAY SPACES UPON CRT
or the library routine:
CBL_CLEAR_SCREEN
DISPLAY ... WITH BELL
or the library routine:
CALL x"E5"
CBL_GET_SCR_SIZE
Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Compiler Directives and Dialects | File Handling |