Title: How do I generate an executable for deployment?

Question:

My application deployment environment assumes that the COBOL main programs are native executables. I understand that with isCOBOL the COBOL main programs are Java classes. It is not feasible for me to change my deployment architecture to require object-orientation, execution from within a Java application, application server or Java-enabled server. My COBOL application depends on there being a native executable for each COBOL main program.

Is there a solution for this problem?

Answer:

The answer is yes! The vast majority of Veryant's customers have this same requirement since their applications were written for COBOL compilers that produced native executables.

To solve this problem, Veryant's COBOL compiler produces Java classes that have a "main" entry-point that takes command-line style arguments just the same as other COBOL compilers.

Fortunately, whether running Linux, UNIX or Windows, the operating system and system functions can execute shell scripts or batch files exactly as if they were native executables.

For example, the command-line to execute a COBOL program named PRG00001 is java PRG00001. On Linux/UNIX/Windows it is possible to create a shell script or batch file to execute this program using only the program name by creating a file named PRG00001 on Linux/UNIX or PRG00001.bat on Windows with the following contents:

On Linux/UNIX:

java PRG00001 $*

On Windows:

java PRG00001 %*

Any arguments passed on the command line after the executable name will be received by the COBOL program in the normal manner.

On Linux/UNIX you can enable a text file as an executable script using the command chmod +x filename.

On Windows the file extensions .bat or .cmd indicate that the file is an executable.

See also:

What are the minimum files I need for a runtime-only installation? How do I create a launcher?

How can I package my application and execute it in a JAR file?

How do I create a desktop shortcut icon to launch my program?

Authored by: Veryant Support on Mon, Mar 14th, 2011 at 7:00 PM
This question has been viewed 5581 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=166

Powered by PHPKB Knowledge Base Software