Creating The Jcdtableselect 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
FileClient_1.setText( "Selecting record(s) from CICSEMP table
via Prepared Statement select .." );
\\ Copies the database resultset into the otdInputDTD_DBEmployee OTD
and selects all available records from the database. The
executeQuery() method executes the prepared statement query, while
the resultsAvailable() method ensures all rows are retrieved in the
while loop.
otdVSAM_1.getSelect_ps().setENAME( "" );
otdVSAM_1.getSelect_ps().executeQuery();
if (otdVSAM_1.getSelect_ps().resultsAvailable()) {
(otdVSAM_1.getSelect_ps().get$Select_psResults().next()) {
otdVSAM_1.getSelect_ps().get$Select_psResults().getENAME() );
typeConverter.intToString(
otdVSAM_1.getSelect_ps().get$Select_psResults().getPHONE(), "#",
false, "" ) );
otdVSAM_1.getSelect_ps().get$Select_psResults().getMAILID() );
otdVSAM_1.getSelect_ps().get$Select_psResults().getSALARY().toString(
) );
typeConverter.doubleToString(
otdVSAM_1.getSelect_ps().get$Select_psResults().getJOBID(),
"#.000000;-#.000000", false, "" ) );
typeConverter.intToString(
otdVSAM_1.getSelect_ps().get$Select_psResults().getEMPID(), "#",
false, "" ) );
typeConverter.shortToString(
otdVSAM_1.getSelect_ps().get$Select_psResults().getDEPTID(), "#",
false, "" ) );
otdVSAM_1.getSelect_ps().get$Select_psResults().getDEPARTMENT() );
otdOutputDTD_Emp_1.marshalToString() );
} else {
}
\\ Writes a message to JCD_PsSelect_output0.dat to confirm when
records are selected, or when no records are available.
FileClient_1.setText( "Done Select." );
FileClient_1.write();
}
}

Creating the jcdTableSelect Business Rules

The jcdTableSelect Collaboration implements the Input Web Service Operation to read
the TriggerTableSelect.in file. It then copies the database resultset into the
otdInputDTD_CICSEMP OTD and selects all available records from the database that
VSAM eWay Adapter User's Guide
FileClient_1.write();
while
otdOutputDTD_Emp_1.setENAME(
otdOutputDTD_Emp_1.setPHONE(
otdOutputDTD_Emp_1.setMAILID(
otdOutputDTD_Emp_1.setSALARY(
otdOutputDTD_Emp_1.setJOBID(
otdOutputDTD_Emp_1.setEMPID(
otdOutputDTD_Emp_1.setDEPTID(
otdOutputDTD_Emp_1.setDEPARTMENT(
FileClient_1.setText(
FileClient_1.write();
}
FileClient_1.setText( "No record found!" );
FileClient_1.write();
Building and Deploying the prjVSAM_JCD Sample Project
102
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