.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16. .TH COBC "1" "July 2020" "GnuCOBOL 4.0-early-dev.0" "User Commands" .SH NAME cobc \- GnuCOBOL compiler .SH SYNOPSIS .B cobc [\fI\,options\/\fR]... \fI\,file\/\fR... .SH DESCRIPTION GnuCOBOL compiler for most COBOL dialects with lots of extensions .SH OPTIONS .TP \fB\-h\fR, \fB\-help\fR display this help and exit .TP \fB\-V\fR, \fB\-version\fR display compiler version and exit .TP \fB\-i\fR, \fB\-info\fR display compiler information (build/environment) and exit .TP \fB\-v\fR, \fB\-verbose\fR display compiler version and the commands invoked by the compiler .TP \fB\-vv\fR, \fB\-verbose\fR=\fI\,2\/\fR like \fB\-v\fR but additional pass verbose option to assembler/compiler .TP \fB\-vvv\fR, \fB\-verbose\fR=\fI\,3\/\fR like \fB\-vv\fR but additional pass verbose option to linker .TP \fB\-q\fR, \fB\-brief\fR reduced displays, commands invoked not shown .TP \-### like \fB\-v\fR but commands not executed .TP \fB\-x\fR build an executable program .TP \fB\-m\fR build a dynamically loadable module (default) .TP \fB\-j\fR [], \fB\-job[=\fR] run program after build, passing .TP \fB\-std=\fR warnings/features for a specific dialect can be one of: default, cobol2014, cobol2002, cobol85, xopen, ibm\-strict, ibm, mvs\-strict, mvs, mf\-strict, mf, bs2000\-strict, bs2000, acu\-strict, acu, rm\-strict, rm; see configuration files in directory config .TP \fB\-F\fR, \fB\-free\fR use free source format .TP \fB\-fixed\fR use fixed source format (default) .TP \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR enable optimization .TP \fB\-O0\fR disable optimization .TP \fB\-g\fR enable C compiler debug / stack check / trace .TP \fB\-d\fR, \fB\-debug\fR enable all run\-time error checking .TP \fB\-o\fR place the output into .TP \fB\-b\fR combine all input files into a single dynamically loadable module .TP \fB\-E\fR preprocess only; do not compile or link .TP \fB\-C\fR translation only; convert COBOL to C .TP \fB\-S\fR compile only; output assembly file .TP \fB\-c\fR compile and assemble, but do not link .TP \fB\-T\fR generate and place a wide program listing into .TP \fB\-t\fR generate and place a program listing into .TP \fB\-\-tlines=\fR specify lines per page in listing, default = 55 .TP \fB\-P[=\fR] generate preprocessed program listing (.lst) .TP \fB\-Xref\fR generate cross reference through 'cobxref' (V. Coen's 'cobxref' must be in path) .TP \fB\-I\fR add to copy/include search path .TP \fB\-L\fR add to library search path .TP \fB\-l\fR link the library .TP \fB\-A\fR add to the C compile phase .TP \fB\-Q\fR add to the C link phase .TP \fB\-D\fR define for COBOL compilation .TP \fB\-K\fR generate CALL to as static .TP \fB\-conf=\fR user\-defined dialect configuration; see \fB\-std\fR .TP \fB\-list\-reserved\fR display reserved words .TP \fB\-list\-intrinsics\fR display intrinsic functions .TP \fB\-list\-mnemonics\fR display mnemonic names .TP \fB\-list\-system\fR display system routines .TP \fB\-save\-temps[=\fR] save intermediate files * default: current directory .TP \fB\-ext\fR add file extension for resolving COPY .SS "Warning options:" .TP \fB\-W\fR enable all warnings .TP \fB\-Wall\fR enable most warnings (all except as noted below) .TP \fB\-Wno\-\fR disable warning enabled by default, \fB\-W\fR or \fB\-Wall\fR .TP \fB\-Wextra\fR additional warnings only raised with \fB\-W\fR or \fB\-Wall\fR .TP \fB\-Wno\-unfinished\fR do not warn if unfinished features are used * ALWAYS active .TP \fB\-Wno\-pending\fR do not warn if pending features are mentioned * ALWAYS active .TP \fB\-Wobsolete\fR warn if obsolete features are used .TP \fB\-Warchaic\fR warn if archaic features are used .TP \fB\-Wredefinition\fR warn about incompatible redefinition of data items .TP \fB\-Wtruncate\fR warn about field truncation from constant assignments .TP \fB\-Wpossible\-truncate\fR warn about possible field truncation * NOT set with \fB\-Wall\fR .TP \fB\-Woverlap\fR warn about overlapping MOVE of items .TP \fB\-Wpossible\-overlap\fR warn about MOVE of items that may overlap depending on variables * NOT set with \fB\-Wall\fR .TP \fB\-Wparentheses\fR warn about lack of parentheses around AND within OR .TP \fB\-Wstrict\-typing\fR warn strictly about type mismatch .TP \fB\-Wimplicit\-define\fR warn about implicitly defined data items .TP \fB\-Wcorresponding\fR warn about CORRESPONDING with no matching items .TP \fB\-Winitial\-value\fR warn if initial VALUE clause is ignored .TP \fB\-Wprototypes\fR warn about missing FUNCTION prototypes/definitions .TP \fB\-Warithmetic\-osvs\fR warn if arithmetic expression precision has changed .TP \fB\-Wcall\-params\fR warn about non 01/77 items for CALL parameters * NOT set with \fB\-Wall\fR .TP \fB\-Wconstant\-expression\fR warn about expressions that always resolve to true/false .TP \fB\-Wcolumn\-overflow\fR warn about text after program\-text area, FIXED format * NOT set with \fB\-Wall\fR .TP \fB\-Wterminator\fR warn about lack of scope terminator END\-XXX * NOT set with \fB\-Wall\fR .TP \fB\-Wlinkage\fR warn about dangling LINKAGE items * NOT set with \fB\-Wall\fR .TP \fB\-Wunreachable\fR warn about likely unreachable statements * NOT set with \fB\-Wall\fR .TP \fB\-Wno\-dialect\fR do not warn about dialect specific issues * ALWAYS active .TP \fB\-Wothers\fR do not warn about different issues * ALWAYS active .TP \fB\-Wno\-unsupported\fR do not warn if runtime does not support a feature used * NOT set with \fB\-Wall\fR .TP \fB\-Werror\fR treat all warnings as errors .TP \fB\-Werror=\fR treat specified as error .SS "Compiler options:" .TP \fB\-fsign\fR=\fI\,[ASCII\/\fR|EBCDIC] define display sign representation * default: machine native .TP \fB\-ffold\-copy\fR=\fI\,[UPPER\/\fR|LOWER] fold COPY subject to value * default: no transformation .TP \fB\-ffold\-call\fR=\fI\,[UPPER\/\fR|LOWER] fold PROGRAM\-ID, CALL, CANCEL subject to value * default: no transformation .TP \fB\-fdefaultbyte=\fR initialize fields without VALUE to value * decimal 0..255 or any quoted character * default: initialize to picture .TP \fB\-fmax\-errors=\fR maximum number of errors to report before compilation is aborted * default: 128 .TP \fB\-fintrinsics\fR=\fI\,[ALL\/\fR|intrinsic function name(,name,...)] intrinsics to be used without FUNCTION keyword .TP \fB\-fdump=\fR dump data fields on abort, may be a combination of: ALL, WS, LS, RD, FD, SC .TP \fB\-fcallfh=\fR use external provided EXTFH interface module for I/O .TP \fB\-fsqldb=\fR which Database is used, may be MySQL, MSSQL, Oracle10, Oracle11, Oracle12 .TP \fB\-fsqlschema=\fR define database schema name .TP \fB\-fno\-recursive\-check\fR disable check of recursive program call; effectively compiling as RECURSIVE program .TP \fB\-fno\-remove\-unreachable\fR disable remove of unreachable code * turned off by \fB\-g\fR .TP \fB\-finline\-intrinsic\fR when possible resolve intrinsic FUNCTIONs at compile time .TP \fB\-ftrace\fR generate trace code * scope: executed SECTION/PARAGRAPH .TP \fB\-ftraceall\fR generate trace code * scope: executed SECTION/PARAGRAPH/STATEMENTS * turned on by \fB\-debug\fR .TP \fB\-fsyntax\-only\fR syntax error checking only; don't emit any output .TP \fB\-fdebugging\-line\fR enable debugging lines * 'D' in indicator column or floating >>D .TP \fB\-fsource\-location\fR generate source location code * turned on by \fB\-debug\fR/\-g/\-ftraceall .TP \fB\-fimplicit\-init\fR automatic initialization of the COBOL runtime system .TP \fB\-fstack\-check\fR PERFORM stack checking * turned on by \fB\-debug\fR or \fB\-g\fR .TP \fB\-fwrite\-after\fR use AFTER 1 for WRITE of LINE SEQUENTIAL * default: BEFORE 1 .TP \fB\-fmfcomment\fR \&'*' or '/' in column 1 treated as comment * FIXED format only .TP \fB\-facucomment\fR \&'$' in indicator area treated as '*', \&'|' treated as floating comment .TP \fB\-fnotrunc\fR allow numeric field overflow * non\-ANSI behaviour .TP \fB\-fodoslide\fR adjust items following OCCURS DEPENDING * implies \fB\-fcomplex\-odo\fR .TP \fB\-fsingle\-quote\fR use a single quote (apostrophe) for QUOTE * default: double quote .TP \fB\-foptional\-file\fR treat all files as OPTIONAL * unless NOT OPTIONAL specified .TP \fB\-fstatic\-call\fR output static function calls for the CALL statement .TP \fB\-fno\-gen\-c\-decl\-static\-call\fR disable generation of C function declations for subroutines with static CALL .TP \fB\-fmf\-files\fR Sequential & Relative files will match Micro Focus format .TP \fB\-fno\-theaders\fR suppress all headers and output of compilation options from listing while keeping page breaks .TP \fB\-fno\-tsource\fR suppress source from listing .TP \fB\-fno\-tmessages\fR suppress warning and error summary from listing .TP \fB\-ftsymbols\fR specify symbols in listing .TP \fB\-fibmcomp\fR sets \fB\-fbinary\-size\fR=\fI\,2\-4\-8\/\fR \fB\-fsynchronized\-clause\fR=\fI\,ok\/\fR .TP \fB\-fno\-ibmcomp\fR sets \fB\-fbinary\-size\fR=\fI\,1\-\-8\/\fR \fB\-fsynchronized\-clause\fR=\fI\,ignore\/\fR .SS "Compiler dialect configuration options:" .TP \fB\-freserved\-words=\fR use of complete/fixed reserved words .TP \fB\-ftab\-width\fR=\fI\,1\/\fR..12 set number of spaces that are assumed for tabs .TP \fB\-ftext\-column\fR=\fI\,72\/\fR..255 set right margin for source (fixed format only) .TP \fB\-fpic\-length=\fR maximum number of characters allowed in the PICTURE character\-string .TP \fB\-fword\-length\fR=\fI\,1\/\fR..63 maximum word\-length for COBOL (= programmer defined) words .TP \fB\-fliteral\-length=\fR maximum literal size in general .TP \fB\-fnumeric\-literal\-length\fR=\fI\,1\/\fR..38 maximum numeric literal size .TP \fB\-falign\-record\fR=\fI\,0\/\fR..256 align WORKING\-STORAGE/LOCAL\-STORAGE record on boundary .TP \fB\-falign\-opt\fR align like MF OPT, Default: false (Like MF ALIGN=FIXED) .TP \fB\-fbinary\-size=\fR binary byte size \- defines the allocated bytes according to PIC, may be one of: 2\-4\-8, 1\-2\-4\-8, 1\-\-8 .TP \fB\-fbinary\-byteorder=\fR binary byte order, may be one of: native, big\-endian .TP \fB\-fassign\-clause=\fR how to interpret 'ASSIGN word': as 'ASSIGN EXTERNAL word' or 'ASSIGN DYNAMIC word' .TP \fB\-fscreen\-section\-rules=\fR which compiler's rules to apply to SCREEN SECTION item clauses .TP \fB\-ffilename\-mapping\fR resolve file names at run time using environment variables. .TP \fB\-fpretty\-display\fR alternate formatting of numeric fields .TP \fB\-fbinary\-truncate\fR numeric truncation according to ANSI .TP \fB\-fcomplex\-odo\fR allow complex OCCURS DEPENDING ON .TP \fB\-findirect\-redefines\fR allow REDEFINES to other than last equal level number .TP \fB\-flarger\-redefines\-ok\fR allow larger REDEFINES items .TP \fB\-frelax\-syntax\-checks\fR allow certain syntax variations (e.g. REDEFINES position) .TP \fB\-frelax\-level\-hierarchy\fR allow non\-matching level numbers .TP \fB\-fsticky\-linkage\fR LINKAGE\-SECTION items remain allocated between invocations .TP \fB\-fmove\-ibm\fR MOVE operates as on IBM (left to right, byte by byte), otherwise no propagating move .TP \fB\-fperform\-osvs\fR exit point of any currently executing perform is recognized if reached .TP \fB\-farithmetic\-osvs\fR limit precision in intermediate results to precision of final result (less accurate) .TP \fB\-fconstant\-folding\fR evaluate constant expressions at compile time .TP \fB\-fhostsign\fR allow hexadecimal value 'F' for NUMERIC test of signed PACKED DECIMAL field .TP \fB\-fprogram\-name\-redefinition\fR program names don't lead to a reserved identifier .TP \fB\-faccept\-update\fR set WITH UPDATE clause as default for ACCEPT dest\-item, instead of WITH NO UPDATE .TP \fB\-faccept\-auto\fR set WITH AUTO clause as default for ACCEPT dest\-item, instead of WITH TAB .TP \fB\-fconsole\-is\-crt\fR assume CONSOLE IS CRT if not set otherwise .TP \fB\-fno\-echo\-means\-secure\fR NO\-ECHO hides input with asterisks like SECURE .TP \fB\-fline\-col\-zero\-default\fR assume a field DISPLAY starts at LINE 0 COL 0 (i.e. at the cursor), not LINE 1 COL 1 .TP \fB\-freport\-column\-plus\fR in a REPORT COLUMN may have PLUS num, + num, or +num .TP \fB\-fdisplay\-special\-fig\-consts\fR special behaviour of DISPLAY SPACE/ALL X'01'/ALL X'02'/ALL X'07' .TP \fB\-fbinary\-comp\-1\fR COMP\-1 is a 16\-bit signed integer .TP \fB\-fmove\-non\-numeric\-lit\-to\-numeric\-is\-zero\fR imply zero in move of non\-numeric literal to numeric items .HP \fB\-fimplicit\-assign\-dynamic\-var\fR implicitly define a variable if an ASSIGN DYNAMIC does not match any data item .TP \fB\-fcomment\-paragraphs=\fR comment paragraphs in IDENTIFICATION DIVISION (AUTHOR, DATE\-WRITTEN, ...) .TP \fB\-fmemory\-size\-clause=\fR MEMORY\-SIZE clause .HP \fB\-fmultiple\-file\-tape\-clause=\fR MULTIPLE\-FILE\-TAPE clause .TP \fB\-flabel\-records\-clause=\fR LABEL\-RECORDS clause .TP \fB\-fvalue\-of\-clause=\fR VALUE\-OF clause .TP \fB\-fdata\-records\-clause=\fR DATA\-RECORDS clause .TP \fB\-ftop\-level\-occurs\-clause=\fR OCCURS clause on top\-level .TP \fB\-fsame\-as\-clause=\fR SAME AS clause .TP \fB\-fsynchronized\-clause=\fR SYNCHRONIZED clause .TP \fB\-fsync\-left\-right=\fR LEFT/RIGHT phrases in SYNCHRONIZED clause .TP \fB\-fspecial\-names\-clause=\fR SPECIAL\-NAMES clause .TP \fB\-fgoto\-statement\-without\-name=\fR GOTO statement without name .TP \fB\-fstop\-literal\-statement=\fR STOP\-literal statement .HP \fB\-fstop\-identifier\-statement=\fR STOP\-identifier statement .TP \fB\-fdebugging\-mode=\fR DEBUGGING MODE and debugging indicator .HP \fB\-fuse\-for\-debugging=\fR USE FOR DEBUGGING .TP \fB\-fpadding\-character\-clause=\fR PADDING CHARACTER clause .TP \fB\-fnext\-sentence\-phrase=\fR NEXT SENTENCE phrase .TP \fB\-flisting\-statements=\fR listing\-directive statements EJECT, SKIP1, SKIP2, SKIP3 .TP \fB\-ftitle\-statement=\fR listing\-directive statement TITLE .TP \fB\-fentry\-statement=\fR ENTRY statement .TP \fB\-fmove\-noninteger\-to\-alphanumeric=\fR move noninteger to alphanumeric .HP \fB\-foccurs\-max\-length\-without\-subscript\fR occurs max length without subscript .TP \fB\-flength\-in\-data\-division\fR length in data division .TP \fB\-fmove\-figurative\-constant\-to\-numeric=\fR move figurative constants to numeric .TP \fB\-fmove\-figurative\-space\-to\-numeric=\fR move figurative constant SPACE to numeric .TP \fB\-fmove\-figurative\-quote\-to\-numeric=\fR move figurative constant QUOTE to numeric .TP \fB\-fodo\-without\-to=\fR OCCURS DEPENDING ON without to .TP \fB\-fsection\-segments=\fR section segments .TP \fB\-falter\-statement=\fR ALTER statement .TP \fB\-fcall\-overflow=\fR OVERFLOW clause for CALL .TP \fB\-fnumeric\-boolean=\fR boolean literals (B'1010') .TP \fB\-fhexadecimal\-boolean=\fR hexadecimal\-boolean literals (BX'A') .HP \fB\-fnational\-literals=\fR national literals (N'UTF\-16 string') .TP \fB\-fhexadecimal\-national\-literals=\fR hexadecimal\-national literals (NX'265E') .TP \fB\-fnational\-character\-literals=\fR non\-standard national literals (NC'UTF\-16 string') .HP \fB\-fhp\-octal\-literals=\fR HP COBOL octal literals (%377) .TP \fB\-facu\-literals=\fR ACUCOBOL\-GT literals (#B #O #H #X) .HP \fB\-fword\-continuation=\fR continuation of COBOL words .TP \fB\-fnot\-exception\-before\-exception=\fR NOT ON EXCEPTION before ON EXCEPTION .HP \fB\-faccept\-display\-extensions=\fR extensions to ACCEPT and DISPLAY .TP \fB\-frenames\-uncommon\-levels=\fR RENAMES of 01\-, 66\- and 77\-level items .HP \fB\-fsymbolic\-constant=\fR constants defined in SPECIAL\-NAMES .TP \fB\-fconstant\-78=\fR constant with level 78 item (note: has left to right precedence in expressions) .TP \fB\-fconstant\-01=\fR constant with level 01 CONSTANT AS/FROM item .TP \fB\-fperform\-varying\-without\-by=\fR PERFORM VARYING without BY phrase (implies BY 1) .TP \fB\-freference\-out\-of\-declaratives=\fR references to sections not in DECLARATIVES from within DECLARATIVES .TP \fB\-freference\-bounds\-check=\fR reference modification strict bounds check .TP \fB\-fprogram\-prototypes=\fR CALL/CANCEL with program\-prototype\-name .TP \fB\-fcall\-convention\-mnemonic=\fR specifying call\-convention by mnemonic .TP \fB\-fcall\-convention\-linkage=\fR specifying call\-convention by WITH ... LINKAGE .TP \fB\-fnumeric\-value\-for\-edited\-item=\fR numeric literals in VALUE clause of numeric\-edited items .TP \fB\-fincorrect\-conf\-sec\-order=\fR incorrect order of CONFIGURATION SECTION paragraphs .HP \fB\-fdefine\-constant\-directive=\fR allow >> DEFINE CONSTANT var AS literal .TP \fB\-ffree\-redefines\-position=\fR REDEFINES clause not following entry\-name in definition .TP \fB\-frecords\-mismatch\-record\-clause=\fR record sizes does not match RECORD clause .TP \fB\-frecord\-delimiter=\fR RECORD DELIMITER clause .TP \fB\-fsequential\-delimiters=\fR BINARY\-SEQUENTIAL and LINE\-SEQUENTIAL phrases in RECORD DELIMITER .TP \fB\-frecord\-delim\-with\-fixed\-recs=\fR RECORD DELIMITER clause on file with fixed\-length records .HP \fB\-fmissing\-statement=\fR missing statement (e.g. empty IF / PERFORM) .TP \fB\-fzero\-length\-literals=\fR zero\-length literals, e.g. '' and "" .TP \fB\-fxml\-generate\-extra\-phrases=\fR XML GENERATE's phrases other than COUNT IN .TP \fB\-fcontinue\-after=\fR AFTER phrase in CONTINUE statement .TP \fB\-fgoto\-entry=\fR ENTRY FOR GOTO and GOTO ENTRY statements .TP \fB\-fdepending\-on\-not\-fixed=\fR depending\-on\-not\-fixed .TP \fB\-fbinary\-sync\-clause=\fR BINARY\-SHORT/LONG/DOUBLE SYNCHRONIZED clause .TP \fB\-fnonnumeric\-with\-numeric\-group\-usage=\fR Non\-numeric item with numeric group USAGE clause .TP \fB\-fassign\-variable=\fR ASSIGN [TO] variable in SELECT .TP \fB\-fassign\-using\-variable=\fR ASSIGN USING/VARYING variable in SELECT .TP \fB\-fassign\-ext\-dyn=\fR ASSIGN EXTERNAL/DYNAMIC in SELECT .TP \fB\-fassign\-disk\-from=\fR ASSIGN DISK FROM variable in SELECT .IP where is one of the following: \&'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error', 'unconformable' .TP \fB\-fnot\-reserved=\fR word to be taken out of the reserved words list .TP \fB\-freserved=\fR word to be added to reserved words list .TP \fB\-freserved=\fR: word to be added to reserved words list as alias .TP \fB\-fnot\-register=\fR special register to disable .TP \fB\-fregister=\fR special register to enable .SH AUTHOR Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart Built Jul 12 2020 03:26:15 Packaged Jun 06 2020 20:56:36 UTC C version "9.3.0" .SH "REPORTING BUGS" Report bugs to: bug\-gnucobol@gnu.org or (preferably) use the issue tracker via the home page. .br GnuCOBOL home page: .br General help using GNU software: .SH COPYRIGHT Copyright \(co 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" The full documentation for .B cobc is maintained as a Texinfo manual. If the .B info and .B cobc programs are properly installed at your site, the command .IP .B info gnucobol .PP should give you access to the complete manual.