I am trying to use the asm.RecordClassGenerator from JZOS 2.3.2 to generate Java code for all the SMF records. It is succeeding in some cases and failing with a NullPointerException in others. One example was with the IFASMFR 0 portion. My job actually generates all the SMF record definations that I can find into a single ADATA file. The code which generates the SMF record type zero looks like:
REC0 DSECT
IFASMFR 0
... more code
The comand and output is:
java -Djava.ext.dirs=/usr/share/java/jzos232 \
com.ibm.jzos.recordgen.asm.RecordClassGenerator \
section=REC0 \
bufoffset=false \
package=SmfData \
class=REC0 \
adatafile=recgenx.adata \
outputDir=. \
genAccessorJavadoc=false
Generating recgenx.adata to: /home/joarmc/adata/SmfData/REC0.java
Error while processing file: recgenx.adata
java.lang.NullPointerException
It is not telling me anything more. I did the assembly at work and brought the output listing and ADATA file home to work on it because this is not a work project. I don't know if it is important, but I did do all the SMF records. Altogether, I had about 313 DSECTs to process. Which I did in a UNIX "while" loop.
I wrote a perl script which reads the HLASM listing and finds the names of the DSECTs. It feeds this into a loop similar to:
perl -n perl.script hlasm.output | \
while read i; java-generator;done
The java-generator stands for the java command I put at the top, but with:
section=$i class=$i
so that the section is the DSECT name as is the name of the generated Java class.
--
John McKown
JZOA 2.3.2 RecordClassGenerator null pointer exception
-
- Posts: 39
- Joined: Sat Nov 21, 2009 2:59 pm
-
- Posts: 39
- Joined: Sat Nov 21, 2009 2:59 pm
update & correction
Sorry, it was not IFASMFR 0 which caused the problem. It was the type 88 SMF record. I looked at the generated Java and it stopped on the SMF88EFS data item, just before a percent sign in the comments. I copied the macro to my own MACLIB, put that in front of SYS1.MACLIB and reassembled. I then downloaded the ADATA file to my PC and ran the command again. It ran successfully. I looked at all the other SMF DSECT which got nullPointerExceptions and they all had % signs in them. I copied them all to my MACLIB and changed all the % to blanks. Every one that failed before now works. I don't know what the % means. Oh, this was all done of Fedora 11 using the OpenJDK.
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6) (fedora-29.b16.fc11-i386)
OpenJDK Client VM (build 14.0-b16, mixed mode)
If that makes any difference.
--
John McKown
Maranatha! <><
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6) (fedora-29.b16.fc11-i386)
OpenJDK Client VM (build 14.0-b16, mixed mode)
If that makes any difference.
--
John McKown
Maranatha! <><
John,
Can you email an example of a source and adata member that fails to info@dovetail.com so that I can take a look?
Kirk Wolf
Can you email an example of a source and adata member that fails to info@dovetail.com so that I can take a look?
Kirk Wolf
-
- Posts: 39
- Joined: Sat Nov 21, 2009 2:59 pm
I'll have to take them home at email them from there. They are large and I don't want to get caught in our "email alert" for large emails. Yes, we monitor such things. I'll see if I can pare it down to a smaller size today. I've been doing most of this off hours because it is not really work related.
-
- Posts: 39
- Joined: Sat Nov 21, 2009 2:59 pm
emailed it
I shrunk it down below the alert size by using tar and BZIP2. I've emailed it as requested with your name in the subject along with nullPointerException.
Have fun. And a nice Thanksgiving. I'll be playing around with this over the holiday.
Have fun. And a nice Thanksgiving. I'll be playing around with this over the holiday.