C H A P T E R  5

Verifying the Installation

A set of sample programs comes with the Sun MTP software. Running one of these programs verifies that you have properly installed the software. This chapter describes how to use the sample programs. It contains the following topics:

The $UNIKIX/test directory contains the sample applications for COBOL, C, and relational databases.

If you are using Liant Open PL/I, the sample application is located in the $LPI_PRODUCT_DIR/examples/OpenPLI/kix directory. See Running the PL/I Sample Application.


Running the COBOL Sample Application

Before you can run the sample application, you must:


procedure icon  To Set Up the COBOL Primer Region

1. Log in as the user who installed Sun MTP, not as root.

2. Execute the env command to verify that the UNIKIX, KIXLICDIR, COBDIR, LD_LIBRARY_PATH, and PATH environment variables are set.

If they are not set, source the setup file you created in Creating the Sun MTP Setup File.

3. Verify that the TERM environment variable reflects the terminal type you are using.

4. Execute the kixprimer setup script to set the Primer region's environment variables.

kixprimer sets the $KIXSYS, $KIXPROGS, $KIXMAPS, $KIXDATA, and $KIXLIB environment variables to the directory $UNIKIX/test/primer/cobol.

5. Sun MTP provides a compiled version of the ACCT application for the VSAM environment.

a. Change to the $KIXSYS directory, if you are not already there:

$ cd $KIXSYS

b. Execute the build_ACCT.sh shell script to compile the programs:

$ build_ACCT.sh


procedure icon  To Run the COBOL Sample Application

1. Start the region by typing kixstart at a command prompt.

For more information about starting Sun MTP, refer to the Sun Mainframe Transaction Processing Software Configuration Guide.

2. Make a local client connection using the unikix command.

For example, if you are using an X terminal with a 101-key keyboard, type:

$ xtermunikix unikix

Refer to the Sun Mainframe Transaction Processing Software Configuration Guide for more information about connecting to Sun MTP.

3. Press any key to clear the Sun MTP copyright screen.

4. Type ACCT in the upper left corner of a blank transaction screen and press the Enter key (not the Return key).

The transaction is executed and the screen in FIGURE 5-1 is displayed.

  FIGURE 5-1 COBOL Application Screen--Example

Screen shot showing the data entry screen that is displayed when the ACCT transaction is entered. There are two entry fields: SURNAME and FIRST NAME. Prompts indicate to press Enter or Clear.

5. Type GREENFIELD in the SURNAME field and press the Enter key.

A list of records that match the surname value is displayed.

6. Clear the screen by pressing the Clear key.

7. Shut down the region.

Type the following transaction in the upper left corner of the screen and press Enter.

CSMT SHUT,YES


Running the C Sample Application

The directory $UNIKIX/test/primer/C contains the C sample application. Refer to the Sun Mainframe Transaction Processing Software Developer's Guide for more information about using C programs.


procedure icon  To Set Up the C Primer Region

1. Make sure that a compatible C compiler is installed.

2. Log in as the user who installed Sun MTP, not as root.

3. Execute the env command to verify that the UNIKIX, KIXLICDIR, LD_LIBRARY_PATH, and PATH environment variables are set.

If they are not set, source the setup file you created in Creating the Sun MTP Setup File.

4. Verify that the TERM environment variable reflects the terminal type you are using.

5. Execute the kixprimer setup script to set the other variables.

kixprimer sets the KIXSYS, KIXPROGS, KIXMAPS, and KIXDATA environment variables to the directory $UNIKIX/test/primer/C.

6. There is a compiled version of the ACCT application for the VSAM environment.

a. Change to the $KIXSYS directory if you are not already there:

$ cd $KIXSYS

b. Execute the build_ACCT.sh shell script to compile the programs:

$ build_ACCT.sh


procedure icon  To Run the C Sample Application

1. Start the region and make a local connection.

See Running the COBOL Sample Application.

2. Close the Sun MTP copyright screen by pressing any key.

