tmt@fiscs-0:~$ cobc -V cobc (GnuCOBOL) 3.1.2.0 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart Built Jul 18 2021 20:14:17 Packaged Dec 23 2020 12:04:58 UTC C version "9.3.0" tmt@fiscs-0:~$ cobc -i cobc (GnuCOBOL) 3.1.2.0 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart Built Jul 18 2021 20:14:17 Packaged Dec 23 2020 12:04:58 UTC C version "9.3.0" build information build environment : x86_64-pc-linux-gnu CC : gcc C version : "9.3.0" CPPFLAGS : CFLAGS : -O2 -pipe -finline-functions -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k LD : /usr/bin/ld -m elf_x86_64 LDFLAGS : -Wl,-z,relro,-z,now,-O1 GnuCOBOL information COB_CC : gcc COB_CFLAGS : -pipe -I/usr/local/include -Wno-unused -fsigned-char -Wno-pointer-sign COB_DEBUG_FLAGS : -ggdb3 -fasynchronous-unwind-tables COB_LDFLAGS : COB_LIBS : -L/usr/local/lib -lcob -lm COB_CONFIG_DIR : /usr/local/share/gnucobol/config COB_COPY_DIR : /usr/local/share/gnucobol/copy COB_MSG_FORMAT : GCC COB_OBJECT_EXT : o COB_MODULE_EXT : so COB_EXE_EXT : 64bit-mode : yes BINARY-C-LONG : 8 bytes endianness : little-endian native EBCDIC : no extended screen I/O : ncursesw variable file format : 0 sequential file handler : built-in indexed file handler : BDB mathematical library : GMP XML library : disabled JSON library : not found tmt@fiscs-0:~/src/cobol$ ls /usr/local/share/gnucobol/config acu.conf cobol2014.conf lax.conf-inc realia-strict.conf acu-strict.conf cobol2014.words mf.conf realia.words acu.words cobol85.conf mf-strict.conf rm.conf bs2000.conf cobol85.words mf.words rm-strict.conf bs2000-strict.conf default.conf mvs.conf rm.words bs2000.words ibm.conf mvs-strict.conf runtime.cfg cobol2002.conf ibm-strict.conf mvs.words runtime_empty.cfg cobol2002.words ibm.words realia.conf xopen.conf tmt@fiscs-0:~/src/cobol$ cat /usr/local/share/gnucobol/config/default.conf # GnuCOBOL compiler configuration # # Copyright (C) 2001-2012, 2014-2020 Free Software Foundation, Inc. # Written by Keisuke Nishida, Roger While, Simon Sobisch, Edward Hart, # Ron Norman # # This file is part of GnuCOBOL. # # The GnuCOBOL compiler is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # GnuCOBOL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GnuCOBOL. If not, see . # Value: any string name: "GnuCOBOL" # Value: enum standard-define 0 # CB_STD_GC = 0, # CB_STD_MF, # CB_STD_IBM, # CB_STD_MVS, # CB_STD_BS2000, # CB_STD_ACU, # CB_STD_85, # CB_STD_2002, # CB_STD_2014 # Value: int tab-width: 8 text-column: 72 # Maximum word-length for COBOL words / Programmer defined words # Be aware that GC checks the word length against COB_MAX_WORDLEN # first (currently 63) word-length: 63 # Maximum literal size in general literal-length: 8191 # Maximum numeric literal size (absolute maximum: 38) numeric-literal-length: 38 # Maximum number of characters allowed in the character-string (max. 255) pic-length: 255 # Default assign type # Value: 'dynamic', 'external' assign-clause: dynamic # If yes, file names are resolved at run time using # environment variables. # For example, given ASSIGN TO "DATAFILE", the file name will be # 1. the value of environment variable 'DD_DATAFILE' or # 2. the value of environment variable 'dd_DATAFILE' or # 3. the value of environment variable 'DATAFILE' or # 4. the literal "DATAFILE" # If no, the value of the assign clause is the file name. # filename-mapping: yes # Alternate formatting of numeric fields pretty-display: yes # Allow complex OCCURS DEPENDING ON complex-odo: no # Allow REDEFINES to other than last equal level number indirect-redefines: no # Binary byte size - defines the allocated bytes according to PIC # Value: signed unsigned bytes # ------ -------- ----- # '2-4-8' 1 - 4 same 2 # 5 - 9 same 4 # 10 - 18 same 8 # # '1-2-4-8' 1 - 2 same 1 # 3 - 4 same 2 # 5 - 9 same 4 # 10 - 18 same 8 # # '1--8' 1 - 2 1 - 2 1 # 3 - 4 3 - 4 2 # 5 - 6 5 - 7 3 # 7 - 9 8 - 9 4 # 10 - 11 10 - 12 5 # 12 - 14 13 - 14 6 # 15 - 16 15 - 16 7 # 17 - 18 17 - 18 8 # binary-size: 1-2-4-8 # Numeric truncation according to ANSI binary-truncate: yes # Binary byte order # Value: 'native', 'big-endian' binary-byteorder: big-endian # Allow larger REDEFINES items larger-redefines-ok: no # Allow certain syntax variations (eg. REDEFINES position) relax-syntax-checks: no # Allow zero length reference-modification # (only checked with active EC-BOUND-REF-MOD) ref-mod-zero-length: yes # Perform type OSVS - If yes, the exit point of any currently # executing perform is recognized if reached. perform-osvs: no # Compute intermediate decimal results like IBM OSVS arithmetic-osvs: no # MOVE like IBM (mvc); left to right, byte by byte move-ibm: no # SELECT RELATIVE KEY and ASSIGN fields must be in WORKING-STORAGE select-working: no # LOCAL-STORAGE SECTION implies RECURSIVE attribute local-implies-recursive: no # If yes, LINKAGE SECTION items remain allocated # between invocations. sticky-linkage: no # If yes, allow non-matching level numbers relax-level-hierarchy: no # If yes, evaluate constant expressions at compile time constant-folding: yes # Allow Hex 'F' for NUMERIC test of signed PACKED DECIMAL field hostsign: no # If yes, set WITH UPDATE clause as default for ACCEPT dest-item, # except if WITH NO UPDATE clause is used accept-update: no # If yes, set WITH AUTO clause as default for ACCEPT dest-item, # except if WITH TAB clause is used accept-auto: no # If yes, DISPLAYs and ACCEPTs are, by default, done on the CRT (i.e., using # curses). console-is-crt: no # If yes, allow redefinition of the current program's name. This prevents its # use in a prototype-format CALL/CANCEL statement. program-name-redefinition: yes # If yes, NO ECHO/NO-ECHO/OFF is the same as SECURE (hiding input with # asterisks, not spaces). no-echo-means-secure: no # If yes, the first item in a field screen ACCEPT/DISPLAY (e.g. DISPLAY x UPON # CRT) is located after the previous ACCEPT/DISPLAY (as though LINE 0 COL 0 had # been specified). line-col-zero-default: yes # If yes, DISPLAY SPACES acts as ERASE EOS, DISPLAY X"01" acts as ERASE EOL, # DISPLAY X"02" acts as BLANK SCREEEN and DISPLAY X"07" acts as BELL. Note # DISPLAY LOW-VALUE is excluded from this; it will always just position the # cursor. display-special-fig-consts: no # If yes, COMP-1 is a signed 16-bit integer and any PICTURE clause is ignored. binary-comp-1: no # If yes, POINTER is handled as BINARY-DOUBLE UNSIGNED instead of its own class numeric-pointer: no # auto-adjust to zero like MicroFocus does move-non-numeric-lit-to-numeric-is-zero: no # If yes, implicitly define a variable for an ASSIGN DYNAMIC which does not # match an existing data item. implicit-assign-dynamic-var: yes # What rules to apply to SCREEN SECTION items clauses screen-section-rules: gc # Whether DECIMAL-POINT IS COMMA has effect in XML/JSON GENERATE dpc-in-data: xml # Dialect features # Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error', # 'unconformable' alter-statement: obsolete comment-paragraphs: obsolete call-overflow: archaic data-records-clause: obsolete debugging-mode: ok use-for-debugging: ok listing-statements: skip # may be a user-defined word title-statement: skip # may be a user-defined word entry-statement: ok goto-statement-without-name: obsolete label-records-clause: obsolete memory-size-clause: obsolete move-noninteger-to-alphanumeric: error move-figurative-constant-to-numeric: archaic move-figurative-space-to-numeric: error move-figurative-quote-to-numeric: obsolete multiple-file-tape-clause: obsolete next-sentence-phrase: archaic odo-without-to: warning padding-character-clause: obsolete section-segments: ignore stop-literal-statement: obsolete stop-identifier-statement: obsolete same-as-clause: ok type-to-clause: ok usage-type: ok synchronized-clause: ok special-names-clause: ok top-level-occurs-clause: ok value-of-clause: obsolete numeric-boolean: ok hexadecimal-boolean: ok national-literals: ok hexadecimal-national-literals: ok national-character-literals: warning # TO-DO: Add separate config option for H"..." to be unsupported,numeric,non-numeric(acu) acu-literals: unconformable hp-octal-literals: unconformable word-continuation: warning not-exception-before-exception: ok accept-display-extensions: ok renames-uncommon-levels: ok symbolic-constant: ok constant-78: ok constant-01: ok perform-varying-without-by: ok reference-out-of-declaratives: warning program-prototypes: ok call-convention-mnemonic: ok call-convention-linkage: ok numeric-value-for-edited-item: ok incorrect-conf-sec-order: ok define-constant-directive: archaic free-redefines-position: warning records-mismatch-record-clause warning record-delimiter: ok sequential-delimiters: ok record-delim-with-fixed-recs: ok missing-statement: warning zero-length-literals: ok xml-generate-extra-phrases: ok continue-after: ok goto-entry: warning assign-variable: ok assign-using-variable: ok assign-ext-dyn: ok assign-disk-from: ok vsam-status: ignore # use complete word list; synonyms and exceptions are specified below reserved-words: default # not-reserved: # Value: Word to be taken out of the reserved words list not-reserved: TERMINAL # reserved: # Entries of the form word-1=word-2 define word-1 as an alias for default # reserved word word-2. No spaces are allowed around the equal sign. reserved: AUTO-SKIP=AUTO reserved: AUTOTERMINATE=AUTO reserved: BACKGROUND-COLOUR=BACKGROUND-COLOR reserved: BEEP=BELL reserved: BINARY-INT=BINARY-LONG reserved: BINARY-LONG-LONG=BINARY-DOUBLE reserved: CELLS=CELL reserved: COLOURS=COLORS reserved: EMPTY-CHECK=REQUIRED reserved: EQUALS=EQUAL reserved: FOREGROUND-COLOUR=FOREGROUND-COLOR reserved: HIGH-VALUES=HIGH-VALUE reserved: INITIALISE=INITIALIZE reserved: INITIALISED=INITIALIZED reserved: LENGTH-CHECK=FULL reserved: LOW-VALUES=LOW-VALUE reserved: ORGANISATION=ORGANIZATION reserved: PIXELS=PIXEL reserved: SYNCHRONISED=SYNCHRONIZED reserved: TIMEOUT=TIME-OUT reserved: VALUES=VALUE reserved: ZEROES=ZERO reserved: ZEROS=ZERO tmt@fiscs-0:~/src/cobol$ cat /usr/local/share/gnucobol/config/runtime.cfg # GnuCOBOL runtime configuration # # Copyright (C) 2015-2020 Free Software Foundation, Inc. # Written by Simon Sobisch, Ron Norman # # This file is part of the GnuCOBOL runtime. # # The GnuCOBOL runtime is free software: you can redistribute it # and/or modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # GnuCOBOL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with GnuCOBOL. If not, see . # ## General instructions # # The initial runtime.cfg file is found in the $COB_CONFIG_DIR , # which defaults to installdir/gnucobol/config (see cobcrun --info for the # local path that is configured). # The environment variable COB_RUNTIME_CONFIG may define a different runtime # configuration file to read. # If settings are included in the runtime environment file multiple times # then the last setting value is used, no warning occurs. # Settings via environment variables always take precedence over settings # that are given in runtime configuration files. And the environment is # checked after completing processing of the runtime configuration file(s) # All values set to string variables or environment variables are checked # for ${envvar} and replacement is done at the time of the setting. # You can also specify a default value for the case that envvar is not set: # ${envvar:default} (the format ${envvar:-default} is supported, too). # Any environment variable may be set with the directive setenv . # Example: setenv COB_LIBARAY_PATH ${LD_LIBRARY_PATH} # Any environment variable may be unset with the directive unsetenv # (one var per line). # Example: unsetenv COB_LIBRARY_PATH # Runtime configuration files can include other files with the # directive include . # Example: include my-runtime-configuration-file # To include another configuration file only if it is present use the # directive includeif . # You can also use ${envvar} inside this. # Example: includeif ${HOME}/mygc.cfg # If you want to reset a parameter to its default value use # reset parametername . # Most runtime variables have boolean values, some are switches, some have # string values, integer values (if not explicit noted: unsigned) and some # are size values. # The boolean values will be evaluated as following: # to true: 1, Y, ON, YES, TRUE (no matter of case) # to false: 0, N, OFF # A 'size' value is an unsigned integer optionally followed by K, M, or G # for kilo, mega or giga. # For convenience a parameter in the runtime.cfg file may be defined by using # either the environment variable name or the parameter name. # In most cases the environment variable name is the parameter name (in upper # case) with the prefix COB_ . # For a complete list of the settings in use see cobcrun --runtime-config . # Note: # If you want to *slightly* speed up a program's startup time, remove all # of the comments from the actual real configuration file that is processed. # ## General environment # # Environment name: COB_DISABLE_WARNINGS # Parameter name: disable_warnings # Purpose: turn off runtime warning messages # Type: boolean # Default: false # Example: DISABLE_WARNINGS TRUE # Environment name: COB_ENV_MANGLE # Parameter name: env_mangle # Purpose: names checked in the environment would get non alphanumeric # change to '_' # Type: boolean # Default: false # Example: ENV_MANGLE TRUE # Environment name: COB_SET_DEBUG # Parameter name: debugging_mode # Purpose: to enable USE ON DEBUGGING procedures that were active # during compile-time because of WITH DEBUGGING MODE, # otherwise the code generated will be skipped # Type: boolean # Default: false # Example: COB_SET_DEBUG 1 # Environment name: COB_SET_TRACE # Parameter name: set_trace # Purpose: to enable COBOL trace feature # Type: boolean # Default: false # Example: SET_TRACE TRUE # Environment name: COB_TRACE_FILE # Parameter name: trace_file # Purpose: to define where COBOL trace output should go # Type: string : $$ is replaced by process id # Note: file is opened for append if name starts with "+" # Default: stderr # Example: TRACE_FILE ${HOME}/mytrace.$$ # Environment name: COB_TRACE_FORMAT # Parameter name: trace_format # Purpose: to define format of COBOL trace output # Type: string # Default: "%P %S Line: %L" # %P is replaced by Program-Id/Function-Id minimal length 29 # with prefix # %I is replaced by Program-Id/Function-Id variable length, # without prefix # %L is replaced by Line number, right justified, length 6 # %S is replaced by statement type and name # %F is replaced by source file name # Example: TRACE_FORMAT "Line: %L %S" # Note: format of GC2.2 and older: # "PROGRAM-ID: %I Line: %L %S" # Environment name: COB_STACKTRACE # Parameter name: stracktrace # Purpose: to disable stracktrace creation on abort # Type: boolean # Default: true # Example: STRACKTRACE no # Environment name: COB_DUMP_FILE # Parameter name: dump_file # Purpose: to define where COBOL dump output should go # Note: the -fdump=all compile option prepares for dump; # file is opened for append if name starts with "+" # Type: string : $$ is replaced by process id # Default: stderr # Example: DUMP_FILE ${HOME}/mytrace.log # Environment name: COB_DUMP_WIDTH # Parameter name: dump_width # Purpose: to define COBOL dump line length # Type: integer # Default: 100 # Example: dump_width 120 # Environment name: COB_CURRENT_DATE # Parameter name: current_date # Purpose: specify an alternate Date/Time to be returned to ACCEPT # clauses this is used for testing purposes or to tweak # a missing offset partial setting is allowed # Type: numeric string in format YYYYDDMMHH24MISS or date string # Default: the operating system date is used # Example: COB_CURRENT_DATE "2016/03/16 16:40:52" # current_date YYYYMMDDHHMMSS+01:00 # ## Call environment # # Environment name: COB_LIBRARY_PATH # Parameter name: library_path # Purpose: paths for dynamically-loadable modules # Type: string # Note: the default paths .:/installpath/extras are always # added to the given paths # Example: LIBRARY_PATH /opt/myapp/test:/opt/myapp/production # Environment name: COB_PRE_LOAD # Parameter name: pre_load # Purpose: modules that are loaded during startup, can be used # to CALL COBOL programs or C functions that are part # of a module library # Type: string # Note: the modules listed should NOT include extensions, the # runtime will use the right ones on the various platforms, # COB_LIBRARY_PATH is used to locate the modules # Example: PRE_LOAD COBOL_function_library:external_c_library # Environment name: COB_LOAD_CASE # Parameter name: load_case # Purpose: resolve ALL called program names to UPPER or LOWER case # Type: Only use UPPER or LOWER # Default: if not set program names in CALL are case sensitive # Example: LOAD_CASE UPPER # Environment name: COB_PHYSICAL_CANCEL # Parameter name: physical_cancel # Purpose: physically unload a dynamically-loadable module on CANCEL, # this frees some RAM and allows the change of modules during # run-time but needs more time to resolve CALLs (both to # active and not-active programs) # Alias: default_cancel_mode, LOGICAL_CANCELS (0 = yes) # Type: boolean (evaluated for true only) # Default: false # Example: PHYSICAL_CANCEL TRUE # ## File I/O # # Environment name: COB_VARSEQ_FORMAT # Parameter name: varseq_format # Purpose: declare format used for variable length sequential files # - different types and lengths precede each record # - 'length' is the data length, does not include the prefix # Type: 0 means 2 byte record length (big-endian) + 2 NULs # 1 means 4 byte record length (big-endian) # 2 means 4 byte record length (local machine int) # 3 means 2 byte record length (big-endian) # Default: 0 # Example: VARSEQ_FORMAT 1 # Environment name: COB_FILE_PATH # Parameter name: file_path # Purpose: define default location where data files are stored # Type: file path directory # Default: . (current directory) # Example: FILE_PATH ${HOME}/mydata # Environment name: COB_LS_FIXED # Parameter name: ls_fixed # Purpose: Defines if LINE SEQUENTIAL files should be fixed length # (or variable, by removing trailing spaces) # Alias: STRIP_TRAILING_SPACES (0 = yes) # Type: boolean # Default: false # Example: LS_FIXED TRUE # Environment name: COB_LS_NULLS # Parameter name: ls_nulls # Purpose: Defines for LINE SEQUENTIAL files what to do with data # which is not DISPLAY type. This could happen if a LINE # SEQUENTIAL record has BINARY/COMP data fields in it. # Type: boolean # Default: false # Note: The TRUE setting will insert a null character x"00" before # those values to escape them, and redo on read-in. # Example: LS_NULL = TRUE # Environment name: COB_SYNC # Parameter name: sync # Purpose: Should the file be synced to disk after each write/update # Type: boolean # Default: false # Example: SYNC: TRUE # Environment name: COB_SORT_MEMORY # Parameter name: sort_memory # Purpose: Defines how much RAM to assign for sorting data # if this size is exceeded the SORT will be done # on disk instead of memory # Type: size but must be more than 1M # Default: 128M # Example: SORT_MEMORY 64M # Environment name: COB_SORT_CHUNK # Parameter name: sort_chunk # Purpose: Defines how much RAM to assign for sorting data in chunks # Type: size but must be within 128K and 16M # Default: 256K # Example: SORT_CHUNK 1M # ## Screen I/O # # Environment name: COB_BELL # Parameter name: bell # Purpose: Defines how a request for the screen to beep is handled # Type: FLASH, SPEAKER, FALSE, BEEP # Default: BEEP # Example: BELL SPEAKER # Environment name: COB_REDIRECT_DISPLAY # Parameter name: redirect_display # Purpose: Defines if DISPLAY output should be sent to 'stderr' # Type: boolean # Default: false # Example: redirect_display Yes # Environment name: COB_SCREEN_ESC # Parameter name: screen_esc # Purpose: Enable handling of ESC key during ACCEPT # Type: boolean # Default: false # Note: is only evaluated if COB_SCREEN_EXCEPTIONS is active # Example: screen_esc Yes # Environment name: COB_SCREEN_EXCEPTIONS # Parameter name: screen_exceptions # Purpose: enable exceptions for function keys during ACCEPT # Type: boolean # Default: false # Example: screen_exceptions Yes # Environment name: COB_TIMEOUT_SCALE # Parameter name: timeout_scale # Purpose: specify translation in milliseconds for ACCEPT clauses # BEFORE TIME value / AFTER TIMEOUT # Type: integer # 0 means 1000 (Micro Focus COBOL compatible), 1 means 100 # (ACUCOBOL compatible), 2 means 10, 3 means 1 # Default: 0 # Note: the minimum and possible maximum value depend on the # screenio library used # Example: timeout_scale 3 # Environment name: COB_INSERT_MODE # Parameter name: insert_mode # Purpose: specify default insert mode for ACCEPT; 0=off, 1=on # Type: boolean # Default: false # Note: also sets the cursor type (if available) # Example: insert_mode Y # Environment name: COB_MOUSE_FLAGS # Parameter name: mouse_flags # Purpose: specify which mouse events will be sent as function key # to the application during ACCEPT and how they will be # handled # Type: int (by bits) # Default: 1 # Note: 0 disables the mouse cursor, any other value enables it, # any value containing 1 will enable internal handling (click # to position, double-click to enter). # See copy/screenio.cpy for list of events and their values. # Alias: MOUSE_FLAGS # Example: 11 (enable internal handling => 1, left press => 2, # double-click => 8; 1+2+8=11) # Environment name: COB_MOUSE_INTERVAL # Parameter name: mouse_interval # Purpose: specifies the maximum time (in thousands of a second) # that can elapse between press and release events for them # to be recognized as a click. # Type: int (0 - 166) # Default: 100 # Note: 0 disables the click resolution (instead press + release # are recognized), also disables positioning by mouse click # Environment name: COB_DISPLAY_PRINT_PIPE # Parameter name: display_print_pipe # Purpose: Defines command line used for sending output of # DISPLAY UPON PRINTER to (via pipe) # This is very similar to Micro Focus COBPRINTER # Note: Each executed DISPLAY UPON PRINTER statement causes a # new invocation of command-line (= new process start). # Each invocation receives the data referenced in # the DISPLAY statement and is followed by an # end-of-file condition. # COB_DISPLAY_PRINT_FILE, if set, takes precedence # over COB_DISPLAY_PRINT_PIPE. # Alias: COBPRINTER # Type: string # Default: not set # Example: print 'cat >>/tmp/myprt.log' # Environment name: COB_DISPLAY_PRINT_FILE # Parameter name: display_print_file # Purpose: Defines file to be appended to by DISPLAY UPON PRINTER # Note: Each DISPLAY UPON PRINTER opens, appends and closes the file. # Type: string : $$ is replaced by process id # Default: not set # Example: display_printer '/tmp/myprt.log' # Environment name: COB_DISPLAY_PUNCH_FILE # Parameter name: display_punch_file # Purpose: Defines file to be created on first # DISPLAY UPON SYSPUNCH/SYSPCH # Note: The file will be only be closed on runtime exit. # Type: string : $$ is replaced by process id # Default: not set # Example: display_punch './punch_$$.out' # Environment name: COB_LEGACY # Parameter name: legacy # Purpose: keep behavior of former runtime versions, currently only # for setting screen attributes for non input fields # Type: boolean # Default: not set # Example: legacy true # Environment name: COB_EXIT_WAIT # Parameter name: exit_wait # Purpose: to wait on main program exit if an extended screenio # DISPLAY was issued without an ACCEPT following # Type: boolean # Default: true # Example: COB_EXIT_WAIT off # Environment name: COB_EXIT_MSG # Parameter name: exit_msg # Purpose: string to display if COB_EXIT_WAIT is processed, set to '' # if no actual display but an ACCEPT should be done # Type: string # Default: 'end of program, please press a key to exit' (localized) # Example: COB_EXIT_MSG '' # ## Report I/O # # Environment name: COB_COL_JUST_LRC # Parameter name: col_just_lrc # Purpose: If true, then COLUMN defined as LEFT, RIGHT or CENTER # will have the data justified within the field limits # If false, then the data is just copied into the column as is # Type: boolean # Default: TRUE # Example: col_just_lrc True tmt@fiscs-0:~/src/cobol$ cat fnkeys.cob IDENTIFICATION DIVISION. PROGRAM-ID. FNKEYS. * This is the screen demo modified to demonstrate function keys ENVIRONMENT DIVISION. CONFIGURATION SECTION. SPECIAL-NAMES. CRT STATUS IS CRT-STAT CURSOR IS CURSOR-POSITION. DATA DIVISION. WORKING-STORAGE SECTION. 01 CURSOR-POSITION. 02 CURSOR-LINE PIC 99. 02 CURSOR-COL PIC 99. 01 CRT-STAT PIC 9999. * Areas to contain data from forms on the screen. 01 GO-ON. 02 GO-MESSAGE PIC X(55) VALUE "Press a function key? (Press Fkey or press n to finish)". 02 FILLER PIC X. 01 GO-ON-RED. 02 FILLER PIC X(55). 02 GO-ON-REPLY PIC X. SCREEN SECTION. 01 FKEY-FORM. 03 BLANK SCREEN. 03 LINE 1 COLUMN 35 VALUE "Function Key". PROCEDURE DIVISION. INITIALISE-FORM. MOVE SPACES TO CURSOR-POSITION. DISPLAY FKEY-FORM. NEXT-FKEY. MOVE SPACES TO GO-ON-REPLY. DISPLAY GO-ON AT 2401. ACCEPT GO-ON-RED AT 2401 ON EXCEPTION PERFORM CRT-EXCEPTION END-ACCEPT. IF GO-ON-REPLY = "y" OR "Y" GO TO INITIALISE-FORM. IF GO-ON-REPLY = "n" OR "N" STOP RUN. GO TO NEXT-FKEY. CRT-EXCEPTION. DISPLAY CRT-STAT AT 0170. MOVE SPACE TO GO-ON-REPLY. tmt@fiscs-0:~/src/cobol$ tmt@fiscs-0:~/src/cobol$ cobc -x -v fnkeys.cob cobc (GnuCOBOL) 3.1.2.0 Built Jul 18 2021 20:14:17 Packaged Dec 23 2020 12:04:58 UTC C version "9.3.0" loading standard configuration file 'default.conf' command line: cobc -x -v fnkeys.cob preprocessing: fnkeys.cob -> /tmp/cob19826_0.cob return status: 0 parsing: /tmp/cob19826_0.cob (fnkeys.cob) return status: 0 translating: /tmp/cob19826_0.cob -> /tmp/cob19826_0.c (fnkeys.cob) executing: gcc -c -pipe -I/usr/local/include -Wno-unused -fsigned-char -Wno-pointer-sign -o "/tmp/cob19826_0.o" "/tmp/cob19826_0.c" return status: 0 executing: gcc -Wl,--export-dynamic -o "fnkeys" "/tmp/cob19826_0.o" -L/usr/local/lib -lcob -lm return status: 0 tmt@fiscs-0:~/src/cobol$ ./fnkeys libcob: error: codegen error libcob: error: Please report this! tmt@fiscs-0:~/src/cobol$ uname -a Linux fiscs-0 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux tmt@fiscs-0:~/src/cobol$ cat /etc/lsb-release DISTRIB_ID=LinuxMint DISTRIB_RELEASE=20.2 DISTRIB_CODENAME=uma DISTRIB_DESCRIPTION="Linux Mint 20.2 Uma" tmt@fiscs-0:~/src/cobol$ dpkg-query -W -f='${binary:Package} ${Version}\n' *curses* libncurses-dev:amd64 6.2-0ubuntu2 libncurses5:amd64 6.2-0ubuntu2 libncurses5-dev:amd64 6.2-0ubuntu2 libncurses6:amd64 6.2-0ubuntu2 libncursesw5:amd64 6.2-0ubuntu2 libncursesw5-dev libncursesw6:amd64 6.2-0ubuntu2 ncurses-base 6.2-0ubuntu2 ncurses-bin 6.2-0ubuntu2 ncurses-dev ncurses-doc ncurses-runtime pinentry-curses 1.1.0-3build1