Application programming on z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


How object-oriented (OO) applications are compiled

Application programming on z/OS

An example uses the SYSJAVA ddname to write a generated Java™ source file to a file in the HFS.

If you use a batch job or TSO/E to compile an OO COBOL program or class definition, the generated object deck is written, as usual, to the data set that you identify with the SYSLIN or SYSPUNCH ddname.

If the COBOL program or class definition uses the JNI1 environment structure to access JNI callable services, copy the file JNI.cpy from the HFS to a PDS or PDSE member called JNI, identify that library with a SYSLIB DD statement, and use a COPY statement of the form COPY JNI in the COBOL source program.

As shown in Figure 1, use the SYSJAVA ddname to write the generated Java source file to a file in the HFS. For example:

Figure 1. SYSJAVA ddname for a Java source file
//SYSJAVA DD PATH='/u/userid/java/Classname.java',
//           PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//           PATHMODE=SIRWXU,
//           FILEDATA=TEXT
1 The Java Native Interface (JNI) is the Java interface to native programming languages and is part of the Java Development Kits. By writing programs

Go to the previous page   |   Go to the next page




Copyright IBM Corporation 1990, 2010