3. Type the ACCT transaction on a blank transaction screen and press Enter.

4. When the sample application screen is displayed, type GREENFIELD in the SURNAME field and press Enter.

  FIGURE 5-2 C Application Screen--Sample

Screen shot showing the data entry screen that is displayed when the ACCT transaction is entered. There are two entry fields: SURNAME and FIRST NAME. Prompts indicate to press Enter or Clear.

5. Sun MTP should display a list of records matching the surname value.

6. Press the Clear key to clear the screen.

7. Shut down the region using the CSMT SHUT,YES transaction.


Running the PL/I Sample Application

After installing PL/I, the account application is located in the $LPI_PRODUCT_DIR/examples/OpenPLI/kix directory. The following table shows the directory's contents. The PROJECT environment variable used in the procedure To Set Up the PL/I Primer Region points to this directory.

TABLE 5-1 Contents of the PL/I kix Directory

Subdirectory

Files

 

 

bin

M.primer

 

 

data

ACCTFILE.dta

ALT1.dta

ALT3.dta

 

ACCTFILE.idx

ALT1.idx

ALT3.idx

 

ACIXFILE.dta

ALT2.dta

 

 

ACIXFILE.idx

ALT2.idx

 

inc

ACCTREC.inc

ACIXREC.inc

ALPHANUM.dcl

lib

<empty>

 

 

maps

ACCTSET.bms

Makefile

 

src

ACCT00.plt

ACCT01.plt

ACCT02.plt

 

ACCT03.plt

Makefile

debug.plt

sys

CATALOG.dta

pct.tbl

fct.tbl

 

CATALOG.idx

ppt.tbl

primer.csh

 

primer.sh

sit.tbl

snt.tbl

 

vcs.cfg

vct.tbl

 


Before running the PL/I sample application, you must:


procedure icon  To Set Up the PL/I Primer Region

1. Change to the directory where the setup scripts are located:

$ cd $LPI_PRODUCT_DIR/examples/OpenPLI/kix/sys

2. Set the environment variables, making sure to set $LD_LIBRARY_PATH.

3. Source the setup script.

4. If you have not already done so, change to the $UNIKIX/src directory and run kixinstall to select the Liant Open PL/I language option.

This creates a makefile in the $UNIKIX/src directory. When executed, this makefile will create the new transaction server in the $UNIKIX/local/bin directory.

5. Make a backup copy of the makefile:

$ cp $UNIKIX/src/makefile $PROJECT/bin

6. If you want to change the location of the transaction server, edit $PROJECT/bin/makefile and change BINDIR=${UNIKIX}/local/bin to another value, such as BINDIR=${KIXBIN}

7. Change directory to $UNIKIX/src and run make to build the sample application, the maps, and a new transaction server.

$ cd $PROJECT/src
$ make

An illustration of the makefile used in this procedure is shown in the Sun Mainframe Transaction Processing Software Developer's Guide.

After the modules are built, the bin and lib subdirectories contain the files listed in the following table.

Subdirectory

Files

 

bin

makefile

unikixtran

 

unikixtranSOL

unikixtrand

lib

acct00.so

acct01.so

 

acct02.so

acct03.so

 

acct04.so

libacct.sl(so)



procedure icon  To Run the PL/I Sample Application

1. Start the region and a local client from an Xterm:

$ cd $KIXSYS
$ kixstart
$ xtermunikix unikix

2. Close the Sun MTP copyright screen by pressing any key.

3. Type the ACCT transaction on a blank transaction screen and press Enter.

4. When the sample application screen is displayed, type GREENFIELD in the SURNAME field and press Enter.

  FIGURE 5-3 PL/I Application Screen--Sample

Screen shot showing the data entry screen that is displayed when the ACCT transaction is entered. There are two entry fields: SURNAME and FIRST NAME. Prompts indicate to press Enter or Clear.

5. Sun MTP should display a list of records matching the surname value.

6. Press the Clear key to clear the screen.

7. Shut down the region with the CSMT SHUT,YES transaction.