Frequently, error messages require that you take action to resolve the problem indicated in the message text. To simplify day-to-day synchronization management, you might choose to add your own logic to automatically perform these actions when a particular error message is issued.
Procedure
DSYUserExits.propertiesThis file associates a message number with a routine or program that runs when the message number is written to the log. This properties file supports many different parameters.
# Formats: # {DSY message id}={class to execute} {environment parameters} # {DSY message id}={command to execute} {environment parameters} # where # {DSY message id}: # a DSY* message id that you want to define a user exit for (such as # DSYD000E) # {class to execute}: # the name the Java .class to execute. This class must implement the # com.ibm.mobileservices.DSYUserExitsInterface # {command to execute}: # the name the command to execute (such as pager.exe) # {environment parameters}: # a series of parameters to pass in to the class or command to execute # # Optional command tags: # <DSYID> = the message id # <DSYIDMSG> = the message id message text # <DSYIDMSG_> = the message id message text, but all blanks are # converted to underscores # <DSYMSG> = the message text # <DSYMSG_> = the message text, but all blanks are converted to # underscores. # <SERVER_IPADDRESS> = the server ip address (such as 9.112.19.143) # <SERVER_NAME> = the server name (such as mpauser.stl.ibm.com) # # Refer to the messages section for available DSY message ids. # # Example 1: # If you wanted to have user exists for DSYD000E, you would add a line # similar to the following: # # DSYD000E=pager.exe number=5551234 id=<DSYID> msg=<DSYMSG_> # # When a DSYD000E message was issued, the pager.exe command would be executed # with two environment parameters would be set: number=5551234, id=DSYD000E # and msg=DSY message text, substituting an underscore (_) for blanks. # # Example 2: # If you wanted to have a class executed when a DSYD020E was encountered, # you would add a line similar to the following: # # DSYD020E=com.ibm.mobileservices.DSYUserExitsSample.class # # When a DSYD020E was issued, the com.ibm.mobileservices.DSYUserExitsSample # class would be executed.
message_number=action parameter=valuewhere:
The action to be performed must be a reference to a valid routine or program.
For example, suppose that you want to include a user exit that pages you when message DSYD000E is issued. You could write a program called pager.exe that dials your pager, and includes the pager number as a parameter. The line in the DSYUserExits file might look something like this:
DSYD000E=pager.exe number=9980674
You can also include the following parameters and variables with the command:
The following example dials the same pager, but submits both the message number and its text as parameters so they appear in the pager window:
DSYD000E=pager.exe number=9980674 id=dsyid msg=dsymsg
The Sync Server does not check the validity of your entries in the DSYUserExits properties file, nor does it validate that the action associated with the message has been completed.
Use the DSYUserExitsTest.bat file tool to test a user exit routine. Use the following format to test:
DSYUserExitsTest.bat dsy_message_id
where dsy_message_id is the message number you want to simulate. If you do not provide a message ID, a list of available message IDs is displayed.
Example command with message id DSYS001I:
DSYUserExitsTest.bat dsys001i
The DSYS001I message is generated and the user exit defined for this message number is started.
Example command with an invalid message number:
DSYUserExitsTest.bat zzz
The output from the DSYUserExitsTest tool is:
DSYUserExitsTest DSY message id 'ZZZ' not found. Valid DSY message id's are: DSYA000E, DSYA001E, DSYD000E, DSYD002E, DSYD006E, DSYD007E, ...
Conceptos relacionados
Tareas relacionadas