![]() | 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 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 chapter Descriptions of Run-time Switches in your User's Guide.
The following switches have been removed or superseded:
The A1 switch, which invoked the base Animator, has been removed from Server Express. Object COBOL Developer Suite V4.1 and earlier provided two animators: base Animator and advanced Animator. Server Express has the advanced Animator only so this switch is not needed. (There is a new A1 switch, which controls the display of trailing spaces.) The advanced Animator is described in your Debugging Guide.
The e switch has been removed because technical improvements in Server Express mean that the run-time system can function effectively without it.
The K switch, which controlled the order in which records are written to an indexed file with sequential access, has been removed from Server Express. If you want to write records in any order other than ascending order of prime key, you should use dynamic access.
The p switch has been removed because technical improvements in Server Express mean that the run-time system can function effectively without it.
The S switch, which caused duplicates in all SORT operations to be ordered, has been removed from Server Express because the SORT always orders duplicates.
The s switch, which specified the amount of memory allocated to internal workspace for SORT operations, has been superseded by the SORTSPACE environment variable, which is described in the appendix Environment Variables in your User's Guide.
The following switch is new:
This switch controls the display of trailing spaces. It 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 User's Guide. The following run-time tunables have changed, or are superseded by new tunables or different methods of configuration.
The animator_interrupt_char tunable has been removed from Server Express. The animator
interrupt character in Server Express is the same as the operating system
interrupt character, which is by default either CTRL+C or DEL; you can change
it using the operating system command:
stty intr key
where key is the character that you want to use as the interrupt character
The behavior of the run-time tunable command_line_accept now affects the first READ
from STDIN as well as the first ACCEPT.
In Server Express you cannot set the core_on_error tunable to the value 2, to
mean "produce a core dump when any error condition occurs". Instead
you should use just-in-time debugging or FaultFinder. Both just-in-time
debugging and FaultFinder are available both in Server Express, for use during
development, and Application Server, for production environments. We recommend
that you use FaultFinder in production environments. The advantage of these
techniques is that when an error condition occurs, the system tidies up after
your program, for example, freeing up system resources and clearing file
buffers. In contrast, when you use core_on_error and an error condition occurs,
the system simply produces the core dump file without tidying up.
For further information on just-in-time debugging and FaultFinder see your Debugging Guide.
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 routine_table_size tunable has been removed from Server Express. In Server
Express there is no limit other than any limit imposed by the operating system
to the number of COBOL programs that can be loaded at the same time.
The same_proc_excl_detection 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 Character User Interfaces book.
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
CBL_GET_SCR_SIZE
Copyright © 2002 Micro Focus 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 | ![]() |