SMP/E for z/OS User's Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


JAR updates in PTFs

SMP/E for z/OS User's Guide
SA23-2277-01

Suppose some time after your FMID has been made available and is being used, a defect is discovered (an APAR). The TicTacToe applet requires a change because of the APAR. Specifically, you need to add another image file (images/new.gif), and replace the class file (TicTacToe.class) with an updated copy of the class file. Further, suppose that the change team has placed the new image file and updated class file in directories, as follows:
 
/u/apars/ow12345/TicTacToe/TicTacToe.class
/images/new.gif
You can instruct SMP/E to add new files to a JAR file, and replace files in an existing JAR file by using the ++JARUPD MCS. If files TicTacToe.class and new.gif were to be packaged and archived together in a JAR file of their own, then that file, in SMP/E terms, would be considered a JAR update file. For example, given the preceding directory structure for the new and updated files, the jar command could be used to create the JAR update file as follows:
  
cd /u/apars/ow12345/TicTacToe/
jar cvf ABCTTT.jarupd *
The resultant JAR file ABCTTT.jarupd would be packaged as a ++JARUPD in a PTF as in the following example:
   
++PTF(UW12345).                                                      
++VER(Z038) FMID(fmid).                                             
++JARUPD(ABCTTT)                                                     
    PARM(PATHMODE(0,6,4,4)) JARPARM(0M)                                
    LINK('../TicTacToe.jar')                                           
    SYMLINK('../../../../../usr/lib/TicTacToe.jar')                    
    SYMPATH('../../usr/lpp/abc/bin/TicTacToe.jar').               
Suppose now another defect (APAR) is discovered against the TicTacToe applet, and you must update the /audio/beep.au file within the archive. Again, you can use the ++JARUPD MCS to describe an update to the archive. Assuming the replacement audio file resides in a directory as follows:
 
/u/apars/ow54321/TicTacToe/audio/beep.au
The following jar command could create the necessary JAR update:
  
cd /u/apars/ow54321/TicTacToe/
jar cvf ABCTTT.jarupd *
The resulting JAR file ABCTTT.jarupd would be packaged as a ++JARUPD in a PTF as in the following example:
  
++PTF(UW54321).                                                      
++VER(Z038) FMID(fmid) PRE(UW12345).                                 
++JARUPD(ABCTTT)                                                     
    PARM(PATHMODE(0,6,4,4)) JARPARM(0M)                                
    LINK('../TicTacToe.jar')                                           
    SYMLINK('../../../../../usr/lib/TicTacToe.jar')                    
    SYMPATH('../../usr/lpp/abc/bin/TicTacToe.jar').                    

Notice the second PTF has a prerequisite for the first PTF. Such a relationship is required by SMP/E because both PTFs update the same JAR file.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014