Top
NetCOBOL V11.0 Getting Started
FUJITSU Software

A.28 Sample 27: Using the COM Linkage-COBOL Server Program (ASP Client)

Sample 27 shows an example where a COM server created using the COBOL COM server function is used by calling it from active server pages (ASP) Visual Basic(R) Scripting Edition (VBScript).

For details on ASP and VBScript, refer to commercially available handbooks.

Overview

ASP is one of the methods of constructing dynamic Web applications by embedding script language in the HTML document.

A COM server object can be created in ASP VBScript by using a server object in which the CreateObject method is installed. The method provided by the COM server can be called from the created object.

Use this function to create online store Web applications using the COBOL server program in Sample 25.

Available Programs

Operations Necessary Before Execution

The COM server program created in Sample 25 is used in this sample. Build the COM server program, register it as the COM server, and configure the execution environment information.

Next, register Sample 27 with the Internet Service Manager as follows:

  1. Activate the Internet Service Manager, select "specified Web site", and select "Virtual Directory" from the "New Creation" field on the "Context" menu.

  2. Input a virtual directory name, and then specify the physical path of Sample 27 with the ASP page file.

Execution

Domain name "user" and virtual directory name "sample27" are assumed.

Microsoft Internet Explorer is used as the WWW browser.

  1. Input the URL as shown below.

    The menu screen is displayed. Select "Catalog Shopping" and click the OK button.

  2. The member authorization screen is displayed. Input a user ID and password and click the OK button. Valid user ID’s are USER0001 to USER0010. The passwords are identical to the user ID.

    Note that the entered password is not displayed.

  3. The catalog screen is displayed. Input the number of items to be ordered and click the Order button.

  4. The order check screen is displayed. Click the Order Issue button.

  5. The order reception screen is displayed. The (2) menu screen is redisplayed when the Menu button is clicked.