Cameron,

wou can then use the ZFile class (see 
https://www.ibm.com/support/knowledgecenter/en/SSYKE2_7.0.0/com.ibm.java.zsecurity.api.70.doc/com.ibm.jzos/com/ibm/jzos/ZFile.html)
 and open the DD with "//DD:MYFILE"...


Bye,
Michael



Mit freundlichen Grüßen

Michael Knigge
Software Engineer

SET GmbH
Lister Straße 15
30163 Hannover

phone: +49 511 39780-23
fax: +49 511 39780-65

www.set.de
[email protected]

Handelsregister: Amtsgericht Hannover HRB 52778
Geschäftsführer: Tobias Baum, Arthur Brack, Hendrik Leder
-----Ursprüngliche Nachricht-----
Von: IBM Mainframe Discussion List [mailto:[email protected]] Im Auftrag 
von Cameron Conacher
Gesendet: Donnerstag, 10. Januar 2019 23:50
An: [email protected]
Betreff: Re: Do I need to copy a mainframe flat file to OMVS, before I access 
the data from a JAVA program?

Thank you Jerry.
Do I simply add a normal DD statement identifying my file?

//MYFILE DD DSN=HLQ.MYFILE,DISP=OLD



On Thu, Jan 10, 2019 at 4:42 PM Matt Hogstrom <[email protected]> wrote:

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

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

Reply via email to