I am trying to use a JZOS based batch job to schedule ant based processing. The build.xml uses some relative pathnames, assuming that the current directory is set prior to invoking ant. I have tried issuing cd <directory> from the STDENV file, but that does not accomplish what I need. Is there a way to set the current working directory context prior to invoking the Java program specified in the JAVACLS parameter?
You can try adding -Duser.dir=<directory> as a JVM option in your JCL. This will set the user.dir system property at the time of JVM invocation. It may work for what you are trying to do. Then again, it may not
For ANT, the ${basedir} variable is used as the relative directory.
By default, basedir is set to the directory containing the ant script, but you can override it by setting -Dbasedir=