Called program file not found in drive/directory.(Visual COBOL 2.1 for RedHat)

I called a native COBOL program in a junit JVM COBOL.(CALL "SS2401" USING SS2401-IN)But when I run the JVM COBOL in
the command line,there is a error.[Called program file not found in drive/directory (173)]
I already set the path of native COBOL up in the $COBPATH,$PATH and $CLASSPATH and runned the cobsetenv script to set up my environment.
And in the path of native COBOL's folder ,there are SS2401.so and SS2401.o files.

Thanks!

**********************************************************************
[root@rhcs32 bin]# java org.junit.runner.JUnitCore junit.SS2401_test
JUnit version 4.8.2
.E.E
Time: 0.157
There were 2 failures:
1) test1(junit.SS2401_test)
com.microfocus.cobol.program.COBOLProgramNotFound: Called program file not found in drive/directory (173) [SS2401]
at com.microfocus.cobol.program.Control.callReturningObject(Unknown Source)
at com.microfocus.cobol.program.Control.call(Unknown Source)
at junit.SS2401_test.test1(SS2401_test.cbl:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
]

Tags:

Parents
  • Verified Answer

    The difficulty might be that you need to use "cobjrun" instead of "java" to invoke the process.  Search the documentation for the keyword "cobjrun".  At one point the documentation says:

    Java/COBOL Application Launcher

    Restriction: This topic applies to UNIX environments (remote

    development) only.

    Restriction: This applies to native code only.

    The Java/COBOL application launcher, cobjrun, is used to launch a Java

    application from a COBOL run-time environment. cobjrun is the trigger

    for cobjrun32 and cobjrun64 and should be used instead of your usual

    Java application launcher as it sets up your environment to correctly

    manage both the COBOL run-time system and the Java Virtual Machine.

    In another section entitled, "Setting Up the Environment for Java and COBOL" (the same section where the "cobsetenv" script is described), it says:

    To run COBOL and Java together, you need to use the Java/COBOL

    application launcher, cobjrun, instead of the java or cobrun triggers.

    To test whether this might be the answer, instead of your original command line:

    java org.junit.runner.JUnitCore junit.SS2401_test

    Try the following command line (where "java" is replaced by "cobjrun"):

    cobjrun org.junit.runner.JUnitCore junit.SS2401_test

Reply
  • Verified Answer

    The difficulty might be that you need to use "cobjrun" instead of "java" to invoke the process.  Search the documentation for the keyword "cobjrun".  At one point the documentation says:

    Java/COBOL Application Launcher

    Restriction: This topic applies to UNIX environments (remote

    development) only.

    Restriction: This applies to native code only.

    The Java/COBOL application launcher, cobjrun, is used to launch a Java

    application from a COBOL run-time environment. cobjrun is the trigger

    for cobjrun32 and cobjrun64 and should be used instead of your usual

    Java application launcher as it sets up your environment to correctly

    manage both the COBOL run-time system and the Java Virtual Machine.

    In another section entitled, "Setting Up the Environment for Java and COBOL" (the same section where the "cobsetenv" script is described), it says:

    To run COBOL and Java together, you need to use the Java/COBOL

    application launcher, cobjrun, instead of the java or cobrun triggers.

    To test whether this might be the answer, instead of your original command line:

    java org.junit.runner.JUnitCore junit.SS2401_test

    Try the following command line (where "java" is replaced by "cobjrun"):

    cobjrun org.junit.runner.JUnitCore junit.SS2401_test

Children
No Data