Problem using cobol with java

A

awosy

Hey

I need to pass parameter to a cobol program with I start from a java program.
I was able to run an cobol program that doesn't use parameters already but i'm stuck now

this is my java code i use to run a cobol program that doesn't need parameters

public class TestRunCobol
{
private static ShowText txtProg;

public static void main(String[] args)
{
txtProg = new ShowText();
txtProg.run();
}
}

And this is the cobol program to which i want to pass 1 parameter (String value)

IDENTIFICATION DIVISION.
PROGRAM-ID. ShowText.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 break pic x.
LINKAGE SECTION.
01 param1 object reference "java.lang.String".
PROCEDURE DIVISION USING by value param1.
Main.
Display "Parameter passed: " param1
accept break from console
Stop run.

can somebody tell me what i have to do in my java code to pass the String value?


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-
 
T

Thomas Weidenfeller

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top