Chapter 6

Section 6.2

Using VSAM Operations

VSAM eWay Database Operations (JCD)

}

}

The Insert Operation

To perform an insert operation on a table:

1Execute the insert() method. Assign a field.

2Insert the row by calling insertRow()

This example inserts an employee record:

package prjVSAM_JCDjcdALL;

public class jcdInsert

{

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, dtd.otdInputDTD_622919076.Emp otdInputDTD_Emp_1, otdVSAM.OtdVSAMOTD otdVSAM_1, com.stc.connector.appconn.file.FileApplication FileClient_1 )

throws Throwable

{

FileClient_1.setText( "Inserting records into CICSEMP table

.." );

FileClient_1.write();

otdInputDTD_Emp_1.unmarshalFromString( input.getText() ); otdVSAM_1.getCICSEMP().insert();

for (int i1 = 0; i1 < otdInputDTD_Emp_1.countX_sequence_A(); i1 += 1) {

otdVSAM_1.getCICSEMP().setENAME( otdInputDTD_Emp_1.getX_sequence_A( i1 ).getENAME() );

otdVSAM_1.getCICSEMP().setPHONE( typeConverter.stringToInt( otdInputDTD_Emp_1.getX_sequence_A( i1 ).getPHONE(), "#", false, 0 ) );

otdVSAM_1.getCICSEMP().setMAILID( otdInputDTD_Emp_1.getX_sequence_A( i1 ).getMAILID() );

otdVSAM_1.getCICSEMP().setSALARY( new java.math.BigDecimal( otdInputDTD_Emp_1.getX_sequence_A( i1 ).getSALARY() ) );

otdVSAM_1.getCICSEMP().setJOBID( typeConverter.stringToDouble( otdInputDTD_Emp_1.getX_sequence_A( i1 ).getJOBID(), "#.000000;-#.000000", false, 0 ) );

otdVSAM_1.getCICSEMP().setEMPID( typeConverter.stringToInt( otdInputDTD_Emp_1.getX_sequence_A( i1 ).getEMPID(), "#", false, 0 ) );

otdVSAM_1.getCICSEMP().setDEPTID( typeConverter.stringToShort( otdInputDTD_Emp_1.getX_sequence_A( i1 ).getDEPTID(), "#", false, 0 ) );

otdVSAM_1.getCICSEMP().setDEPARTMENT( otdInputDTD_Emp_1.getX_sequence_A( i1 ).getDEPARTMENT() );

otdVSAM_1.getCICSEMP().insertRow();

}

VSAM eWay Adapter User’s Guide

57

Sun Microsytems, Inc.

Page 57
Image 57
Sun Microsystems 5.1.3 manual Insert Operation, OtdVSAM1.getCICSEMP.insertRow

5.1.3 specifications

Sun Microsystems 5.1.3 represents a significant version in the evolution of Sun's software products, particularly in the area of network operating systems and development tools. Released during a time when Sun was a leading enterprise in the field of computing, 5.1.3 brought a host of new features, enhancements, and technologies that catered to the demands of users looking for robust and reliable IT infrastructure.

One of the defining characteristics of Sun Microsystems 5.1.3 was its enhanced scalability. The operating system was designed to handle large amounts of data processing and support numerous simultaneous users. This feature made it particularly attractive for businesses operating in resource-intensive environments such as finance, telecommunications, and large-scale enterprise applications.

A significant focus for 5.1.3 was its improved networking capabilities. The release integrated advanced networking protocols, allowing for better interoperability between systems. This feature enabled seamless communication across diverse hardware platforms, thus enhancing productivity and collaboration among users.

In terms of software development, Sun Microsystems 5.1.3 included an updated toolset that made application development more accessible. Its support for various programming languages, including C, C++, and Java, facilitated a versatile development environment. The included Sun C/C++ Compiler was particularly noteworthy, providing developers with optimized performance and debugging features.

Security features were also a priority in 5.1.3, addressing growing concerns over data protection and system vulnerabilities. The system implemented advanced user authentication, role-based access controls, and encrypted communications, thereby bolstering the integrity of user data and enhancing overall system security.

Additionally, Sun Microsystems 5.1.3 incorporated reliable file system technologies like the Sun File System (UFS), which offered improved performance and data integrity. This file system was particularly effective for enterprises that required high availability and data protection due to its robust recovery options.

Overall, Sun Microsystems 5.1.3 showcased a blend of advanced technologies, user-oriented features, and robust performance characteristics that positioned it as a compelling choice for enterprises seeking reliable and efficient computing solutions. It illustrated Sun's continuous commitment to innovation, ensuring users were equipped with the cutting-edge tools necessary to thrive in an increasingly digital world.