Discussion:
Batch Java not working
(too old to reply)
Lizette Koehler
2009-08-19 06:11:16 UTC
Permalink
I can go into OMVS and issue env and get the results.

However when I try to do the same thing in Batch it does not work.

//RANDOM SET VALUE='LK41591' <-- SET THIS TO RANDOM ALPHA CHARS.

//STEP10 EXEC PGM=BPXBATCH,

// PARM='SH ENV ; CD /ETC ; LS -LA'

//*

//* UNIX CMD TO INVOKE GOES AFTER 'SH ' IN PARM FIELD ABOVE

//* YOU CAN EXECUTE MULTIPLE UNIX CMDS BY SEPARATING THEM WITH

//* A SEMI-COLON, UP TO THE LIMIT OF THE JCL PARM FIELD

//*

//STDOUT DD PATH='/tmp/STDOUT.&VALUE..TXT', CAPTURE CMD OUTPUT

// PATHOPTS=(OWRONLY,OCREAT,OTRUNC)

//*

//* COPY OUTPUT FROM BPXBATCH FROM HFS TO JES SPOOL

//* SINCE BPXBATCH DOES NOT SUPPORT SYSIN/SYSOUT FILES

//*

//STEP20 EXEC PGM=IKJEFT1B,REGION=0M,DYNAMNBR=20

//SYSOUT DD SYSOUT=*,RECFM=V,LRECL=256

//TEMPOUT DD PATH='/tmp/STDOUT.&VALUE..TXT', DELETE CMD OUTPUT

// PATHOPTS=ORDONLY,PATHDISP=(DELETE,KEEP)

//SYSTSPRT DD SYSOUT=*

//SYSTSIN DD *

OCOPY INDD(TEMPOUT) OUTDD(SYSOUT) TEXT



TSS7000I ZB41591 LAST-USED 18 AUG 09 14:57 SYSTEM=DIC3 FACILITY=TSO

TSS7001I COUNT=04591 MODE=FAIL LOCKTIME=NONE NAME=LIZETTE KOEHLER -SUPER

IEF236I ALLOC. FOR LK41591B STEP10

IGD103I SMS ALLOCATED TO DDNAME STDOUT

IEF142I LK41591B STEP10 - STEP WAS EXECUTED - COND CODE 0000

IGD104I HFS FILE WAS RETAINED, DDNAME IS (STDOUT )

FILENAME IS (/tmp/STDOUT.LK41591.TXT)

IEF373I STEP/STEP10 /START 2009230.1520

IEF374I STEP/STEP10 /STOP 2009230.1520 CPU 0MIN 00.00SEC SRB 0MIN
00.00S
IEF142I LK41591B *OMVSEX - STEP WAS EXECUTED - COND CODE 0000

IEF373I STEP/*OMVSEX /START 2009230.1520

IEF374I STEP/*OMVSEX /STOP 2009230.1520 CPU 0MIN 00.00SEC SRB 0MIN
00.00S
IEF142I LK41591B *OMVSEX - STEP WAS EXECUTED - COND CODE 0127

IEF373I STEP/*OMVSEX /START 2009230.1520

IEF374I STEP/*OMVSEX /STOP 2009230.1520 CPU 0MIN 00.01SEC SRB 0MIN
00.00S
IEF236I ALLOC. FOR LK41591B STEP20

IEF237I JES2 ALLOCATED TO SYSOUT

IGD103I SMS ALLOCATED TO DDNAME TEMPOUT

IEF237I JES2 ALLOCATED TO SYSTSPRT

IEF237I JES2 ALLOCATED TO SYSTSIN

IEF142I LK41591B STEP20 - STEP WAS EXECUTED - COND CODE 0000

IEF285I ZB41591.LK41591B.JOB11736.D0000102.? SYSOUT

IGD105I HFS FILE WAS DELETED, DDNAME IS (TEMPOUT )

IGD105I HFS FILE WAS DELETED, DDNAME IS (TEMPOUT )
FILENAME IS (/tmp/STDOUT.LK41591.TXT)
IEF285I ZB41591.LK41591B.JOB11736.D0000103.? SYSOUT
IEF285I ZB41591.LK41591B.JOB11736.D0000101.? SYSIN
IEF373I STEP/STEP20 /START 2009230.1520
IEF374I STEP/STEP20 /STOP 2009230.1520 CPU 0MIN 00.02SEC SRB 0MIN 0
IEF375I JOB/LK41591B/START 2009230.1520
IEF376I JOB/LK41591B/STOP 2009230.1520 CPU 0MIN 00.03SEC SRB 0MIN 0
ENV: FSUM7351 not found
CD: FSUM7351 not found
LS: FSUM7351 not found
READY
OCOPY INDD(TEMPOUT) OUTDD(SYSOUT) TEXT
READY
END
******************************** BOTTOM OF DATA ***************************


Any thoughts on why my BATCH JAVA does not work, but my TSO JAVA does?

Lizette

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Peter Bishop
2009-08-19 06:37:17 UTC
Permalink
Post by Lizette Koehler
//STEP10 EXEC PGM=BPXBATCH,
// PARM='SH ENV ; CD /ETC ; LS -LA'
ENV: FSUM7351 not found
CD: FSUM7351 not found
LS: FSUM7351 not found
Any thoughts on why my BATCH JAVA does not work, but my TSO JAVA does?
Could it be that the commands are capitalised? Or is that just from the cut
and paste into the email from the JCL? The FSUM7351 messages are a bit of a
concern.

I always have "CAPS OFF" when running Unix-type JCL for this reason.

cheers
Peter

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Lizette Koehler
2009-08-19 06:52:48 UTC
Permalink
You know, I always miss that one. You are correct, when I changed it to
lower case, it ran fine.

Lizette
Post by Peter Bishop
Post by Lizette Koehler
//STEP10 EXEC PGM=BPXBATCH,
// PARM='SH ENV ; CD /ETC ; LS -LA'
ENV: FSUM7351 not found
CD: FSUM7351 not found
LS: FSUM7351 not found
Any thoughts on why my BATCH JAVA does not work, but my TSO JAVA does?
Could it be that the commands are capitalised? Or is that just from the cut
and paste into the email from the JCL? The FSUM7351 messages are a bit of a
concern.
I always have "CAPS OFF" when running Unix-type JCL for this reason.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Kirk Wolf
2009-08-19 20:40:34 UTC
Permalink
Lizette,

FWIW. The recommended way to run batch java is via the IBM JZOS batch
launcher, which is included with the IBM Java SDKs for z/OS.

See:
http://www-03.ibm.com/servers/eserver/zseries/software/java/products/jzos/overview.html

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

PS> Friends don't let friends use BPXBATCH :-)
Post by Lizette Koehler
You know, I always miss that one. You are correct, when I changed it to
lower case, it ran fine.
Lizette
Post by Peter Bishop
Post by Lizette Koehler
//STEP10 EXEC PGM=BPXBATCH,
// PARM='SH ENV ; CD /ETC ; LS -LA'
ENV: FSUM7351 not found
CD: FSUM7351 not found
LS: FSUM7351 not found
Any thoughts on why my BATCH JAVA does not work, but my TSO JAVA does?
Could it be that the commands are capitalised? Or is that just from the
cut
Post by Peter Bishop
and paste into the email from the JCL? The FSUM7351 messages are a bit
of
a
Post by Peter Bishop
concern.
I always have "CAPS OFF" when running Unix-type JCL for this reason.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
Search the archives at http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Loading...