HP OpenVMS Systems

ask the wizard
Content starts here

Java r.exec, Error Codes, File Specs?

» close window

The Question is:

I have VMS version 8.2 on Itanium machine. ( I cannot post question when I
 enter select Other for cpu and OpenVMS version)
When using the following code snippet to execute from within  Java I receive an
 Exception message with the following error message:
Error: Could not launch TESTJOB. Message is :Child creation error: error
 100052. VMS error code: error 100052
import java.lang.*;
public class Example1
	public static void main(String args[])
		int ExitCode=0;
			Runtime r = Runtime.getRuntime();
			System.out.println("Executing TESTJOB");
			Process p =
			ExitCode = p.waitFor();
		catch (Exception ex)
			System.out.println("Error: Could not launch TESTJOB.
 Error Message is :" + ex.getMessage());

The Answer is :

  For translating an error value into text, you can use the following:
    $ x=f$message(100052)
    $ show symbol x
      X = "%RMS-F-SYN, file specification syntax error"
  The format, content and structure of a condition value are documented
  in the OpenVMS documentation set.  The structure and operation of a
  condition value are of central interest to all OpenVMS programmers,
  of course.
  The specification to TESTJOB is somewhat unusual, as the OpenVMS
  Wizard would expect to see:
  rather than:
  When logical names are available, their use is prefered over use of
  physical device names and of explicit system-specific root directories.
  When logical names are not available, the OpenVMS Wizard would create
  the necessary logical names; the Wizard would avoid the inclusion of
  physical device or directory specifications in any application code.
  Also please look at the documentation for the Java r.exec mechanism,
  as it is not a direct analog for the OpenVMS RTL lib$spawn call nor
  the C system call; r.exec has assumptions around the filename.  In
  particular, the r.exec specification expects a filename, and not a
  DCL command.

answer written or last revised on ( 3-NOV-2004 )

» close window