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.
To use this program, the following products are necessary:
- Microsoft(R) Windows(R) 2000 Server operating system
- Microsoft(R) Windows(R) 2000 Advanced Server operating system
- Microsoft(R) Windows Server(R) 2003 Standard Edition
- Microsoft(R) Windows Server(R) 2003 Enterprise Edition
- Microsoft(R) Windows Server(R) 2008 Standard Edition
- Microsoft(R) Windows Server(R) 2008 Enterprise Edition
Microsoft(R) Internet Information Server 5.0 or later
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
MENU.ASP (ASP page file)
AUTH.ASP (ASP page file)
CATALOG.ASP (ASP page file)
CONFIRM.ASP (ASP page file)
ORDER.ASP (ASP page file)
STYLE.CSS (style sheet file)
CATALOGTITLE.GIF (image file)
FJLOGO.GIF (image file)
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:
Activate the Internet Service Manager, select "specified Web site", and select "Virtual Directory" from the "New Creation" field on the "Context" menu.
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.
Input the URL as shown below.
The menu screen is displayed. Select "Catalog Shopping" and click the OK button.
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.
The catalog screen is displayed. Input the number of items to be ordered and click the Order button.
The order check screen is displayed. Click the Order Issue button.
The order reception screen is displayed. The (2) menu screen is redisplayed when the Menu button is clicked.