Working With Java
Packages containing Java components in zFS files must follow the standard ChangeMan ZMF package life cycle. However, some of the processes in that life cycle are different for Java components.
Java Build Processing
ChangeMan ZMF build processing requires a like-source library type for input and a likeload library type for output. When you are working with Java applications in ZMF, the likesource component may not actually be program source code, and the like-load output is an executable that is not a load module.
All files, including build listings, are zFS files.
Compile Java Source
This build process transforms Java source into a class file.
Components
Input / Output | Description | Like-Type | Extension | Library Type Example |
---|---|---|---|---|
Input | Java source | S | .java | JAV |
Output | Java class file | L | .class | JCF |
Output | zFS build listing | P | .list | LSH |
Process
-
Language: JAVA
-
Procedure: CMNJAVA
Stage and recompile panels allow mixed case data in the COMPILE PARMS field when the LANGUAGE field is JAVA. Skeletons pass COMPILE PARMS options to the javac compiler, and COMPILE PARMS options are stored in component history for use in subsequent builds for the component.
Caution
The ChangeMan ZMF Java build process requires option -verbose, which is hard coded in build skeletons (delivered CMN$$JVA). If this option is nullified by an entry in the COMPILER OPTION field, the component build will fail.
Build Java Archive
This build process follows instructions in a file of JAR control statements to create a JAR file.
Components
Input / Output | Description | Like-Type | Extension | Library Type Example |
---|---|---|---|---|
Input | JAR control statements | S | JCT | |
Output | Java archive (JAR) | L | .jar | JAR |
Output | zFS build listing | P | .list | LSH |
Process
-
Language: JAVA
-
Procedure: CMNJAR
JAR Control Statements
This table describes JAR control statements.
Keyword | Description |
---|---|
* |
Comment Syntax: * in position 1 Comment records are read and printed in the CMNPRINT data set, but content is ignored by JAR build processing. |
jarname | Specifies the file name of the output JAR file that is written to the package staging library for the target JAR library type. Syntax: jarname=filename |
- filename: The output JAR name with extension. The JAR name may include a fragment of a path name. | |
The filename string cannot exceed the maximum for the file system in use (255 characters in the current file systems). | |
jarpath | Specifies a ZMF library type to be included in the JAR file. Files are copied from application baseline libraries and package staging libraries for the library type. Files in subdirectories are copied. Syntax: jarpath=libtyp,qualifier libtype: Three character library type. (Required, upper case.) qualifier: Fragment of a path name that acts as a filter to limit the scope of the copy to a subset of the files in the library type. (Optional, case sensitive.) |
jardir | Specifies a ZMF library type to be included in the JAR file. Files are copied from application baseline libraries and package staging libraries for the library type. Files in subdirectories are NOT copied. Syntax: jardir =libtyp,qualifier (Note the space before =.) libtype: Three character library type. (Required, upper case.) qualfier: Fragment of a path name that acts as a filter to limit the scope of the copy to a subset of the files in the library type. (Optional, case sensitive.) |
jarfile | Specifies a ZMF library type and the name of a file to be included in the JAR file. The file is copied from application baseline libraries and package staging libraries for the library type. Syntax: jarfile=libtype,filename libtype: Three character library type. (Required, upper case.) filename: File name with extension, including full path name after baseline or staging library name. (Required, case sensitive.) If filename is omitted, no file is copied and no error is reported. |
JAR Control Examples
In the examples that follow, these are the contents of application baseline and package staging libraries for library type HTH.
...
Baseline library:
/hthbaseline/
/hthbaseline/dir_1/adapter/file_x.html
/hthbaseline/dir_1/adapter/dir_2/file_x.html
/hthbaseline/dir_1/filter/file_x.html
/hthbaseline/dir_1/input/file_x.html
Staging library:
/stagingmodel/HTH
/stagingmodel/HTH/dir_1/adapter/file_x.html
/stagingmodel/HTH/dir_1/adapter/dir_2/file_x.html
Example 1:
jarpath=HTH
Included files:
/stagingmodel/HTH/dir_1/adapter/file_x.html
/stagingmodel/HTH/dir_1/adapter/dir_2/file_x.html
/hthbaseline/dir_1/filter/file_x.html
/hthbaseline/dir_1/input/file_x.html
Example 2:
jarpath=HTH,dir_1/adapter
Included files:
/stagingmodel/HTH/dir_1/adapter/file_x.html
/stagingmodel/HTH/dir_1/adapter/dir_2/file_x.html
Example 3:
jardir =HTH
Included files:
/hthbaseline/dir_1/adapter/file_x.html
/hthbaseline/dir_1/adapter/dir_2/file_x.html
/hthbaseline/dir_1/filter/file_x.html
/hthbaseline/dir_1/input/file_x.html
Example 4:
jardir =HTH,dir_1/adapter
Included files:
/stagingmodel/HTH/dir_1/adapter/file_x.html
Note
When a qualifier is specified for keyword jardir, files in subdirectories are excluded.
Build Web Archive
This build process follows instructions in a file of WAR control statements to create a WAR file.
Components
Input / Output | Description | Like-Type | Extension | Library Type Example |
---|---|---|---|---|
Input | WAR control statements | S | WCT | |
Output | Java Web archive (WAR) | L | .war | WAR |
Output | zFS build listing | P | .list | LSH |
Process
-
Language: JAVA
-
Procedure: CMNJAR
WAR Control Statements
The control statements used to build a WAR file are the same as those used to build a JAR file. See "JAR Control Statements" on page 41.
Impact Analysis for Java
The only Impact Analysis relationships recorded for Java are for components included in JAR files, like static subroutines in composite executables.
Use the SUBROUTINE relationship on the Impact Analysis Of Subordinate Components panel and the Component Bill Of Materials panel.
Package Audit for Java
Package audit detects source-to-load inconsistencies and out-of-date issues in Java components like it does for non-Java components. There is no source-to-copy relationship in Java, and the only subroutine-to-composite relationship is between a Java archive (JAR) and its elements. Unlike MVS subroutines in composite loads, JAR elements may be any like-type.
Long names for Java components require a different package audit report format than is used for non-Java components. However, the conditions checked are similar to the conditions checked for PDS components, and the report contents are similar.
Package Out-of-Sync Conditions for Java
The following table lists the out-of-sync conditions that are analyzed for Java components. For more information, see Chapter 11 "Auditing a Package" in the ChangeMan ZMF User’s Guide.
Out-of-Sync Condition* | Description | RC |
---|---|---|
SYNCH0! | Package Master contains no record of this component. | 0 |
SYNCH1! | Audit is unable to extract component statistics from the file system to perform one or more of the other SYNCH checks. | 0 |
SYNCH2! | Like-source component was compiled without using the designated compile procedure and options. | 12 |
SYNCH6! | Component in a staging library has no corresponding Component Activity File member in the package. | 12 |
SYNCH7! | Element in a Java archive in a staging library was changed more recently than the Java archive in a staging library in the same package. | 12 |
SYNCH8! | Element in a Java archive in a staging library was changed more recently than the Java archive in the baseline library. | 8 |
SYNCH9! | Like-load component in a staging library does not match the corresponding like-source component in the package. | 12 |
SYNCH10! | Component in the baseline library has changed since the component was checked out to a package staging library. | 12 |
SYNCH11! | Component in a staging library was changed without using ChangeMan ZMF. | 12 |
SYNCH12! | Component was copied into a staging library without using ChangeMan ZMF, or it is left over from a stage job that abended. | 12 |
SYNCH14! | Package component is not in Active status. | 12 |
SYNCH19! | A package master record points to a package component that is not in the staging library. | 12 |
SYNCH20! | Element in a Java archive in a staging library has a SETSSI that does not match the SETSSI of the version of the element that audit expects would be obtained by the Java archive build from your package staging libraries (or eligible participating package) or from baselines (first found location). | 8 |
Package Audit Report for Java Components
The package audit report for Java components has divisions similar to the package audit report for MVS components:
-
Stand alone errors reported against package contents
-
Relationship errors between header files and source
-
Relationship errors between subroutines and composite executables
-
Relationship errors between archives and included components
Each division is divided into sections relating to a common BUN. Heading information is similar to that provided in the non-zFS audit report.
The sample package audit report below validates package ACTP000062 that contains the following components.
CMNSTG01 STAGE: ACTP000062 Components Row 1 to 4 of 4
Command ===> Scroll ===> CSR
Name + Type Status Changed Procname User Request
java040.java JVS ACTIVE 20150324 190145 CMNJAVA USER015
java050.java JVS ACTIVE 20150324 190230 CMNJAVA USER015
java060.java JVS ACTIVE 20150324 190306 CMNJAVA USER015
java070.java JVS ACTIVE 20150324 190345 CMNJAVA USER015
******************************* Bottom of data ********************************
This is how each component was processed to produce the out-of-sync conditions shown in the sample audit report:
Component | Processing |
---|---|
java40.java | Checkout, edit, and stage. |
java50.java | Checkout and stage without changes. |
java60.java | Checkout, stage without changes, then baseline from another package. |
java70.java | Stage from development. |
This is the audit report for the package.
...
ChangeMan(R) ZMF (8.1.0 - 20141010) Audit TUESDAY MARCH 24, 2015 (2015/083) 20:44:26 Page 1
*************************************************************************************************
*Simple Change Package ===> ACTP000062 Created 2015/03/24 at 18:53:15 by USER015 *
*Package Installation Date ===> 2015/06/30 Package Status: DEV *
*Component Analysis Type ===> zFS component list including non-relational errors. *
*Library Appl:Libtype ===> ACTP:LSH ACTR:LSH *
*************************************************************************************************
Component Name Error From Timestamp Package User
________________________________ ________ _____ ___________________ __________ ________
java040.JVS.list Stage 2015/03/24 19:01:47 ACTP000062 USER015
Base ACTP000061 USER015
java050.JVS.list Stage 2015/03/24 19:02:32 ACTP000062 USER015
Base ACTP000061 USER015
java060.JVS.list Stage 2015/03/24 19:03:07 ACTP000062 USER015
Base ACTP000063 USER015
java070.JVS.list Stage 2015/03/24 19:03:47 ACTP000062 USER015
Base ACTP000061 USER015
ChangeMan(R) ZMF (8.1.0 - 20141010) Audit TUESDAY MARCH 24, 2015 (2015/083) 20:44:26 Page 2
*************************************************************************************************
*Simple Change Package ===> ACTP000062 Created 2015/03/24 at 18:53:15 by USER015 *
*Package Installation Date ===> 2015/06/30 Package Status: DEV *
*Component Analysis Type ===> zFS component list including non-relational errors. *
*Library Appl:Libtype ===> ACTP:JVL ACTR:JVL *
*************************************************************************************************
Component Name Error From Timestamp Package User
________________________________ ________ _____ ___________________ __________ ________
java040.class Stage 2015/03/24 19:01:44 ACTP000062 USER015
Base ACTP000061 USER015
java050.class Stage 2015/03/24 19:02:29 ACTP000062 USER015
Base ACTP000061 USER015
java060.class Stage 2015/03/24 19:03:04 ACTP000062 USER015
Base ACTP000063 USER015
java070.class Stage 2015/03/24 19:03:44 ACTP000062 USER015
Base ACTP000061 USER015
ChangeMan(R) ZMF (8.1.0 - 20141010) Audit TUESDAY MARCH 24, 2015 (2015/083) 20:44:26 Page 3
*************************************************************************************************
*Simple Change Package ===> ACTP000062 Created 2015/03/24 at 18:53:15 by USER015 *
*Package Installation Date ===> 2015/06/30 Package Status: DEV *
*Component Analysis Type ===> zFS component list including non-relational errors. *
*Library Appl:Libtype ===> ACTP:JVS ACTR:JVS *
*************************************************************************************************
...
Component Name Error From Timestamp Package User
________________________________ ________ _____ ___________________ __________ ________
java040.java Stage 2015/03/24 19:00:15 ACTP000062 USER015
Base 2015/03/24 18:07:24 ACTP000061 USER015
java050.java DUPLIC! Stage 2015/03/24 18:58:11 ACTP000062 USER015
Base 2015/03/24 18:07:24 ACTP000061 USER015
java060.java SYNCH10! Stage 2015/03/24 18:58:15 ACTP000062 USER015
Base 2015/03/24 20:43:06 ACTP000063 USER015
java070.java Stage 2015/03/24 19:02:25 ACTP000062 USER015
Base 2015/03/24 18:07:24 ACTP000061 USER015
ChangeMan(R) ZMF (8.1.0 - 20141010) Audit TUESDAY MARCH 24, 2015 (2015/083) 20:44:26 Page 4
Legend and Summary Report
The local level of audit chosen at this point; 4
4 - Audit is required and the return code must not exceed 4 which implies
that there are no "out-of-synch" situations within the staging libraries
nor the baseline libraries but at least one module of a staging library
is a "duplicate" of its baseline counterpart
Out-of-synch messages (hint - search for "!" marks)
DUPLIC! (Staging duplicates baseline) ===> 1
SYNCH0! (Not in scope of audit or unknown) ===> 0
SYNCH1! (Cmpnt statistics not available) ===> 0
SYNCH2! (Compile/designated proc differ) ===> 0
SYNCH3! (Unparsable load module) ===> 0
SYNCH4! (cpy/hdr staging problem) ===> 0
SYNCH5! (cpy/hdr baseline problem) ===> 0
SYNCH6! (Activity file not checked out) ===> 0
SYNCH7! (Static subcomponent stage problem) ==> 0
SYNCH8! (Static subcomponent base problem) ===> 0
SYNCH9! (Source and load discrepancy) ===> 0
SYNCH10! (Version regression problem) ===> 1
SYNCH11! (Component hash discrepancy) ===> 0
SYNCH12! (Orphan module in staging) ===> 0
SYNCH13! (Baseline/staging discrepancy) ===> 0
SYNCH14! (Components not in active status) ===> 0
SYNCH15! (Source to relationship problem) ===> 0
SYNCH16! (CPY low-date problem in baseline) ===> 0
SYNCH17! (CPY deleted problem in staging) ===> 0
SYNCH18! (LOD deleted problem in staging) ===> 0
SYNCH19! (Missing module in staging) ===> 0
SYNCH20! (Inconsistent subroutine) ===> 0
SYNCH21! (Scr/rename pkg component) ===> 0
SYNCH22! (Scratch subcmpnt is in use) ===> 0
SYNCH23! (Rename subcmpnt is in use) ===> 0
Highest return code encountered ===> 12
CMN3060A - This package has failed the audit.
CMN2696I - PACKAGE ACTP000062 FAILED THE AUDIT WITH A RETURN CODE OF 12.
Recommendation Summary Report
Listed below are some solutions to resolving out of synch situations
that can be flagged within this audit report.
DUPLIC! (Staging duplicates baseline)
Delete component from staging or change contents of staging component.
For package in BAS status, indicates no changes in baseline since pkg installed - no action required.
SYNCH10! (Version regression problem)
Copy staging member to development library.
Checkout member again from the baseline library.
Resolve version regression.
Stage member.
CMN7540I - End of job; RC = 12
******************************** BOTTOM OF DATA ***************************************************************************
ERO Audit for Java
Like package audit, ERO release audit detects source-to-load inconsistencies and out-ofdate issues in Java components like it does for non-Java components. There is no sourceto-copybook relationship in Java, and the only subroutine-to-composite relationship is between a Java archive (JAR) and its elements. Unlike MVS subroutines in composite loads, JAR elements may be any like-type.
ERO audit analyzes components across release areas and prior releases.
Release Audit Error Numbers for Java
These ERO audit error codes are applicable to JAR components and can be detected by the current ERO release audit.
Error Numbers | Description |
---|---|
100 | Identical components |
312 | Eligible baseline archive element not used by archive |
315 | Baseline archive element has a more recent date than archive |
318 | Archive element has a more recent date than archive in baseline |
332 | Baseline source is later than archive |
382 | Archive element is not included by baseline archive |
401 | Archive element has more recent date than archive |
404 | Source has a more recent date than archive |
411 | Designated compile procedure not used |
413 | Archive element deleted |
416 | Activity file not checked out |
417 | Version regression |
421 | Archive element not included in composite archive |
For more information, see topic "Release Audit Error Numbers" Chapter 10 "Auditing Release Areas" in the ChangeMan ZMF ERO Getting Started Guide.
Known Exception in JAR Relationships
Build procedure CMNJAR includes SYSLIB-type processing to make Java components available for inclusion in a JAR file. However, JAR elements drawn from dependent release areas are not currently being registered in package master subroutine-to-composite relationship records.
Therefore, these audit errors are applicable to JAR components but are not currently detected for and JAR files and JAR elements in dependent release areas.
Error Numbers | Description |
---|---|
310 | Eligible dependent area archive element not used by archive |
311 | Eligible prior release archive element not used by archive |
313 | Dependent area archive element has a more recent date than archive |
314 | Prior release archive element has a more recent date than archive |
316 | Archive element has a more recent date than archive in dependent area |
317 | Archive element has a more recent date than archive in prior rls |
330 | Dependent area source is later than archive |
331 | Prior release source is later than executable |
380 | Archive element is not included by dependent area archive |
381 | Archive element is not included by prior release archive |
...
ERO Audit Report for Java Components
This section shows an example of an ERO audit report displaying Java components and relationships.
-
Long component names extend across the page, on two lines if necessary.
-
Component statistics are shows below the long name line(s).
-
JAR files (composite components) are identified by >> in the left margin.
-
JAR elements (with no >> ) are listed below the JAR name and statistics.
...
Change Man Release Audit Report Wednesday May 04,2011 (2011/124) 09:53:49 PAGE: 13
***************************(Release Area Processing - zFS Components)***************************
*Release Identifier ===> SDZFS001 Created: 20100528 Release Install Date ===> 20100528 *
*Area Identifier ===> UNIT Area Status ===> UNBLOCKED *
*Subcomponent relationships to libtype-(JAR) *
*****************************************************************************************************************************
...
*-------------- P r e v i o u s V e r s i o n --------------* *---------------- A r e a L i b r a r y ------------
************************************************************** ******************************************************
>>Component Name -> Subordinate Name
Timestamp Size Area Release Libtype Appl/Pkg# Timestamp Size
___________________ _________ _______ _______ _______ __________ ___________________ _________
>>org/jdom/xpath/enh177473jarnew01.jar
JAR STEV000138 2010-05-28 03.22.02 7364
org/jdom/adapters/package.html
2010-03-30 07.22.00 193 ERR0312! HTH
org/jdom/adapters/AbstractDOMAdapter.class
2010-03-26 04.02.22 434 ERR0312! JCF
org/jdom/filter/package.html
2010-03-30 07.22.13 365 ERR0312! HTH
org/jdom/input/package.html
2010-03-30 07.22.23 432 ERR0312! HTH
org/jdom/output/package.html
2010-03-30 07.22.31 610 ERR0312! HTH
org/jdom/package.html
2010-03-30 07.22.41 524 ERR0312! HTH
org/jdom/transform/package.html
2010-03-30 07.22.49 282 ERR0312! HTH
org/jdom/xpath/enh177473hthnew01.hth
ERR0413! HTH
org/jdom/xpath/enh177473hth01.hth
2010-05-28 02.48.54 90 ERR0401! HTH STEV000138 2010-05-28 05.41.22 137
org/jdom/xpath/enh177473hth02.hth
2010-05-28 05.18.33 90 ERR0315! HTH
org/jdom/xpath/enh177473jcfnew01.class
ERR0413! JCF
org/jdom/xpath/enh177473jcf01.class
2010-05-26 01.36.50 423 JCF STEV000138 2010-05-28 02.44.07 423
org/jdom/xpath/enh177473jcf02.class
2010-05-28 05.19.06 422 ERR0315! JCF
org/jdom/xpath/package.html
2010-03-30 07.22.58 170 ERR0312! HTH
org/jdom/xpath/HelloWorld1.class
2011-04-15 08.45.00 417 ERR0315! JCF
org/jdom/xpath/HelloWorld3.class
2010-04-28 07.21.21 417 ERR0312! JCF
>>org/jdom/xpath/enh177473jar01.jar
2010-05-26 03.20.44 6619 JAR STEV000138 2010-05-28 03.12.47 6659
org/jdom/adapters/package.html
2010-03-30 07.22.00 193 ERR0312! HTH
org/jdom/adapters/AbstractDOMAdapter.class
2010-03-26 04.02.22 434 ERR0312! JCF
org/jdom/filter/package.html
2010-03-30 07.22.13 365 ERR0312! HTH
org/jdom/input/package.html
2010-03-30 07.22.23 432 ERR0312! HTH
org/jdom/output/package.html
2010-03-30 07.22.31 610 ERR0312! HTH