You can enter and edit custom code directly in the Custom Properties dialog.
The code you enter forms the body of the function that is called when your Custom operator is asked for its next row of data. You can enter any JavaScript code here that would be valid inside a function body.
Your code has access to the variables structure, including an object called variables.<yourCustomOperatorName>, into which you can insert state variables, using expressions such as:
variables.myOperator.foo = 5;
In addition, you have access to all the incoming result sets from objects connected to your operator. They are named <precedingOperatorName>RS. (For example, if an operator that feeds into the Custom operator is called CustomerInfo, a variable named Customer-InfoRS will be available to access it.) Finally, you have access to the output ResultSet object for your operator, which is named outputRS. This is actually a subclass of java.sql.ResultSet on which you can only set values for the columns in the current row. The runtime architecture takes care of incrementing the row each time your operator is called.
If your code needs to call external functions or if you need to import other Java classes in order to do your custom processing, you can add these to the .jsi file for your model.
Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.