Creating The Jcdupdate Business Rules - Sun Microsystems SUN SEEBEYOND eWAY User Manual

Adapter for vsam 5.1.3
Table of Contents

Advertisement

Chapter 7
Implementing the VSAM eWay Sample Projects
\\ Copies the database resultset into the otdInputDTD_CICSEMP (XML
OTD) and selects all available records from the database that meet the
criteria EMPID=49. Checking the next() method ensures all rows are
retrieved in the while loop.
otdVSAM_1.getCICSEMP().select( input.getText() );
while (otdVSAM_1.getCICSEMP().next()) {
otdVSAM_1.getCICSEMP().getENAME() );
otdVSAM_1.getCICSEMP().getPHONE(), "#", false, "" ) );
otdVSAM_1.getCICSEMP().getMAILID() );
otdVSAM_1.getCICSEMP().getSALARY().toString() );
otdVSAM_1.getCICSEMP().getJOBID(), "#.000000;-#.000000", false, "" )
);
otdVSAM_1.getCICSEMP().getEMPID(), "#", false, "" ) );
otdVSAM_1.getCICSEMP().getDEPTID(), "#", false, "" ) );
otdVSAM_1.getCICSEMP().getDEPARTMENT() );
\\ marshals XML data from the output data into the
otdOutputDTD_CICSEMP_1.marshallToString() method.
);
}
\\ Writes a message to confirm when records are selected, or when no
records are available.
FileClient_1.setText( "Done table select." );
FileClient_1.write();
}
}

Creating the jcdUpdate Business Rules

The jcdUpdate Collaboration implements the Input Web Service Operation to read the
TriggerUpdate.in. file and then update arecord under a specific criteria. The
Collaboration also writes a message to JCD_Update_output0.dat to confirm an
updated record.
Note: The where clause in the business rule reads the trigger value as a placeholder for
input. This permits you to modify the query to select a specific record. Also note that
all records are selected from the database when the TriggerUpdate.in file is empty.
The jcdUpdate Collaboration contains the Business Rules displayed in Figure 59.
VSAM eWay Adapter User's Guide
otdOutputDTD_Emp_1.setENAME(
otdOutputDTD_Emp_1.setPHONE( typeConverter.intToString(
otdOutputDTD_Emp_1.setMAILID(
otdOutputDTD_Emp_1.setSALARY(
otdOutputDTD_Emp_1.setJOBID( typeConverter.doubleToString(
otdOutputDTD_Emp_1.setEMPID( typeConverter.intToString(
otdOutputDTD_Emp_1.setDEPTID( typeConverter.shortToString(
otdOutputDTD_Emp_1.setDEPARTMENT(
FileClient_1.setText( otdOutputDTD_Emp_1.marshalToString()
FileClient_1.write();
Building and Deploying the prjVSAM_JCD Sample Project
104
Section 7.6
Sun Microsystems, Inc.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sun seebeyond eway 5.1.3

Table of Contents