32
Web Servers and “The Common Gateway Interface”

Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Embed Size (px)

Citation preview

Page 1: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Web Servers and“The Common Gateway

Interface”

Page 2: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

Topics to Cover

What is CGI? What is the “Internet Application Wizard” and

how does it work? Let’s see it work within a GDT Environment!

Batch Job Submission via the Web Server TPR calling a Web Service to return information See Live!

Page 3: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Common Gateway Interface

One of the longest-established methods of writing an application for the Internet or an intranet is the server-side program.

Server-side programs are often known as CGI programs, or simply CGIs.

Page 4: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

How to create a CGI program

Net Express contains all the tools you need to create CGI-based applications in COBOL. Internet Application Wizard Create three flavors of

internet application: Create HTML pages and forms and server-side programs to

access relational databases over the Internet or an Intranet. Turn a COBOL subroutine into an Internet application

instantly. Create a skeleton server-side program using pages and

forms from Form Designer.

Page 5: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

Internet Application Wizard

Reduces the amount of effort involved in creating server-side programs and associated HTML forms.

Server-side programs can easily be generated from: Existing COBOL programs SQL databases HTML forms (designed with Form Designer in Net

Express)

Page 6: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

Highlights of the Wizard

Where necessary, the Internet Application Wizard generates the HTML forms to accompany the server-side program.

All the generated files can be automatically added to the current project.

You can create applications for use with CGI (supported by all Web servers).

When you have created an application with the wizard, you can use it as it is or you can modify the forms with Form Designer and extend the COBOL source code.

Page 7: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Create a new Internet Application project via the Micro Focus Net Express IDE (NE 4.0)

Page 8: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

What Internet Application do you want to generate, the source to be used and the type of Application?

Page 9: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Define the Project Name and Location

Page 10: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

You need to provide the Source COBOL program.

Page 11: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

A closer look at the COBOL program. Note the use of the Linkage Session and the Using clause with Procedure Division.

Page 12: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

The heart of the Procedure Division

Page 13: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Define the Application Style

Page 14: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

The Wizard’s Generated File names

Page 15: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

The Parameter Assignments The Parameter

Assignments page of the Internet Application Wizard enables you to assign different types of form controls (radio buttons, checkboxes, text input etc.) to parameters in the Linkage Section of your COBOL program.

Page 16: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

For each COBOL parameter that is represented on an HTML form, set the type of control that should represent it.

For each COBOL parameter, specify whether the relevant form control should appear on the input form, the output form, both or none. You can do this by clicking in the appropriate row of the I/O column and selecting from the entries in the drop-down menu. You can set the I/O column for all the parameters in a group by right-clicking on the group item in the tree view and clicking In, Out, Both or N/A on the popup menu. All subitems inherit the group item setting.

Page 17: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

The End of the Wizard. It is that easy!

Page 18: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

The Internet Application Wizard has now created all of the programs and web pages that are needed to run the web application as a CGI. Generally the CGI is now ready, but since we are needing to run this in the GDT environment we have to do some more steps.

Page 19: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Preparation of the Build Settings

Page 20: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

You need to link to the Object that allows access to GDT (GSUBJBI.OBJ). Additionally all external Micro Focus functions have to be linked in (fhrdrpwd.obj, cbldc001.obj, mffh.obj and outddfh.obj).

Page 21: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Time to Rebuild the Whole Project

Page 22: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Results of the Rebuild

Page 23: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Configure the Application Environment

Page 24: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Deploy the CGI to IIS. GDTTCW virtual directory

Page 25: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Deploy the CGI to IIS. CGI-BIN virtual directory

Page 26: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Copy the IISSUBJOB2_INPUT.htm from the \ICOM\WebBatchExecution folder to the \INETPUB\WWWROOT\gdttc folder

Copy the IISSUBJOB2_SERVER.exe from the \ICOM\WebBatchExecution\Debug folder to the \INETPUB\WWWROOT\gdttc\cgi-bin folder

Bring up the GDT environment. In this case we will bring up the ICOM GDT environment. Fileshare, TCS, Console and Fsys01

Page 27: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Running the Web Application. Very basic Form.

Page 28: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

We will enter the JCL name and press the Submit Form Button. This will launch the JCL and you can monitor it via the GDT Console.

Page 29: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

GDT CONSOLE VIEW

Page 30: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Use the Net Express IDE Form Designer, to modify the .htm form to your liking.

Page 31: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

Modified Form and Rebuild the project

Page 32: Web Servers and The Common Gateway Interface. Presentation Title Here Presenters Name Here GDT 2007 International User Conference: Evolving the Legacy

Presentation Title HerePresenter’s Name Here

GDT 2007 International User Conference: Evolving the LegacyJuly 29 – August 1 Lake Las Vegas, Nevada

The Demonstration

The final product!