0x11234D is a representation only. what is passed is a 3 byte data x'11234D' run via jcl usng JZOS on the mainfraime. The representation is hexadecimal format. To evaluate the 3 byte data it is chr(17) - x'11' followed by chr(35)- x'23' then chr(78)- x'4D'. The problem is chr(0) which is the null character x'00' in both EBCDIC and ASCII. Strings are not able to handle this.
This is what the mainline code looks line. The characters may look different as the source in Unix System Sevices on Z/OS. Ý is [ and ¨ is ], the open and close square brackets shows differently.
public static void main(Stringݨ args) throws Exception {
byteݨ pd = argsÝ0¨.getBytes();
System.out.println(PackedDecimal.parse(pd));
}
} // end class
Part of the JCL
//JAVA EXEC PROC=JVMPRC60,
// ARGS=' *',
// JAVACLS='PackedDecimal'
the same JCL with HEX on to see the value of ARGS
//JAVA EXEC PROC=JVMPRC60,
66DCEC4CECC4DDDC7DEDDDCFF6444444444444
1111510575307963E15479360B000000000000
--------------------------------------
// ARGS=' *',
66444CDCE77013576444444444444444444444
110001972ED104CDB000000000000000000000
--------------------------------------
// JAVACLS='PackedDecimal'
66444DCECCDE77D88988C88898974444444444
110001151332ED7132544539413D0000000000
Looks funny because the font in this forum is proportional, if you are able to switch it to courier new it should line up.
The value being passed is x'0110345C'
The following is the proc that is being run
//JAVAJVM EXEC PGM=JVMLDM&VERSION,REGION=®SIZE,
// PARM='&LEPARM/&LOGLVL &JAVACLS &ARGS'
//STEPLIB DD DSN=&LIBRARY,DISP=SHR
//SYSPRINT DD SYSOUT=* < System stdout
//SYSOUT DD SYSOUT=* < System stderr
//STDOUT DD SYSOUT=* < Java System.out
//STDERR DD SYSOUT=* < Java System.err
//CEEDUMP DD SYSOUT=*
//ABNLIGNR DD DUMMY
this is similar to 'java PackedDecimal *' however, the argument being passed will very difficult to type. * in EBCIDIC is x'5C'.