Agree, I'd forgotten BPXBATCH STDOUT and ERR can now can be sent to SYSOUT. Wasn't so many years ago when I used OSHELL.
Ken On Thu, Jun 8, 2017 at 11:30 AM, Don Poitras <sas...@sas.com> wrote: > I think Paul's use of BPXBATCH is clearer. Moving the logic to a > separate DD I think makes it even better. e.g. > > //BPXBAT EXEC PGM=BPXBATCH,PARMDD=PARMINDD > //STDIN DD DUMMY > //STDOUT DD SYSOUT=* > //STDERR DD SYSOUT=* > //PARMINDD DD * > sh echo '\nPATH='; > echo $PATH; > export PATH=$PATH:/u/sasdtp/sasuser; > echo '\nPATH='; > echo $PATH; > echo '\nCLASSPATH='; > echo $CLASSPATH; > echo '\nJAVA_HOME='; > echo $JAVA_HOME; > java -version; > java hello > /* > // > > > In article <028a01d2e067$108a0620$319e1260$@mcn.org> you wrote: > > Thanks! > > > Really appreciate all the earlier advice (which could certainly come in > handy down the road) but frankly this is more what I was looking for today. > > > Charles > > > > -----Original Message----- > > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > On Behalf Of Ken Smith > > Sent: Thursday, June 8, 2017 7:25 AM > > To: IBM-MAIN@LISTSERV.UA.EDU > > Subject: Re: Java on z/OS? > > > JZOS is great but here's a IVP job using OSHELL I run to exercise the > HelloWorld program supplied in the java bin directory. > > To write your own no doubt there's a source example out there that you > can compile (javac) and run. > > > //TSO EXEC PGM=IKJEFT1B,DYNAMNBR=50,REGION=0M > > //SYSPROC DD DISP=SHR,DSN=SYS1.SBPXEXEC //STDENV DD * > > JAVADIR=/usr/lpp/java/J7.0 > > //SYSTSIN DD * > > oshell + > > PATH=$JAVADIR/bin:$PATH && + > > echo path=$PATH && + > > java -version > > oshell + > > PATH=$JAVADIR/bin:$PATH && + > > java -classpath $JAVADIR HelloWorld > > //SYSTSPRT DD SYSOUT=* > > //SYSOUT DD SYSOUT=* > > //SYSPRINT DD SYSOUT=* > > //SYSIN DD DUMMY > > // > > Output: > > > path=/usr/lpp/java/J7.0/bin:/bin:/usr/lpp/java/J5.0_64/bin:. > > > java version "1.7.0" > > > Java(TM) SE Runtime Environment (build pmz3170sr9fp50-20160720_02( > SR9fp50)) > > > IBM J9 VM (build 2.6, JRE 1.7.0 z/OS s390-31 20160630_309948 (JIT > enabled, AOT enabled) J9VM - R26_Java726_SR9_20160630_1817_B309948 > > > JIT - tr.r11_20160630_120374 > > > GC - R26_Java726_SR9_20160630_1817_B309948 > > > J9CL - 20160630_309948) > > > JCL - 20160719_01 based on Oracle jdk7u111-b13 > > > > > Hello World > > > > On Mon, Jun 5, 2017 at 9:57 PM, John McKown < > john.archie.mck...@gmail.com> > > wrote: > > > > On Mon, Jun 5, 2017 at 7:44 PM, Charles Mills <charl...@mcn.org> > wrote: > > > > > > > Remember @Steve Beaver's question "where do I find a C++ sample for > > > z/OS?" > > > > Well, this is my variant of that question. > > > > > > > > If I wanted to write "Hello, World" in Java such that it would run > > > > in > > > batch > > > > on z/OS, where would I start? Where is the "Programmers' Guide" for > Java? > > > > > > > > I know OO concepts, I'm an experienced C++ programmer, and I took a > > > > Java class once upon a time. I can find Java language and class > > > > references on the Web. I'm not looking for that. I'm looking for how > > > > to get from System.out.println("Hello World"); to //JAVAPGM EXEC > > > > PGM=HELLOW ? > > > > > > > > Charles > > > > > > > > > > > ?The magic word in this case is JZOS. This is the Java batch launcher > > > for z/OS, which come bundled with the Java JDK. > > > https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0. > > > 0/com.ibm.java.zsecurity.80.doc/zsecurity-component/jzos.html > > > > > > The above page has links to the information you need. > > > > > > As an aside, JZOS was originally written by Dovetailed Technologies > > > (the authors of the excellent Co:Z package). It was so much better > > > than anything IBM had that IBM now distributes it with the JDK. I > > > don't know if IBM bought it or has an exclusive license to distribute. > > > > > > If you're going to do any UNIX work in batch, go here: > > > http://dovetail.com/products/cozbatch.html and get this package. It > > > does not require _any_ special authorities so you could even install > > > it using your TSO high level qualifier for the data sets and your UNIX > > > ${HOME} for the UNIX files. Once you've tried this, you'll sneer at > > > IBM's pathetic BPXBATCH. Oh, and the run-time license is a very > > > affordable -- FREE!!!! You don't even have to register your email or > > > _anything_. Not even a thank you note.? > > > > > > > > > -- > > > Windows. A funny name for a operating system that doesn't let you see > > > anything. > > > > > > Maranatha! <>< > > > John McKown > > -- > Don Poitras - SAS Development - SAS Institute Inc. - SAS Campus Drive > sas...@sas.com (919) 531-5637 Cary, NC 27513 > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN