Re: replacing SAS for SMF reports?



o Java's float and double primitives are (ISO) binary floating point, but
has the java.math.BigDecimal class, which is a decimal floating point
representation ( n * 10**m, where n is arbitrary length integer, m is a 32
bit integer). The BigDecimal class can be used to represent any zoned or
packed data without loss of precision.

o Recent versions of the JZOS toolkit (on alphaWorks, SDK 6.0, or soon on
SDK 5) include type converter classes (com.ibm.jzos.fields package) that
convert Cobol datatypes to Java values. BTW: These classes are pure Java
code and don't rely on z/OS apis.

o The RecordClassGenerator class (available in the alphaWorks version of
JZOS) can be used to read the ADATA output from the High Level Assembler or
Enterprise Cobol Compiler and generate Java classes which use the above
converters to map DSECTS or Cobol copy books into Java classes. Samples are
included which show how SMF 83 DSECTS are automatically mapped into Java
classes.

For example, the following JCL generates a Java class which maps the base
part of the SMF 83 record:

//ASSEMBLE EXEC ASMAC,PARM='ADATA,LIST,NOTERM,NODECK,NOOBJECT'
//C.SYSIN DD *
IFASMFR 83
END
//C.SYSADATA DD DSN=&&ADATA,DISP=(NEW,PASS),
// SPACE=(CYL,(3,1))
//*
//JAVA EXEC PROC=EXJZOSVM,VERSION='50'
//MAINARGS DD *
com.ibm.jzos.recordgen.asm.RecordClassGenerator
section=SMFRCD83
bufoffset=false
package=com.ibm.jzos.sample.fields
class=Smf83BaseRecord
//SYSADATA DD DSN=&&ADATA,DISP=(OLD,DELETE)
//STDOUT DD PATH='/home/user/Smf83BaseRecord.java',
// PATHOPTS=(OWRONLY,OCREAT),
// PATHMODE=SIRWXU
//STDENV DD *
....
//

For the JZOS alphaWorks downloads, see:
http://www.alphaworks.ibm.com/tech/zosjavabatchtk

Kirk Wolf
Dovetailed Technologies

On Tue, Jun 17, 2008 at 1:07 PM, Tom Ross <tmross@xxxxxxxxxxxxxxxxxxxx>
wrote:

With reference modification available, the only things that are
awkward in COBOL are bit switches and the 1 byte binary fields. I
have written usage programs that parse the SMF 14/15, 30 and 64
records. If IBM would just implement the data types in the 2002
standard including the new floating point usages as IEEE, COBOL the
above caveats would go away and COBOL would play nicer with JAVA.
COMP-1 and COMP-2 could be retained for hex floating point so a single
COBOL program could have both types of floating point. YES there is a
SHARE requirement for this.

Java does not have Decimal Floating Point yet, and COBOL already plays
very nicely with automatic conversion from Java float to COBOL float
and back again with direct calls. In any case, it is off topic, there
is no Decimal Floating Point data in SMF records that I know of.

Cheers,
TomR >> COBOL is the Language of the Future! <<

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

.



Relevant Pages

  • COBOL floating-point revisited
    ... short, long, and extended formats using just COBOL and Java, then you may ... It is written entirely in J2SE Java and supports all the problem ... additions which include a few new floating point instructions. ... or extended-precision IEEE binary floating-point values. ...
    (bit.listserv.ibm-main)
  • Decimal Floating Point, was: replacing SAS for SMF reports?
    ... awkward in COBOL are bit switches and the 1 byte binary fields. ... COMP-1 and COMP-2 could be retained for hex floating point so a single ... Java does not have Decimal Floating Point yet, ... USAGE BIT and USAGE BINARY-CHARACTER. ...
    (bit.listserv.ibm-main)
  • zcobol - first COBOL compiler supporting ANSI/ISO 754 Decimal Floating Point
    ... zcobol v1.5.00b now supports ANSI/ISO 754 Decimal Floating Point ... plus ANSI/ISO 754 Binary Floating Point. ... The COBOL 2002 standard generic floating point usage types FLOAT- ... Finally you can define a decimal floating point fraction such as 0.1 ...
    (comp.lang.cobol)
  • Re: Cobol2Java: a Cobol to Java source code converter is available for evaluation
    ... If you were suggesting to use a C/C++ to Java tool that I may agree ... better because of being translated to a different language. ... Cobol is far from OO. ... many printers and page format as need at any time. ...
    (comp.lang.cobol)
  • Re: I need help!!
    ... trying to use the java based record editor program on sourceforge to ... Most COBOL environments have utilities available to create standard ... Write a small COBOL program to convert all the packed fields to ... Do you think my Java decimal package will help more people use Java on ...
    (comp.lang.cobol)