Java Sample Application
In this sample you will create a Java application that sends input to and receives output from your client operation, using a Java bean and a CICS host type. The sample application and the files used to create and deploy it are all installed on your computer when you install Transaction Studio
The sample consists of several different files with different purposes. The purposes of each file are explained in the sections after the list below. The files below can be found in the following location:
In this sample, AMNU.jar (from the COBOL copybook, AMNU.cbl) is provided. You do not have to use the Transaction Studio to create it. However, you can generate this file yourself by following these steps:
The application in Sample.java demonstrates how to use the API created by the Transaction Studio to execute the transaction AMNU on your host with some provided input values, and writes the returned values to OutputFromHost.txt.
BridgeAPI.jar is not included in the Samples directory, but is included in VBI distributable. It is a runtime dependency for communication with the host.
Before running the Sample application, you will need to provide some configuration information on where it can find your host, and how to authenticate. This can be done in the AMNU.properties file, or in the application code. For the purposes of this sample, we recommend you put the host and port values in the properties file, and username and password in the run.bat or run.sh script used to execute the sample. See the comments in AMNU.properties and Sample.java for more information
|Using Java Development Environments|
|Java Input and Output Examples|