Benjamin, all Yes there are Java J2SE compatible open source routines available as part of the www.z390.org portable mainframe assembler and emulator project which provide standard operations plus conversion between all the mainframe data types including: 31 digit packed decimal; floating point HFP and BFP short, long, and extended; fixed point 32, 64, and 128 bit integers; plus conversion to and from decimal character fields containing sign, digits, decimal point, and exponent when required to fit within 45 character maximum field width. These formats support numbers in the range 1E-4932 to 1E+4932 with precision up to 34 decimal digits for floating point and 39 decimal digits for 128 bit integers.
The pz390.java emulator uses the Java primitive data types int, long, float, and double to support 32 bit integers, 64 bit integers, 32 bit BFP and 64 bit BFP floating point wherever possible. For the data types including packed decimal which do not fit within these primitive types, the Java classes BigInteger and BigDecimal are used to support arbitrary precision numerical values. The floating point operations are performed with extra guard digits and then rounded to the required HFP or BFP precision and bit formats. With the latest z390 PTF v1.1.01b due out this week, two new macros are being included called CTD and CFD to convert between 128 bit integer or any of the 6 floating point types and a decimal display character field. The default for these macros is to use LINKAGE=SVC for z390 svc 170 and 171 implemented in Java for speed. However, LINKAGE=MF for mainframe can be specified to call mainframe assembler routines to perform the conversions so the macros and routines can be ported to the mainframe as required. Many thanks to Dave Bond with www.Tachyonsoft.com for contributing the FPCONVRT floating point mainframe compatible routines. These routines have option for z architecture support level with level 5 indicating use of all the latest instructions. The routines use many of the HLASM more advanced features such as LOCTR and EQU operands 4 and 5 plus they use new processor features such as 20 bit signed displacements so it has been a great compatibility test case for the z390 assembler and emulator. It was also a great test case for compatibility between the Java and mainframe floating point support. Two new regression test programs TESTFPC1 and TESTFPC2 test conversions covering the entire range of floating point values from LB'(MIN)' to LB'(MAX)' using both the SVC and MF options. Don Higgins [EMAIL PROTECTED] >>>> from Benjamin While >>>>> A primative data type in a programming language is one that is explicitly supportd in the language. A data type that is not made up of other data types. I was referring to the programming language not the hardware support I want to use Java on our Z/Series mainframe. The Java programs will need to read records and databases that have packed decimal data. Java does not have a packed decimal data type. I am looking for classes or routines that will allow the Java programs to process the paced decimal data. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html