The Update Operation; The Delete Operation - Sun Microsystems SUN SEEBEYOND eWAY User Manual

Adapter for vsam 5.1.3
Table of Contents

Advertisement

Chapter 6
Using VSAM Operations
FileClient_1.setText( "Done Insert." );
FileClient_1.write();
}
}

The Update Operation

To perform an update operation on a table:
1
Execute the update() method.
2
Using a while loop together with next(), move to the row that you want to update.
3
Assign updating value(s) to the fields of the table OTD
4
Update the row by calling updateRow().
package prjVSAM_JCDjcdALL;
public class jcdUpdate
{
public com.stc.codegen.logger.Logger logger;
public com.stc.codegen.alerter.Alerter alerter;
public com.stc.codegen.util.CollaborationContext collabContext;
public com.stc.codegen.util.TypeConverter typeConverter;
public void receive(
com.stc.connector.appconn.file.FileTextMessage input,
otdVSAM.OtdVSAMOTD otdVSAM_1, dtd.otdOutputDTD_1935483687.Emp
otdOutputDTD_Emp_1, com.stc.connector.appconn.file.FileApplication
FileClient_1 )
throws Throwable
{
FileClient_1.setText( "Update the Department .. " );
FileClient_1.write();
otdVSAM_1.getCICSEMP().update( input.getText() );
while (otdVSAM_1.getCICSEMP().next()) {
}
FileClient_1.setText( "Done Update." );
FileClient_1.write();
}
}

The Delete Operation

To perform a delete operation on a table:
1
Execute the delete() method.
In this example DELETE an employee.
package prjVSAM_JCDjcdALL;
public class jcdDelete
{
VSAM eWay Adapter User's Guide
otdVSAM_1.getCICSEMP().setDEPARTMENT( "QAQAQA" );
otdVSAM_1.getCICSEMP().updateRow();
58
VSAM eWay Database Operations (JCD)
Sun Microsytems, Inc.
Section 6.2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sun seebeyond eway 5.1.3

Table of Contents