Problem using java with cobol



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/ =-

.



Relevant Pages

  • Re: Cobol2Java 2.0 --- COBOL to Java Source Code Translator
    ... The good news is that there refactoring tools for object-oriented code. ... > TAL> translates one COBOL statement into one and exactly one Java ... > And the COBOL program is easier to read... ... > Der Mann machte sehr viel Wind. ...
    (comp.lang.cobol)
  • java calling cobol
    ... cobol program from java using IBM toolbox for java. ... i cannot get to the next lines of java code. ...
    (comp.sys.ibm.as400.misc)
  • Re: MF having issues?
    ... I've heard from Java advocates that because it's very common in Java to write a program in which you create and quickly throw away objects, many implementations of Java are heavily optimized for this kind of usage. ... I've read some articles about garbage collection algorithms -- generative garbage collectors do in fact keep track of "how old" objects are, and do some optimizations to be able to quickly recycle younger objects -- so I can confirm that a lot of thought was actually put into the issue. ... I suspect, all other things being equal the COBOL program would be easier to understand, COBOL being much more verbose than Java. ...
    (comp.lang.cobol)
  • Problem using cobol with java
    ... I need to pass parameter to a cobol program with I start from a java program. ... And this is the cobol program to which i want to pass 1 parameter (String value) ... PROCEDURE DIVISION USING by value param1. ...
    (comp.lang.java.programmer)