Wednesday, November 28, 2007

Run java class in jar file without manifest file

1. Write class and compile.
2. jar it to testspring.jar (without manifest file)
3. put it under home folder of AS400 IFS.
4. Run this AS400 command. Note other jar files used is in /mrcwebgui/WEB-INF/lib folder so we used java.ext.dirs property.

JAVA CLASS(test.testspring) CLASSPATH('/home/testspring.jar') PROP((java.ext.dirs '/mrcwebgui/WEB-INF/lib'))

Or you can put testspring.jar in /mrcwebgui/WEB-INF/lib. Then you only need to run this command:

JAVA CLASS(test.testspring) PROP((java.ext.dirs '/mrcwebgui/WEB-INF/lib'))

Tuesday, November 13, 2007

IBM Toolbox for Java JDBC properties

AS400 toolbox connection properties

All date values are stored by DB2 in the same internal format regardless of the DATFMT that is specified on the column or field definition. When that data is read from the SQL Table it will be converted to the output date format specified by the application -- in your case the *USA format.

You can add property “date format” to JDBC connection so that the output will be in your desired format:
jdbc:as400://;translate binary=true; libraries=; date format=iso

IBM Toolbox for Java JDBC properties.