I haven’t verified this but I think you can reference the file in Java using this convention for the file name from USS and not have to run in an STC. I’ll try this later tonight but thought I’d offer it unverified if you have time. Concur with Jerry on encoding.
"//‘hlq.my.mvs.filename'" If you’re interested in z/OS specific capabilities via Java on the platform look here: https://www.ibm.com/support/knowledgecenter/en/SSYKE2_7.1.0/com.ibm.java.zsecurity.api.71.doc/com.ibm.jzos/index.html Matt Hogstrom [email protected] PGP Key: 0x90ECB270 "Aut Inveniam Viam Aut Faciam" translated - "I shall either find a way or make one." The phrase has been attributed to Hannibal <http://en.wikipedia.org/wiki/Hannibal>; when his generals told him it was impossible to cross the Alps by elephant <http://en.wikipedia.org/wiki/Second_Punic_War>, > On Jan 10, 2019, at 4:35 PM, Edgington, Jerry > <[email protected]> wrote: > > > No you don't need to copy the file to USS, if you are running a Java batch > job. JCL something like this, which executes the JVM procedure, in this case > Java 1.8 64bit. The STDENV DD will need the environment variables, like > LIBPATH, CLASSPATH, Java Options,etc. > > //JAVA EXEC PROC=JVMPRC86, > // REGSIZE='1024M', > // JAVACLS='-jar "directory path"/"name of Java program compiled".jar' > //* > //MAINARGS DD DUMMY > //STDENV DD * > export PATH=/bin:"${JAVA_HOME}"/bin > LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin > LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390x > LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390x/j9vm > export LIBPATH="$LIBPATH": > CLASSPATH=$CLASSPATH:${JAVA_HOME}"/lib:"${JAVA_HOME}"/lib/ext > export CLASSPATH="$CLASSPATH": > # Configure JVM options > IJO="-Xms16m -Xmx128m" > > As far as encoding, you will need to in account for that in your Java program > during the read. > > Hope that helps. Also, the OMVS segment is a RACF term for the security > definitions when you access USS either via 3270 or something like SSH. > > Jerry > > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] On > Behalf Of Cameron Conacher > Sent: Thursday, January 10, 2019 4:11 PM > To: [email protected] > Subject: Do I need to copy a mainframe flat file to OMVS, before I access the > data from a JAVA program? > > Hello Listers, > If I have created a flat file in some mainframe batch JOB, and I want to pass > it through a JAVA Utility, do I need to copy the file first to my OMVS > segment, and the run my JAVA process? > Or can I directly access the EBCDIC encoded flat file by my JAVA process? > > Just starting down this path. > Not really sure where I am going with this yet, or what I will do when I get > there. > > Thank > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send email to > [email protected] with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
