JZOS not setting user.name system property right

General discussion on the JZOS batch launcher and toolkit
Post Reply
jantje
Posts: 2
Joined: Wed Jul 23, 2008 11:00 am

JZOS not setting user.name system property right

Post by jantje »

Following JCL:
//JAVA EXEC PROC=JVMPRC14,
// JAVACLS='totov',
// LOGLVL='+T'
XX*********************************************************************
XX*
XX* Stored procedure for executing the JZOS Java Batch Launcher
XX*
XX* Tailor the proc your installation:
XX* 1.) Replace '<HLQ>.JZOS.LOADLIB' with the PDSE that contains the
XX* JVMLDM14 module that was installed during installation
XX* 2.) The STEPLIB is commented out. Unless you are doing an SMP/E
XX* install into the MVS zone on z/OS 1.6 or above, you should
XX* UNCOMMENT the STEPLIB and point to the STEPLIB being used
XX*
XX*********************************************************************
XXJVMPRC14 PROC JAVACLS=, < Fully Qfied Java class..RQD
XX ARGS=, < Args to Java class
XX LIBRARY='HLQ.SYSTEM.LOADLIB', < STEPLIB FOR JVMLDM module
XX VERSION='14', < JVMLDM version: 14
XX LOGLVL='', < Debug LVL: +I(info) +T(trc)
XX REGSIZE='512M', < EXECUTION REGION SIZE
XX LEPARM=''
XXJAVAJVM EXEC PGM=JVMLDM&VERSION,REGION=&REGSIZE,
XX PARM='&LEPARM/&LOGLVL &JAVACLS &ARGS'
IEFC653I SUBSTITUTION JCL - PGM=JVMLDM14,REGION=512M,PARM='/+T totov '
XXSTEPLIB DD DSN=&LIBRARY,DISP=SHR
IEFC653I SUBSTITUTION JCL - DSN=HLQ.SYSTEM.LOADLIB,DISP=SHR
XX DD DSN=CEE.SCEERUN,DISP=SHR
XX DD DSN=CEE.SCEERUN2,DISP=SHR
XX DD DSN=DB2.SDSNEXIT.DB2D,DISP=SHR
XX DD DSN=DB2.SDSNLOAD.DB2D,DISP=SHR
XX DD DSN=DB2.SDSNLOD2.DB2D,DISP=SHR
XXSYSPRINT DD SYSOUT=* < System stdout
XXSYSOUT DD SYSOUT=* < System stderr
XXSTDOUT DD SYSOUT=* < Java System.out
XXSTDERR DD SYSOUT=* < Java System.err
XXCEEDUMP DD SYSOUT=*
XXABNLIGNR DD DUMMY
XX*
XX*The following DDs can/should be present in the calling JCL
XX*
XX*STDIN DD < OPTIONAL - Java System.in
XX*STDENV DD < REQUIRED - JVM Environment script
XX*MAINARGS DD < OPTIONAL - Alt. method to supply args
//STDENV DD *
export JAVA_HOME=/jdk142-sr6/J1.4

export PATH=/bin:"${JAVA_HOME}"/bin:

LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic
export LIBPATH="$LIBPATH":


# Set JZOS specific options
# Use this variable to specify encoding for DD STDOUT and STDERR
export JZOS_OUTPUT_ENCODING=Cp1047
# Use this variable to prevent JZOS from handling MVS operator commands
#export JZOS_ENABLE_MVS_COMMANDS=false
# Use this variable to supply additional arguments to main

export CLASSPATH=/u/users/jantje:$CLASSPATH
export LIBPATH=${OSSPACKAGES}/jzos/1.2.5:$LIBPATH
/*

Prints:

-- listing properties --
java.assistive=ON
platform.notASCII=true
java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
sun.boot.library.path=/jdk142-sr6/J1.4/bin
java.vm.version=1.4.2
java.vm.vendor=IBM Corporation
java.vendor.url=http://www.ibm.com/
path.separator=:
java.vm.name=Classic VM
file.encoding.pkg=sun.io
sun.os.patch.level=
java.vm.specification.name=Java Virtual Machine Specification
user.dir=/u/users/jmo2659
java.runtime.version=1.4.2
java.fullversion=J2RE 1.4.2 IBM z/OS Persistent Reusab...
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.endorsed.dirs=/jdk142-sr6/J1.4/lib/endorsed
os.arch=390
com.ibm.vm.bitmode=32
java.io.tmpdir=/tmp
line.separator=
java.vm.specification.vendor=Sun Microsystems Inc.
java.awt.fonts=
os.name=z/OS
sun.java2d.fontpath=
java.library.path=/jzos/1.2.5:/lib:/usr/lib:/jdk142-sr6...
java.specification.name=Java Platform API Specification
java.class.version=48.0
ibm.system.encoding=Cp1047
java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferences...
os.version=01.06.00
user.home=?
user.timezone=
java.awt.printerjob=sun.print.PSPrinterJob
java.specification.version=1.4
file.encoding=Cp1047
user.name=?
java.class.path=/u/users/jantje:
java.vm.specification.version=1.0
sun.arch.data.model=32
java.home=/jdk142-sr6/J1.4
java.specification.vendor=Sun Microsystems Inc.
user.language=en
java.vm.info=J2RE 1.4.2 IBM z/OS Persistent Reusab...
java.version=1.4.2
java.ext.dirs=/jdk142-sr6/J1.4/lib/ext
sun.boot.class.path=/jdk142-sr6/J1.4/lib/core.jar:/jdk142...
java.vendor=IBM Corporation
file.separator=/
java.vendor.url.bug=
java.compiler=jitc
sun.io.unicode.encoding=UnicodeBig

to //STDOUT.

I was expecting:

user.name=jantje

What am I doing wrong???

The source code of the totov.class:

import java.util.Properties;



public class totov {

/**
* @param args
*/
public static void main(String[] args) {
Properties systemProperties = System.getProperties();
systemProperties.list(System.out);
}

}


Same class, invoked from a Unix System Services shell does give the correct value.

Thanks for helping me out.

Jantje.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

The JVM is responsible for setting these properties - the JZOS launcher really doesn't have control of them. It could be that the environment under which you invoked the "java" launcher from a USS shell is different and allows the JVM to set this property properly.

I'm sorry that I can't offer any help - you will have to open a PMR with IBM.
jantje
Posts: 2
Joined: Wed Jul 23, 2008 11:00 am

Post by jantje »

Hmmm... You're probably right. Just tried the same run but from AOPBATCH. Gives the same (erroneous) result.
Oh, well, IBM, here comes a new PMR...
Cheers,
Jantje.
[/quote]
Post Reply