Ho capito. Non conoscevo i comandi. Grazie!
Ho comunque girato un po’ nell’ambiente web di open-cobol ed ho trovato http://www.opencobol.altervista.org/. Da lì ho anche potuto scorrere altre notizie su come eseguire una compilazione o l’esecuzione di un programma. Non ho capito se sia possibile accedere ad un editor suo per la scrittura di un codice sorgente, o per lo meno, non mi pare che ci sia un editor specifico come un suo proprio IDE, a parte quello messo a disposizione da Eclipse, ma può essere usato benissimo anche gedit. Nel sito indicato sopra ho letto della presenza di una GUI.
Tornando alla compilazione, una volta scritto un certo codice sorgente, la compilazionedovrebbe partrire con $ cobc nome-file-programma-sorgente
Per ora mi sono limitato a
[pierfed181@localhost ~]$ cobc -h
Usage: cobc [options] file...
Options:
--help Display this message
--version, -V Display compiler version
-v Display the programs invoked by the compiler
-x Build an executable program
-m Build a dynamically loadable module (default)
-std=<dialect> Compile 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 Produce debugging information in the output
-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, assemble or link
-C Translation only; convert COBOL to C
-S Compile only; output assembly file
-c Compile and assemble, but do not link
-t <file> Generate and place a program listing into <file>
-I <directory> Add <directory> to copy/include search path
-L <directory> Add <directory> to library search path
-l <lib> Link the library <lib>
-D <define> Pass <define> to the C compiler
-conf=<file> User defined dialect configuration - See -std=
--list-reserved Display reserved words
--list-intrinsics Display intrinsic functions
--list-mnemonics Display mnemonic names
-save-temps(=<dir>) Save intermediate files (default current directory)
-MT <target> Set target file used in dependency list
-MF <file> Place dependency list into <file>
-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
-Wparentheses Warn lack of parentheses around AND within OR
-Wstrict-typing Warn type mismatch strictly
-Wimplicit-define Warn implicitly defined data items
-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)
-ftrace Generate trace code (Executed SECTION/PARAGRAPH)
-ftraceall Generate trace code (Executed SECTION/PARAGRAPH/STATEMENTS)
-fsyntax-only Syntax error checking only; don't emit any output
-fdebugging-line Enable debugging lines ('D' in indicator column)
-fsource-location Generate source location code (Turned on by -debug or -g)
-fimplicit-init Do automatic initialization of the Cobol runtime system
-fsign-ascii Numeric display sign ASCII (Default on ASCII machines)
-fsign-ebcdic Numeric display sign EBCDIC (Default on EBCDIC machines)
-fstack-check PERFORM stack checking (Turned on by -debug or -g)
-ffold-copy-lower Fold COPY subject to lower case (Default no transformation)
-ffold-copy-upper Fold COPY subject to upper case (Default no transformation)
-fnotrunc Do not truncate binary fields according to PICTURE
-ffunctions-all Allow use of intrinsic functions without FUNCTION keyword
-fmfcomment '*' or '/' in column 1 treated as comment (FIXED only)
-fnull-param Pass extra NULL terminating pointers on CALL statements
[pierfed181@localhost ~]$ cobc -V
cobc (OpenCOBOL) 1.1.0
Copyright (C) 2001-2009 Keisuke Nishida / Roger While
Built Sep 01 2013 08:47:55
Packaged Feb 06 2009 10:30:55 CET
[pierfed181@localhost ~]$ cobcrun --help
Usage: cobcrun PROGRAM [param ...]
or : cobcrun --help (-h)
Print this help
or : cobcrun --version (-V)
Print version information
[pierfed181@localhost ~]$ cobcrun --version
cobcrun (OpenCOBOL) 1.1.0
Copyright (C) 2004-2009 Roger While
Built Sep 01 2013 08:47:58
Packaged Feb 06 2009 10:30:55 CET
[pierfed181@localhost ~]$
Ancora grazie!
http://image.forumfree.it/1/0/0/4/2/7/8/1/1379540471.gif