1 / 32

Web Servers and “The Common Gateway Interface”

Web Servers and “The Common Gateway Interface”. 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. The Common Gateway Interface.

gaurav
Télécharger la présentation

Web Servers and “The Common Gateway Interface”

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Servers and “The Common Gateway Interface”

  2. 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

  3. 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.

  4. 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.

  5. 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)

  6. 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.

  7. The Demonstration • Create a new Internet Application project via the Micro Focus Net Express IDE (NE 4.0)

  8. The Demonstration • What Internet Application do you want to generate, the source to be used and the type of Application?

  9. The Demonstration • Define the Project Name and Location

  10. The Demonstration • You need to provide the Source COBOL program.

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

  12. The Demonstration • The heart of the Procedure Division

  13. The Demonstration • Define the Application Style

  14. The Demonstration • The Wizard’s Generated File names

  15. 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.

  16. 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.

  17. The Demonstration • The End of the Wizard. It is that easy!

  18. 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.

  19. The Demonstration • Preparation of the Build Settings

  20. 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).

  21. The Demonstration • Time to Rebuild the Whole Project

  22. The Demonstration • Results of the Rebuild

  23. The Demonstration • Configure the Application Environment

  24. The Demonstration • Deploy the CGI to IIS. GDTTCW virtual directory

  25. The Demonstration • Deploy the CGI to IIS. CGI-BIN virtual directory

  26. 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

  27. The Demonstration • Running the Web Application. Very basic Form.

  28. 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.

  29. The Demonstration • GDT CONSOLE VIEW

  30. The Demonstration • Use the Net Express IDE Form Designer, to modify the .htm form to your liking.

  31. The Demonstration • Modified Form and Rebuild the project

  32. The Demonstration • The final product!

More Related