Skip to content

Command Line Interface

Benjamin Collard edited this page May 18, 2018 · 19 revisions

Command Line Interface (TypeCobol.CLI)

List of parameters

name(min) name needed ? args needed ?(=*) global Default handeled description
i input Y {PATH}(s) Y Missing, Bad Paths + Folders {PATH} to an input file to parse. This option can be specified more than once
o output N {PATH}(s)(cr) Y Missing & Count(if ets=5) CanCreate {PATH} to an ouput file where to generate code. This option can be specified more than once
d diagnostics N {PATH}(cr) Y CanCreateFile {PATH} to the error diagnostics file
s skeletons N (Y if ets=5) {PATH} Y Missing (if ets=5) Bad Path {PATH} to the skeletons file
a autoremarks N ---- Y Enable automatic remarks creation while parsing and generating Cobol
hc haltonmissingcopy N {PATH}(cr) Y CanCreateFile HaltOnMissing Copy will generate a file to list all the absent copies
ets exectostep N [0-5] strings Y Generate(5) Match[0-5]
e encoding N "rdz" "zos" "utf8" Y rdz
y intrinsic N {PATH}(s) Y Bad Paths + Folders {PATH} to intrinsic definitions to load. This option can be specified more than once
c copies N {PATH}(s) Y Bad Paths + Folders Folder where COBOL copies can be found. This option can be specified more than once
dp dependencies N {PATH}(s) Y Bad Paths + Folders Path to folder containing programs to load and to use for parsing a generating the input program
t telemetry N ---- Y If set to true telemetry will send automatic email in case of bug and it will provide to TypeCobol Team data on your usage
md maximumdiagnostics N int Y Parsable to int Wait for an int value that will represent the maximum number of diagnostics that TypeCobol have to return
f outputFormat N "0" "1" strings Y Cobol85
ec expandingcopy N {PATH}(cr) Y CanCreateFile Generate a file with all COPY directives expanded in the source code. This option will be executed if the Preprocessor step is enabled.
exc extractusedcopy N {PATH}(cr) Y CanCreateFile Generate a file with all COPIES detected by the parser
k startServer N "hidden" N NormalWindow Start the server if not already started, and executes commandline. By default the server is started in window mode '{hidden}' hide the window.
1 once N ---- N Parse one set of files and exit. If present, this option does NOT launch the server.
h help N ---- N Output a usage message and exit.
V version N ---- N Output the version number of " + PROGNAME + " and exit.
p pipename N string N TypeCobol.Server Pipename used if running as server. Default: "TypeCobol.Server"

Examples

Parse a TypeCobol file and generate it

TypeCobol.CLI.exe -1 -i PGM1.tcbl -o PGM1.cbl -e rdz -d error.txt -s config\skeletons.xml

Parse a TypeCobol file that use a set of COPY and generate it

TypeCobol.CLI.exe -1 -i PGM1.tcbl -o PGM1.cbl -e rdz -d error.txt -s config\skeletons.xml -c .\copyFolder

Get the list of COPY missing to parse a (Type)Cobol file

TypeCobol.CLI.exe -1 -i PGM1.cbl -o PGM1.out.cbl -e rdz -d error.txt --haltonmissingcopy=MissingCopy.txt --exectostep=Preprocessor

--haltonmissingcopy=MissingCopy.txt will tell the parser to write all missing COPY into file "MissingCopy.txt" and to stop after preprocessor phase.

--exectostep=Preprocessor if no copy are missing, this parameter make sure the parser only execute to phase Preprocessor.

Clone this wiki locally