Chapter 7 Section 7.6
Implementing the VSAM eWay Sample Projects Building and Deploying the prjVSAM_JCD Sample Project
VSAM eWay Adapter User’s Guide 104 Sun Microsystems, Inc.
\\ 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()) {
otdOutputDTD_Emp_1.setENAME(
otdVSAM_1.getCICSEMP().getENAME() );
otdOutputDTD_Emp_1.setPHONE( typeConverter.intToString(
otdVSAM_1.getCICSEMP().getPHONE(), "#", false, "" ) );
otdOutputDTD_Emp_1.setMAILID(
otdVSAM_1.getCICSEMP().getMAILID() );
otdOutputDTD_Emp_1.setSALARY(
otdVSAM_1.getCICSEMP().getSALARY().toString() );
otdOutputDTD_Emp_1.setJOBID( typeConverter.doubleToString(
otdVSAM_1.getCICSEMP().getJOBID(), "#.000000;-#.000000", false, "" )
);
otdOutputDTD_Emp_1.setEMPID( typeConverter.intToString(
otdVSAM_1.getCICSEMP().getEMPID(), "#", false, "" ) );
otdOutputDTD_Emp_1.setDEPTID( typeConverter.shortToString(
otdVSAM_1.getCICSEMP().getDEPTID(), "#", false, "" ) );
otdOutputDTD_Emp_1.setDEPARTMENT(
otdVSAM_1.getCICSEMP().getDEPARTMENT() );
\\ marshals XML data from the output data into the
otdOutputDTD_CICSEMP_1.marshallToString() method.
FileClient_1.setText( otdOutputDTD_Emp_1.marshalToString()
);
FileClient_1.write();
}
\\ 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.