[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] Small addition for OpenCOBOL Programmers Guide
From: |
vince |
Subject: |
Re: [open-cobol-list] Small addition for OpenCOBOL Programmers Guide |
Date: |
Tue, 10 Apr 2012 23:39:22 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.33.7-server-2mnb; KDE/4.4.5; i686; ; ) |
On Tuesday 10 Apr 2012 22:15:49 john Culleton wrote:
> > > vince <address@hidden> wrote:
> > > > '/' are not an accepted character, which is used to eject page on
> > > > printing and as the compiler does not really produce full
> > > > reporting (other than via the -P flag) it would not get used so
> > > > sounds reasonable that it is not liked :)
> > >
> > > I am as usual confused. Is the -P flag valid for Open Cobol? It
> > > doesn't work for me.
> >
> > hmm.let see:
> >
> > -----------------
> > address@hidden common]$ ls -la sys002.*
> > -rw-r--r-- 1 vince vince 96427 2012-04-09 23:37 sys002.cbl
> > address@hidden common]$ cobc -m -P sys002.cbl
> > address@hidden common]$ ls -la sys002.*
> > -rw-r--r-- 1 vince vince 96427 2012-04-09 23:37 sys002.cbl
> > -rw-r--r-- 1 vince vince 120017 2012-04-10 21:48 sys002.lst
> > -rwxr-xr-x 1 vince vince 178075 2012-04-10 21:48 sys002.so*
> > -----------------
> >
> > Works here.
>
> My results:
> Bash-4.1$ cobc -P -x -fixed hello.cbl
> cobc: unrecognized option '-P'
Sorry for delay, trying to compile some modules for DB2 with OC but having
problems (not with OC but before in the cycle).
OK, back to your problem. type running 'cobc -x -P hello.cbl', eg without '-
free' as that's the default but take note of the command order as that works
for me.
If that fails as before, then see what 'cobc -h' produces hopefully something
like this (but you may find some very small differences but note them!):
------------------------
address@hidden cobol_mf]$ cobc -h
Usage: cobc [options] file ...
Options:
-help Display this message
-version, -V Display compiler version
-info, -i Display compiler build information
-v Display the commands invoked by the compiler
-x Build an executable program
-m Build a dynamically loadable module (default)
-std=<dialect> Warnings/features for a specific dialect :
cobol2002 Cobol 2002
cobol85 Cobol 85
ibm IBM Compatible
mvs MVS Compatible
bs2000 BS2000 Compatible
mf Micro Focus Compatible
default When not specified
See config/default.conf and config/*.conf
-free Use free source format
-fixed Use fixed source format (default)
-O, -O2, -Os Enable optimization
-g Enable C compiler debug / stack check / trace
-debug Enable all run-time error checking
-o <file> Place the output into <file>
-b Combine all input files into a single
dynamically loadable module
-E Preprocess only; do not compile or link
-C Translation only; convert COBOL to C
-S Compile only; output assembly file
-c Compile and assemble, but do not link
-P(=<dir or file>) Generate preprocessed program listing (.lst)
-Xref Generate cross reference through 'cobxref'
(V. Coen's 'cobxref' must be in path)
-I <directory> Add <directory> to copy/include search path
-L <directory> Add <directory> to library search path
-l <lib> Link the library <lib>
-A <options> Add <options> to the C compile phase
-Q <options> Add <options> to the C link phase
-D <define> DEFINE <define> to the COBOL compiler
-K <entry> Generate CALL to <entry> as static
-conf=<file> User defined dialect configuration - See -std=
-list-reserved Display reserved words
-list-intrinsics Display intrinsic functions
-list-mnemonics Display mnemonic names
-list-system Display system routines
-save-temps(=<dir>) Save intermediate files
- Default : current directory
-ext <extension> Add default file extension
-W Enable ALL warnings
-Wall Enable all warnings except as noted below
-Wobsolete Warn if obsolete features are used
-Warchaic Warn if archaic features are used
-Wredefinition Warn incompatible redefinition of data items
-Wconstant Warn inconsistent constant
-Woverlap Warn overlapping MOVE items
-Wparentheses Warn lack of parentheses around AND within OR
-Wstrict-typing Warn type mismatch strictly
-Wimplicit-define Warn implicitly defined data items
-Wcorresponding Warn CORRESPONDING with no matching items
-Wexternal-value Warn EXTERNAL item with VALUE clause
-Wcall-params Warn non 01/77 items for CALL params
- NOT set with -Wall
-Wcolumn-overflow Warn text after column 72, FIXED format
- NOT set with -Wall
-Wterminator Warn lack of scope terminator END-XXX
- NOT set with -Wall
-Wtruncate Warn possible field truncation
- NOT set with -Wall
-Wlinkage Warn dangling LINKAGE items
- NOT set with -Wall
-Wunreachable Warn unreachable statements
- NOT set with -Wall
-fsign=<value> Define display sign representation
- ASCII or EBCDIC (Default : machine native)
-ffold-copy=<value> Fold COPY subject to value
- UPPER or LOWER (Default : no transformation)
-ffold-call=<value> Fold PROGRAM-ID, CALL, CANCEL subject to value
- UPPER or LOWER (Default : no transformation)
-fdefaultbyte=<value> Initialize fields without VALUE to decimal value
- 0 to 255 (Default : initialize to picture)
-fintrinsics=<value> Intrinsics to be used without FUNCTION keyword
- ALL or intrinsic function name (,name,...)
-ftrace Generate trace code
- Executed SECTION/PARAGRAPH
-ftraceall Generate trace code
- Executed SECTION/PARAGRAPH/STATEMENTS
- Turned on by -debug
-fsyntax-only Syntax error checking only; don't emit any output
-fdebugging-line Enable debugging lines
- 'D' in indicator column or floating >>D
-fsource-location Generate source location code
- Turned on by -debug/-g/-ftraceall
-fimplicit-init Automatic initialization of the Cobol runtime system
-fstack-check PERFORM stack checking
- Turned on by -debug or -g
-fsyntax-extension Allow syntax extensions
- eg. Switch name SW1, etc.
-fwrite-after Use AFTER 1 for WRITE of LINE SEQUENTIAL
- Default : BEFORE 1
-fmfcomment '*' or '/' in column 1 treated as comment
- FIXED format only
-fnotrunc Allow numeric field overflow
- Non-ANSI behaviour
-fodoslide Adjust items following OCCURS DEPENDING
- Requires implicit/explicit relaxed syntax
-fsingle-quote Use a single quote (apostrophe) for QUOTE
- Default : double quote
-frecursive-check Check recursive program call
-frelax-syntax Relax syntax checking
- eg. REDEFINES position
-foptional-file Treat all files as OPTIONAL
- unless NOT OPTIONAL specified
------------------------
Vince
Re: [open-cobol-list] Small addition for OpenCOBOL Programmers Guide, Fred Mobach, 2012/04/11