20.5. Example WSCP procedures

This section contains a number of sample procedures, which you should feel free to use and modify for your own purposes.

20.5.1. Sample procedures: statusToString, checkStatus

Figure 707 shows two example procedures that may be useful when working with WebSphere.

Figure 707. Two example procedures
 # # Converts a WscpStatus to its corresponding string translation # proc statusToString {{status -1}} { global errorCode if {$status == -1 && $errorCode != "NONE"} { set status $errorCode } java::call com.ibm.ejs.sm.ejscp.WscpStatus statusToString $status } # # Tests whether errorCode matches the expected status value # proc checkStatus {expectedStatus} { global STATUS errorCode if {$errorCode == $STATUS($expectedStatus)} ...

Get WebSphere V3.5 Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.