Creating The Jcdpsselect 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
public com.stc.codegen.util.TypeConverter typeConverter;
public void receive( com.stc.connector.appconn.file.FileTextMessage
input, dtd.otdInputDTD_622919076.Emp otdInputDTD_Emp_1,
otdVSAM.OtdVSAMOTD otdVSAM_1,
com.stc.connector.appconn.file.FileApplication FileClient_1 )
throws Throwable
{
\\ Writes out a message stating records are being inserted.
FileClient_1.setText( "Inserting records into CICSEMP table .."
);
FileClient_1.write();
\\ Unmarshals data from the input XML data into the
otdInputDTD_DBEmployees OTD.
\\ Calls the otdVSAM OTD, and inserts multiple records into the
database via a For Loop. The first insert() method opens the table
result set for insert operations, while the insertRow() method
inserts records into the table result set.
for (int i1 = 0; i1 < otdInputDTD_Emp_1.countX_sequence_A();
i1 += 1) {
otdInputDTD_Emp_1.getX_sequence_A( i1 ).getENAME() );
typeConverter.stringToInt( otdInputDTD_Emp_1.getX_sequence_A( i1
).getPHONE(), "#", false, 0 ) );
otdInputDTD_Emp_1.getX_sequence_A( i1 ).getMAILID() );
java.math.BigDecimal( otdInputDTD_Emp_1.getX_sequence_A( i1
).getSALARY() ) );
typeConverter.stringToDouble( otdInputDTD_Emp_1.getX_sequence_A( i1
).getJOBID(), "#.000000;-#.000000", false, 0 ) );
typeConverter.stringToInt( otdInputDTD_Emp_1.getX_sequence_A( i1
).getEMPID(), "#", false, 0 ) );
typeConverter.stringToShort( otdInputDTD_Emp_1.getX_sequence_A( i1
).getDEPTID(), "#", false, 0 ) );
otdInputDTD_Emp_1.getX_sequence_A( i1 ).getDEPARTMENT() );
\\ Writes a message to confirm an inserted records.
}
FileClient_1.setText( "Done Insert." );
FileClient_1.write();
}
}

Creating the jcdPsSelect Business Rules

The jcdPsSelect Collaboration implements the Input Web Service Operation to read the
TriggerPsSelect.in file. It then copies the database resultset (as noted in the prepared
VSAM eWay Adapter User's Guide
otdInputDTD_Emp_1.unmarshalFromString( input.getText() );
otdVSAM_1.getCICSEMP().insert();
otdVSAM_1.getCICSEMP().setENAME(
otdVSAM_1.getCICSEMP().setPHONE(
otdVSAM_1.getCICSEMP().setMAILID(
otdVSAM_1.getCICSEMP().setSALARY( new
otdVSAM_1.getCICSEMP().setJOBID(
otdVSAM_1.getCICSEMP().setEMPID(
otdVSAM_1.getCICSEMP().setDEPTID(
otdVSAM_1.getCICSEMP().setDEPARTMENT(
otdVSAM_1.getCICSEMP().insertRow();
Building and Deploying the prjVSAM_JCD Sample Project
100
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