Boy I made a real fuupaa. While converting my SCRT jcl to JZOS somehow my JCL was saved with numbers on in columns 73-80. JZOS/JAVA really does not like it. I received the following:
JVMJZBL1001N JZOS batch Launcher Version: 2.4.8 2015-10-28 JVMJZBL1002N (C) Copyright IBM Corp. 2005, 2016 JVMJZBL1038E Child shell process exited with exit code: 125 JVMJZBL1042E JZOS batch launcher failed, return code=102 As soon as I removed the numbers (unnum) everything was fine. Hopefully this will help someone in the future. Jim -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Carmen Vitullo Sent: Friday, April 28, 2017 8:37 AM To: [email protected] Subject: Re: JZOS Java CLASSPATH I've been testing the BPXBATCH , JZOS and BCH (bcp) batch process, so far, performance wise and ease of porting the JZOS for us performs better and seems it would be easier to port to Z, still in the initial stages, so we shall see thanks Andrew Carmen ----- Original Message ----- From: "Andrew Rowley" <[email protected]> To: [email protected] Sent: Thursday, April 27, 2017 8:13:03 PM Subject: Re: JZOS Java CLASSPATH On 28/04/2017 3:23 AM, Kirk Wolf wrote: > And yet I fail to see why this is an issue since the JZOS sample JCL shows > how to use the shell language to handle this - with more flexibility. > > For example, the "java" command launcher can't do this: > > for i in "${MYDIR}"/foo*.jar; do > CLASSPATH="$CLASSPATH":"$i" > done I love JZOS, except for this shell script. I feel that a tailored shell script in every Java batch job is a major obstacle, because as you say "most Java users don't know their shell". Even more so for most z/OS users. You are just setting the CLASSPATH environment variable, so yes you can do the same thing using the java command in BPXBATCH if you need to (apologies for naming my program ClassPath, which is slightly confusing): //S1 EXEC PGM=BPXBATCH,REGION=512M //STDENV DD * CLASSPATH=java/target //STDPARM DD * SH for i in java/lib/slf*.jar; do CLASSPATH="$CLASSPATH":"$i"; done; export CLASSPATH="$CLASSPATH"; /usr/lpp/java/J8.0/bin/java ClassPath //STDOUT DD SYSOUT=* //STDERR DD SYSOUT=* Output: java/target:java/lib/slf4j-api-1.7.21.jar:java/lib/slf4j-simple-1.7.21.jar /home/andrewr/java/target/ /home/andrewr/java/lib/slf4j-api-1.7.21.jar /home/andrewr/java/lib/slf4j-simple-1.7.21.jar It's the handling of the CLASSPATH environment variable that's the issue. I have been playing around with PROCs to try to simplify things so you can use more traditional JCL for JZOS jobs (hence my other questions about JCL substitutions in instream data). e.g. //JAVA EXEC PROC=JAVA8G, // JAVACLS='''MyProgram''', // APPHOME='''java/target''', // CLASPATH='''java/lib/*:java/easysmf-je-1-5-2/jar/*''' //INPUT DD DISP=SHR,... It is difficult to handle the classpath like this if you need to allow multiple entries and support any sort of wildcard. It would be much easier if it followed the same rules as the java command. -- Andrew Rowley Black Hill Software +61 413 302 386 ---------------------------------------------------------------------- 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 The information contained in this communication is highly confidential and is intended solely for the use of the individual(s) to whom this communication is directed. If you are not the intended recipient, you are hereby notified that any viewing, copying, disclosure or distribution of this information is prohibited. Please notify the sender, by electronic mail or telephone, of any unintended receipt and delete the original message without making any copies. Blue Cross Blue Shield of Michigan and Blue Care Network of Michigan are nonprofit corporations and independent licensees of the Blue Cross and Blue Shield Association. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
