40
B1WD-3364-01ENZ0(00) August 2015 Windows FUJITSU Software NetCOBOL V11.0 Web Development Tools

Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

B1WD-3364-01ENZ0(00)August 2015

Windows

FUJITSU SoftwareNetCOBOL V11.0

Web Development Tools

Page 2: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Preface

Purpose of this manual

This manual describes the COBOL assist functions used to develop Web applications.

Registered trademarks

- NetCOBOL is a trademark or registered trademark of Fujitsu Limited or its subsidiaries in the United States or other countries or inboth.

- Microsoft, Windows, and Windows Server are either registered trademarks or trademarks of Microsoft Corporation in the UnitedStates and/or other countries.

- Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.Oracle Solaris might be described as Solaris, Solaris Operating System, or Solaris OS.

- Other brand and product names are trademarks or registered trademarks of their respective owners.

Product names

The names of products described in this manual are abbreviated as follows:

Product Name Abbreviation

Microsoft® Windows Server® 2012 R2 Datacenter

Microsoft® Windows Server® 2012 R2 Standard

Microsoft® Windows Server® 2012 R2 Essentials

Microsoft® Windows Server® 2012 R2 Foundation

Windows Server 2012 R2

Microsoft® Windows Server® 2012 Datacenter

Microsoft® Windows Server® 2012 Standard

Microsoft® Windows Server® 2012 Essentials

Microsoft® Windows Server® 2012 Foundation

Windows Server 2012

Microsoft® Windows Server® 2008 R2 Foundation

Microsoft® Windows Server® 2008 R2 Standard

Microsoft® Windows Server® 2008 R2 Enterprise

Microsoft® Windows Server® 2008 R2 Datacenter

Windows Server 2008 R2

Microsoft(R) Internet Information Services IIS

Microsoft(R) Internet Explorer IE

Export Regulation

Exportation/release of this document may require necessary procedures in accordance with the regulations of your resident countryand/or US export control laws.

The contents of this manual may be revised without prior notice. No part of this document may be reproduced or transmitted in any formor by any means, electronic or mechanical, for any purpose, without the express written permission of Fujitsu Limited.

August 2015

Copyright 2009 - 2015 FUJITSU LIMITED

- i -

Page 3: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

ContentsChapter 1 Overview of the Assist Functions for Web Application Development...................................................................... 1

Chapter 2 Work Flow using the Assist Functions for Web Application Development...............................................................3

Chapter 3 Web Application Wizard...........................................................................................................................................43.1 Web Applications................................................................................................................................................................................ 4

3.1.1 Templates of Web Applications................................................................................................................................................... 43.1.2 Basic Program Structure............................................................................................................................................................... 53.1.3 Modification of Web Application Templates............................................................................................................................... 5

3.2 Using the Web Application Wizard.....................................................................................................................................................63.2.1 Starting the Web Application Wizard...........................................................................................................................................63.2.2 Web Application Wizard Screen and Operation...........................................................................................................................7

3.3 Configuration of Web Application Templates...................................................................................................................................123.3.1 Program Resources to be Generated...........................................................................................................................................123.3.2 Differences in Web Application Templates................................................................................................................................12

3.3.2.1 Program Names and File Names of Web Application Templates....................................................................................... 123.3.2.2 Specification of Web Application Start............................................................................................................................... 133.3.2.3 Saving and Restoring Session Data..................................................................................................................................... 13

3.3.3 Other Resources to be Generated................................................................................................................................................143.3.3.1 Program to Output a Result Page and Output Data Library................................................................................................ 143.3.3.2 Program to Output Error Page and Error Web Page............................................................................................................143.3.3.3 Templates of Request HTML Page and Result HTML Page.............................................................................................. 153.3.3.4 Module Definition File........................................................................................................................................................ 15

3.3.4 Other Use Methods of Web Application Wizard........................................................................................................................153.3.4.1 Adding Web Applications to an Existing Project................................................................................................................153.3.4.2 Adding Web Application Information to an Existing Execution-format File..................................................................... 163.3.4.3 Re-Execution Inhibition of Web Application Wizard......................................................................................................... 17

Chapter 4 Program Generation Tool for Retrieving Web Parameters....................................................................................204.1 Program for Retrieving Web Parameters...........................................................................................................................................204.2 Using the Program Generation Tool for Retrieving Web Parameters............................................................................................... 224.3 Rules on Generating a Program for Retrieving Web Parameters...................................................................................................... 24

4.3.1 Request Page (Web Page for Invoking an Application)............................................................................................................. 244.3.2 Data Input Library...................................................................................................................................................................... 244.3.3 Generated Programs....................................................................................................................................................................26

Chapter 5 Program Generation Tool to Output a Result Page...............................................................................................275.1 Program to Output a Result Page.......................................................................................................................................................27

5.1.1 Operational Overview of Program..............................................................................................................................................275.1.2 Basic Program Structure............................................................................................................................................................. 285.1.3 Program Interface and its Use.....................................................................................................................................................29

5.2 Using the Program Generation Tool to Output a Result Page...........................................................................................................295.2.1 Starting the Tool......................................................................................................................................................................... 295.2.2 Screen and Operation..................................................................................................................................................................30

5.3 Rules on Generating a Program to Output a Result Page.................................................................................................................. 325.3.1 Result Page (Web Page for Processing Result Output).............................................................................................................. 325.3.2 Data Output Library....................................................................................................................................................................32

5.3.2.1 Naming rules........................................................................................................................................................................325.3.2.2 Rules on Generating Output Data Items.............................................................................................................................. 33

5.3.3 Generated Output Programs........................................................................................................................................................345.3.3.1 Naming Rules...................................................................................................................................................................... 34

Chapter 6 Hints on Web Application Development................................................................................................................ 356.1 Operation of HTML Documents from the COBOL Project Manager...............................................................................................35

6.1.1 Including HTML Documents......................................................................................................................................................356.1.2 Displaying and Editing HTML Documents................................................................................................................................35

- ii -

Page 4: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

6.2 Using Editor Templates..................................................................................................................................................................... 35

- iii -

Page 5: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Chapter 1 Overview of the Assist Functions for WebApplication Development

A Web application may expand into a large-scale application consisting of many HTML documents and related programs. In many cases,however, such a Web application can be considered a collection HTML documents and simple programs as shown below:

Therefore, the following tasks must be taken to develop a Web application:

1. Creating a request page (Web page for invoking the application)

2. Creating the relationship between the request page and the associated COBOL program

3. Creating application control logic (e.g., session management)

4. Creating business logic

5. Creating a result page (Web page for processing resulting output)

6. Creating the relationship between the result page and its associated COBOL program

To reduce the workload posed by tasks 2, 3, and 6 above, the following three functions are supplied as assist functions for Web applicationdevelopment in the COBOL Project Manager:

Web application wizard

The Web application wizard generates Web application projects and program templates (corresponding to [1], [2], and [4] in the figureabove).

When necessary, the wizard also creates a Template of the related request pages and result pages.

Program generation tool for retrieving Web parameters

This tool generates a program that retrieves Web parameters from an input form in a request page. (The program indicated by [2] inthe figure above will be generated.)

Program generation tool to output a result page

This tool generates a program that replaces variable names contained in the model of a result page and outputs a result page (indicatedby [4] in the figure above).

- 1 -

Page 6: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

The three assist functions above operate as part of the COBOL Project Manager, and enable operations equivalent to those of conventionalCOBOL development environments for developing and testing applications, and managing resources.

Note

HTML documents can also be included as part of the program resources in a project. This enables the COBOL Project Manager to referenceand edit HTML documents, but it does not check the dependencies between HTML documents and generated programs.

See Figure "Overview of assist functions for Web application development."

Figure 1.1 Overview of assist functions for Web application development

Applications with the following interfaces can be developed using the assist functions for Web application development:

Common Gateway Interface (CGI)

Most Web servers support CGI as the standard interface. CGI programs must be created in .EXE executable format (not as .DLL files).To create a CGI Web application in COBOL, use COBOL CGI subroutines. Refer to the COBOL CGI Subroutines User's Guide fordetails.

Internet Server API (ISAPI)

ISAPI, which is supported by Microsoft® Internet Information Server (IIS). ISAPI applications must be created in .DLL executableformat (not as .EXE files). To create an ISAPI Web application in COBOL, use the COBOL ISAPI subroutines. Refer to the COBOLISAPI Subroutines User's Guide for details.

- 2 -

Page 7: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Chapter 2 Work Flow using the Assist Functions for WebApplication Development

The procedure below must be followed to develop an application using the assist functions for Web application development:

The processing enclosed within thick lines is executed by the assist functions for Web application development.

"Installation and testing of business logic" in the figure above can be done the same way as in ordinary COBOL application development.Refer to the NetCOBOL User's Guide for details.

- 3 -

Page 8: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Chapter 3 Web Application WizardThe Web application wizard is a tool used to generate Web application projects and templates of Web application programs.

Simply setting the following information can create building-enabled projects and templates for basic Web applications:

- Project file name and location

- Execution file name

- Type of API

The Web application wizard can also generate a data input-output program from a request page and a result page. This wizard can alsogenerate templates of both Web pages.

3.1 Web ApplicationsThis section describes the templates of Web applications that are generated by the Web application wizard.

3.1.1 Templates of Web ApplicationsA Web application template is generated as shown below. (In this example, [Generate a HTML file] is selected under the Web applicationswizard's options to generate a request and a result HTML page). See "Web Application Wizard Screen and Operation" for details.

- [1] Enter data in the input form on the request page. Click the [Execute] button. A Web application start request along with the datais sent to the Web server.

- 4 -

Page 9: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

- [2] The Web application is started by the Web server.

- [3] The Web application executes necessary initialization and other processing, and then invokes the program for Web parameterinput.

- [4] The program for Web parameter input issues a request to the Web server, and then retrieves the Web parameters from the requestpage.

- [5] The Web application invokes the program to output the result page.

- [6] The program to output the result page replaces the conversion name (depending on the on the model of the result page) withconversion results (conversion character strings). Then, a request to output the result page is sent by the program to the Web server.

- [7] The Web browser displays the result page.

3.1.2 Basic Program StructureThe template of the Web application has the following structure:

3.1.3 Modification of Web Application TemplatesApplication logic is not generated in the templates of the Web application. Therefore, the application template receives Web parametersfrom the request page, but do not include any actual processing logic. It thus only outputs the result page.

To execute actual application processing, application logic must be added under the following comment:

- 5 -

Page 10: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

*

* Add application logic here

*

For example, when data received from the request page is to be displayed without modification on the request page, the logic illustratedbelow must be added. The program to output the result page includes the processing that replaces the conversion name on the result pageusing the conversion results (conversion character string). See "Result Page" for details.

The application operation will be modified as follows:

Programs for retrieving Web parameters and to output the result page, and necessary libraries are generated by the program generationtool for retrieving Web parameters, and the program generation tool to output a result pages. See Chapter 4, "Program Generation Toolfor Retrieving Web parameters," and Chapter 5, "Program Generation Tool to Output a Result Page," for details.

3.2 Using the Web Application WizardThe Web application wizard can be used for the following three purposes:

1. To generate Web application program development projects and Web application program templates

2. To add Web applications as new target files to an existing project

3. To add Web application templates to the source components of existing target files of an existing project

The following describes the most common purpose [1 above]. For descriptions of other use purposes, see "Configuration of WebApplication Templates."

3.2.1 Starting the Web Application WizardSelect [Web Application Wizard] from the [File] menu of the COBOL Project Manager.

- 6 -

Page 11: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Note

If the COBOL Project Manager has an existing project opened, that project is closed automatically.

3.2.2 Web Application Wizard Screen and OperationThe Web application wizard has three screens and one dialog box. This section describes these screens and related operations.

Screen 1: Project information input

Screen 1 is used to set project-related information.

Set a "Project name" and "Storage folder." Click the [Next] button.

- 7 -

Page 12: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Edit boxes

Project Name:

Specify the name of the Web application development project to be generated.

Storage Folder:

Specify the folder where the project files, source program templates, and libraries of the Web application are to be stored.

Button

Browse:

Click this button to open the dialog box for storage folder selection.

Screen 2: Application information input

Screen 2 is displayed when you click on the Next button on Screen 1. It is used to set basic information regarding the application templateto be generated. The execution file name, type of Web subroutine API, and other information can be specified on this screen.

After specifying the necessary information, click the [Next] button.

- 8 -

Page 13: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Edit boxes

Name for Executable:

Specify the name of the execution file to be added to the project as a target.

Installation Folder:

Specify the folder where to install the product that includes Web subroutines other than the COBOL Web subroutines.

Button

Browse:

Click this button to open the dialog box for folder selection.

Option buttons

Select the type of API:

Select the Web subroutine interface for the Web application template to be generated. The selectable type depends on the executableformat assigned to the execution file name.

When .EXE executable format is specified, [CGI] can be selected. When DLL execution format is specified, [ISAPI] can be selected.

Combo box

Select the code system of the Web application.

Specifies the execution code system of the application to be executed. The default code system is "ASCII".

Screen 3: Specification of file generation methods by the Web application wizard

Screen 3 is used to specify how to generate a Template of a Web application by using the wizard.

Specify necessary information, and then click the [Finish] button. Various Templates of program resources that constitute the Webapplication are generated and added to the project.

- 9 -

Page 14: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Checkboxes

Generate program template:

Specifies whether to generate a program as a Web application Template. This checkbox is already checked in the default state.Deselecting this checkbox will result in an incomplete project. To avoid this, do not deselect this checkbox.

Generate code for saving session data:

This checkbox can be checked when the [Generate program template] checkbox is selected with [ISAPI] selected as the type ofWeb application. For a description of how to save session data, see "Configuration of Web Application Templates."

Generate code for restoring session data:

This checkbox can be checked when the [Generate program template] checkbox is selected with [ISAPI] selected as the type ofWeb application. For a description of how to restore session data, see "Configuration of Web Application Templates."

Generate a program for retrieving Web parameters:

Specifies whether to generate a program for retrieving Web parameters and an input data library from the input form contained onthe request Web page. This checkbox can be checked when the [Include in the project a request HTML page] checkbox is selected.

Generate a program to output a result page:

Specifies whether to generate a program to output result and an output data library from the specified conversion name on the resultHTML page. This checkbox can be checked when the [Include in the project a result HTML page] checkbox is selected.

Include in the project a request HTML page:

Specifies whether to include the request HTML page in the project. Use the option button to select whether to use an existing fileor a wizard-generated template file as the HTML document to be included.

Include in the project a result HTML page:

Specifies whether to include the result HTML page in the project. Use the option button to select whether to use an existing file ora wizard-generated template file as the HTML document to be included.

- 10 -

Page 15: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Generate a template of execution configuration file:

Specifies whether to generate a file containing the definition information when the Web server setting file (required at execution)must be modified.

Generate a template definition file for the ISAPI application:

Specifies whether to generate a module definition file for the ISAPI application. This checkbox can be checked only when [ISAPI]is selected as the Web application type.

Edit boxes

File Name: (Include in the project a request HTML page)

When [Includes an existing file] is selected when defining the request page, specifies the file name.

File Name: (Include in the project a result HTML page)

When [Includes an existing file] is selected when defining the result page, specifies the file name.

Buttons

File Details:

Opens the [Generated File Details] dialog box.

Browse: (Include in the project a request HTML page)

Opens the [Open] dialog box.

Browse: (Include in the project a result HTML page)

Opens the [Open] dialog box.

[Generated File Details] dialog box

When necessary, change the default file name of a program resource to be generated by the wizard.

List box

Generated File:

Displays a list of program resources to be generated by the wizard. Select the name of a program resource for which the defaultspecification is to be changed.

- 11 -

Page 16: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Edit boxes

Program Name:

Specifies the new name of the Web application templates selected in the list box. This edit box cannot be used when [ISAPI] isselected as the API type.

File Name:

Specifies the new file name of the program resource selected in the list box.

Combo box

Code System of HTML File

Select the code system of HTML files (request HTML page, result HTML page, error HTML page) to be generated by the wizard.This combo box can be used only when [Unicode] is selected as the code system for program execution.

3.3 Configuration of Web Application Templates

3.3.1 Program Resources to be GeneratedThe Web application wizard generates various program resources according to wizard screen specifications and Web subroutine interfaceselection.

The following table lists the relationship between the types of Web subroutines and program resources generated:

CGI ISAPI

Application Program A A

Program for retrieving Web parameters B B

Program to output a result page B B

Input data library B B

Output data library B B

request HTML page B B

result HTML page B B

Program to output error page A A

error HTML page A A

Module definition file X B

execution configuration file X X

A : Always generated

B : Generated optionally

X : Not generated

3.3.2 Differences in Web Application Templates

3.3.2.1 Program Names and File Names of Web Application TemplatesWeb application templates generated by the Web application wizard generally have the structure described in "Web Applications." Thenames and number of programs to be generated depend on the Web subroutine interface used. The following table lists the names thatmay be generated when using each Web subroutine:

API name Program name File name Template

CGI exe-name-MAIN exe-name-MAIN.COB O

- 12 -

Page 17: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

API name Program name File name Template

ISAPI GetExtensionVersion dll-name-GetExtensionVersion.COB

HttpExtensionProc dll-name-HttpExtensionProc.COB O

TerminateExtension dll-name-TerminateExtension.COB

When ISAPI is used as the interface, the program name of the Web application is fixed. When another interface is used, an arbitraryprogram name can be used. Therefore, the execution file name specified by the wizard is replaced by "exe-name" or "dll-name" in thetable above.

The program marked in the [Template] field in the table above has the structure described in "Web Applications."

Note

If a blank or illegal character in COBOL user language is contained in the execution file name specified by the wizard, the character isremoved.

3.3.2.2 Specification of Web Application StartWeb application startup must be specified with the ACTION attribute in the FORM tag on the request page. For example, to start the Webapplication "SAMPLE.EXE" which uses the CGI interface, specify the following line:

<FORM METHOD="POST" ACTION="SAMPLE.EXE">

When [Generate a HTML file] is selected at [Include in the project a request HTML page] on the wizard screen, the wizard generatesdescriptions appropriate for the interface to be used. Conversely, when [Includes an existing file] is selected, the ACTION attribute valuemust be modified as follows:

API name Specification in ACTION attribute

CGI [url-name/]exe-file-name

ISAPI [url-name/]dll-file-name

3.3.2.3 Saving and Restoring Session DataAn application template generated by the Web application wizard has the structure described in "Web Applications." When [ISAPI] isselected as the API, a program to save and restore session data can also be generated.

When the [Generate code for saving session data] or [Generate code for restoring session data] checkbox is selected on the wizard screen,the related work data item templates and processing are generated as shown below.

- 13 -

Page 18: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

The session data items generated at position [2] are a dummy group item with suffix "-SESSION-DATA." To actually validate the sessiondata restore and save processing, the target data items must be defined as data items belonging to this group item. The session data restoreand save processing generated at positions [3] and [4] invoke subroutines for controlling the session range. To control individual sessionranges, modify the subroutine invoking processing as required.

3.3.3 Other Resources to be GeneratedA program for retrieving Web parameters and an input data library are generated when the [Generate a program for retrieving Webparameters] checkbox is selected on the wizard screen. The programs and files generated are the same as those generated by the programgeneration tool for retrieving Web parameters. See "Generation Rules of Program for Retrieving Web Parameters" for details.

3.3.3.1 Program to Output a Result Page and Output Data LibraryA program to output a result page and an output data library are generated when the [Generate a program to output a result page] checkboxis selected on the wizard screen. The programs and files generated are the same as those generated by the program generation tool to outputa result page.

See "Generation Rules of Program to Output a Result Page" for details.

Note

The programs (generated by the wizard) for retrieving Web parameters and to output a result page have the same format as those ofprograms generated by executing [Generate a Program for Retrieving Web Parameters] and [Generate a Program to Output a Result Page]in the default state. When the contents of generation must be specified, execute each function again.

3.3.3.2 Program to Output Error Page and Error Web PageA program to output an error page and an error HTML page, which are used in error detection in generated application templates.

This program and Web page are generated according to the following rules:

- 14 -

Page 19: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Resource type Program name File name

Program to output error page exe/dll-name-ERRPAGE exe/dll-name-ERRPAGE.COB

Error HTML page - exe/dll-name-ERRPAGE.HTML

When the code system used at application execution is ASCII, the error Web page uses ASCII. When the system used at applicationexecution is Unicode, the error Web page uses UCS-2 or UTF-8 (selected by the wizard).

The program to output an error page is executed by assuming that the error Web page and related application are being stored in the samefolder.

3.3.3.3 Templates of Request HTML Page and Result HTML PageThese templates are generated when the [Include in the project a request HTML page] checkbox or [Include in the project a result HTMLpage] checkbox is checked with [Generate a HTML file] selected.

Resource type File name

request HTML page exe/dll-name-INPAGE.HTML

result HTML page exe/dll-name-OUTPAGE.HTML

When the code system used at application execution is ASCII, the request HTML pages and result HTML page use ASCII. When the codesystem used at application execution is Unicode, these Web pages use UCS-2 or UTF-8 (selected by the wizard).

3.3.3.4 Module Definition FileA module definition file is generated when the [Generate a module definition file for the ISAPI application] checkbox is selected on thewizard screen.

The module definition file required by the ISAPI application is generated so that "-MODULE.DEF" is specified as the .DLL file name.

3.3.4 Other Use Methods of Web Application WizardIn addition to the use methods above, there are two other methods of using the Web application wizard.

The following describes these additional use methods:

3.3.4.1 Adding Web Applications to an Existing ProjectWeb application templates can be added as a new execution-format file to a project that already includes one or more execution-formatfiles. A target project can be created using an ordinary method or generated by the Web application wizard.

This add processing must be executed as follows:

1. Open the target project, then select the target project file displayed in the tree view of Project Manager.

- 15 -

Page 20: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

2. Select the [Edit] menu and [Web Application Definition] menu, then select [Add Application Definition].

The above operations are the same as those described in "Web application wizard screen and operation." In this case, the code systemused when running the added application must match that of the execution-format file already included in the project.

This function is useful when managing the development of a series of screens and multiple Web applications in a single project asshown below.

3.3.4.2 Adding Web Application Information to an Existing Execution-format FileVarious files such as Web application templates can be added as the source components of an execution-format file already included inthe project. The target execution-format file must not be generated by the Web application wizard.

This add processing must be executed as follows:

1. Open the target project, then select the target execution-format file displayed in the tree view of Project Manager.

- 16 -

Page 21: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

2. Select the [Edit] menu and [Web Application Definition] menu, then select [Add Template and Information].

The subsequent operations are the same as those described in "Web Application Wizard Screen and Operation." However, the nameof the target execution-format file or code system to be used at execution cannot be changed.

This function is useful when converting an existing application into a Web application without changing the business logic.

3.3.4.3 Re-Execution Inhibition of Web Application WizardThe Web application wizard cannot be re-executed for an execution-format file previously added to the project by the Web applicationwizard. The Web application wizard also cannot be re-executed for an execution-format file to which Web application information wasadded. (Such inhibited addition is displayed with a specific icon on the project screen.)

- 17 -

Page 22: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Therefore, when the Web application wizard must be re-executed, all unnecessary information must be deleted once.

This delete operation must be executed as follows:

1. Select the target Web-application execution-format file from the tree view of Project Manager.

- 18 -

Page 23: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

2. Select the [Edit] menu and [Web Application Definition] menu, then select [Undefine Web Application].

Note

This function deletes Web application-specific information from the project, but does not delete such generated files as the Web applicationtemplates. Manually delete any unnecessary files.

- 19 -

Page 24: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Chapter 4 Program Generation Tool for Retrieving WebParameters

The program generation tool for retrieving Web parameters generates a program that retrieves Web parameters and an input data libraryfrom the input form contained on the request page.

This tool can be used for the following purposes:

- To add a program for retrieving Web parameters to the Web application generated without checking the [Generate a program forretrieving Web parameters] checkbox at Web application wizard execution

- To regenerate a program for retrieving Web parameters according to a newly replaced or modified request page

4.1 Program for Retrieving Web ParametersThis section describes the programs generated by the program generation tool for retrieving Web parameters.

Operational Overview of Program

The data items that correspond to the input items of the input form are declared in a program for retrieving Web parameters. A value isfetched from each input item of the input form, and then is set to the corresponding data item.

Basic Program Structure

The program for retrieving Web parameters has the following basic structure:

- 20 -

Page 25: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

- [1] The name of the generated program is expanded in the PROGRAM-ID paragraph and END PROGRAM paragraph.

- [2] The file name of the generated input data library is expanded.

- [3] The data items corresponding to respective input items of the input form are generated as items belonging to one group item. Thegroup item name is expanded on this line.

- [4] The processing for retrieving the input item data from the input form and for setting the data in the corresponding data items isexpanded.

Note

See "Generation Rules of Program for Retrieving Web Parameters" for details about the program name, data item names, program filename, and library file name to be generated.

Program Interface and its Use

A program for retrieving Web parameters has two arguments and one return value. This program is called as follows from a Web application:

CALL "web-parameter-retrieving-program-name" USING data-name-1 data-name-2 RETURNING data-name-3

The interface for the arguments and return value is as follows:

- "data-name-1" is an interface area for using the API of the Web server. Specify COBW3 that is already defined in library"COBW3.CBL."

- "data-name-2" is an input data storage area. Specify the 01 group item name that is already defined in the generated input data library.

- "data-name-3" returns one of the following values which indicate the success or failure of Web parameter retrieving processing:

- 0: Retrieval of all Web parameters succeeded.

- Other than 0: An error occurred.

Even if retrieval of a Web parameter of an input item fails when there is more than one input item, retrieving the Web parameters of otheritems continues.

When this invocation terminates normally (i.e., return value of 0), the input item values of the input form are stored in the data itemsbelonging to data-name-2.

When the program for retrieving Web parameters and part of the application template generated by the Web application wizard wasmodified or added, the application template generated by the wizard must be modified as follows:

- Modification of the name of the input data library to be gotten by application template

- Name of the program for retrieving Web parameters to be invoked by the application template

- 21 -

Page 26: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

- Second argument for invoking the program for retrieving Web parameters

4.2 Using the Program Generation Tool for Retrieving WebParameters

This section describes how to start and use the program generation tool for retrieving Web parameters.

Starting the Tool

Start the tool as follows:

1. From the tree view of the COBOL Project Manager, select the request page to be input to the program generation tool. (As shownin the following figure, the request HTML page is contained in the "Others" folder in the project.)

2. From the [Tools] menu of Project Manager, select [Generate a Program for Retrieving Web Parameters].

Note

This project must include one or more Web applications that were added by the Web application wizard.

Screen and Operation

When the program generation tool for retrieving Web parameters starts up, the screen for entering the data required for generating theprogram for retrieving Web parameters is displayed.

Enter necessary data, and then click the [OK] button. The tool is executed.

- 22 -

Page 27: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Edit boxes

Request Page File Name:

The file name of the request HTML page specified at tool startup is displayed. This file name cannot be modified.

Maximum Length of Input Item:

Specify the maximum length of the area for storing the input data. Specify a value from 1 to 1024 (when input item class isalphanumeric), or from 1 to 512 (when input item class is national language). The default value is 100.

List box

Generated COBOL Program Add Destination:

Selects a Web application to which the program for retrieving Web parameters and library generated by the tool are to be addedas source components. This list box is effective only when two or more Web application added by the Web application wizardalready exist in the project.

Option buttons

Input Item Type:

Specifies whether to generate an input-data-storing area for an alphanumeric data item or a national-language data item. In thedefault state, an alphanumeric data item is assumed. National-language data item can be selected only when the application codesystem is Unicode.

Type of API:

The type of API to be used by the program for retrieving Web parameters to be generated is displayed. This API type cannot bemodified.

Buttons

OK:

Click this button to validate entered data and to execute the tool.

Cancel:

Click this button to cancel processing.

Help:

Click this button to display help data.

Execution results

When the tool was executed, the specified program for retrieving Web parameters and the input data library are generated and added assource components to the specified Web application.

- 23 -

Page 28: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

4.3 Rules on Generating a Program for Retrieving Web ParametersThis section describes the detailed rules on generating a program for retrieving Web parameters.

4.3.1 Request Page (Web Page for Invoking an Application)The program generation tool for retrieving Web parameters receives data from a request page having an input form conforming to HTML3.2. This request page must use one of the following code systems:

- ASCII

- UTF-8 (Unicode)

- UCS-2 (Unicode)

The code system of the request page that can be input depends on the code system to be used in the Web application. For a Web applicationto operate with ASCII, prepare the HTML document for ASCII. For a Web application to operate with Unicode, prepare the HTMLdocument for UTF-8 or UCS-2.

The program generation tool for retrieving Web parameters checks the form elements contained in the following FORM tag:

<FORM

METHOD = "GET" | "POST"

ACTION = "start-program-specification"

ENCTYPE= "encoding-format"

></FORM>

The corresponding input data items are generated by assuming that all the following form elements having the NAME attribute are inputitems.

Specify the following attributes for the FORM tag when you use the FILE type for form elements.

METHOD = "POST"

ENCTYPE= "multipart/form-data"

<INPUT

TYPE = TEXT | CHECKBOX | RADIO | HIDDEN | PASSWORD | SUBMIT| FILE*

NAME = name

>

<SELECT

NAME = name

MULTIPLE = multiple-specification

> </SELECT>

<TEXTAREA

NAME = name

> </TEXTAREA>

When the request page has two or more FORM tags, all form elements contained are processed.

* FILE TYPE is only supported by ISAPI,CGI.

Note

The request page can include FORM tags and form elements other than the above. The program generation tool for retrieving Webparameters ignores these specifications, however.

4.3.2 Data Input Library

- 24 -

Page 29: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Naming rules

The names of input data items and library are determined based on the names (excluding extension) of the input request page and theNAME attribute of form elements according to the following rules:

Library file name:

A library file name is generated by adding "-INDATA.CBL" to the name of the request page. If the length of the generated nameexceeds 50 characters, the name is shortened to 50 characters by deleting excess characters at the end of the name.

Group item name:

A group item name is generated by adding "-INDATA" to the name of the request page.

Input data item name:

An input data item name is generated by adding "I-" to the head of the form-element input item name specified with the NAME attribute.When the item is a counter item, "C-" is added. When the item is a file, data item has three sub items. This function can process aNAME-attribute character string consisting of up to 50 characters.

Note

Group item names and input data item names conform to the naming rules for COBOL user-defined words. Therefore, new namesmay be generated after the original request page name and form-element NAME attribute are modified. For example:

- If the total name length exceeds 30 characters, the original name is shortened.

- This tool does not support multi-byte characters in the NAME attribute of a form element. The NAME attribute cannot containmulti-byte characters.

- This tool does not support multi-byte characters in the request page file name. The request page file name cannot contain multi-byte characters.

- Blank characters in the original name are ignored. Characters in the original name that cannot be used to construct a COBOL user-defined word are also ignored.

Rules on Generating Input Data Items

The attribute of an input data item to be generated is determined based on the following conditions:

- Form element of input item

- Attribute contained in the form element

- Existence of same-name item in the same-type form element

- Data item type and maximum length specified by the program generation tool for retrieving Web parameters

The following table lists the general formats of data items that can be generated for each form element:

Specified tag When there is no same-

name itemWhen there is same-name item

No specification of INPUT TYPE 02 I-name PIC {X|

N}

(maximum-

length).

02 C-name PIC 9(4).

02 I-name OCCURS multiplex-count

PIC {X|N}(maximum-length).

INPUT TYPE=TEXT

INPUT TYPE=PASSWORD

INPUT TYPE=CHECKBOX 02 C-name PIC

9(4).

02 I-name PIC {X|

N}

(maximum-

length).

- 25 -

Page 30: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Specified tag When there is no same-name item

When there is same-name item

INPUT TYPE=RADIO 02 I-name PIC {X|

N}

(maximum-

length).

INPUT TYPE=SUBMIT

INPUT TYPE=HIDDEN 02 C-name PIC 9(4).

02 I-name OCCURS multiplex-count

PIC {X|N}(maximum-length).

TEXTAREA

SELECT without MULTIPLE

SELECT MULTIPLE 02 C-name PIC 9(4).

02 I-name OCCURS OPTION tag-count PIC {X|N}(maximum-length).

INPUT TYPE=FILE 02 I-name PIC 9(4).

03 F-CLIENT_PATH PIC X(128).

03 F-CLIENT_FILENAME PIC X(128).

03 F-CONTENT_TYPE PIC X(64).

03 F-FILE_SIZE PIC S9(18) COMP-5.~

4.3.3 Generated Programs

Naming rules

A file name and program name are determined as follows according to the name (excluding extension) of the input request page:

File name:

A file name is generated by adding "INPUT-" to the head of the name of the application-invoking page, and by adding ".COB" as theextension. If the length of the generated file name exceeds 50 characters, the HTML document name is shortened to 50 characters bydeleting excess characters at the end of the name.

Program name:

A program name is generated by adding "INPUT-" to the head of the name of the request page.

Note

Program names conform to the naming rules for COBOL user-defined words. Therefore, new names may be generated after the originalrequest page name is modified. For example:

- If the total name length exceeds 30 characters, the original name is shortened.

- Blank characters in the original name are ignored. Characters in the original name that cannot be used to construct a COBOL user-defined word are also ignored.

- 26 -

Page 31: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Chapter 5 Program Generation Tool to Output a ResultPage

The program generation tool to output a result page generates a program which outputs a result page by replacing the conversion name(described in the result page) with the conversion results (conversion character string).

This tool can be used for the following purposes:

- To add a program to output a result page in the Web application generated without checking the [Generate a program to output a resultpage] checkbox at Web application wizard execution.

- To regenerate a program to output a result page according to a newly replaced or modified result page

5.1 Program to Output a Result PageThis section describes the program generated by the program generation tool to output a result page.

5.1.1 Operational Overview of ProgramThe data items that correspond to the conversion names contained on the result page are declared in the program that outputs the resultpage. The conversion name is replaced by the conversion results (conversion character string) set in the data item. Then the result page isoutput.

- 27 -

Page 32: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

5.1.2 Basic Program StructureThe program to output a result page has the following basic structure:

- [1] The name of the generated program is expanded in the PROGRAM-ID paragraph and END PROGRAM paragraph.

- [2] The file name of the generated output data library is expanded.

- [3] The data items corresponding to respective conversion names are generated as items belonging to one group item. The group itemname is expanded on this line.

- [4] The processing for replacing the conversion names with the conversion results (conversion character strings) of respective outputitems is expanded.

- [5] The processing for outputting the results (sending it to the Web server) is expanded.

Note

See "Rules on Generating a Program to Output a Result Page" for details about the program name, data item names, program file name,and library file name to be generated.

- 28 -

Page 33: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

5.1.3 Program Interface and its UseA program to output a result page has two arguments and one return value. This program is called as follows from a Web application:

[MOVE path-of-result-HTML-page TO A-HTML-PATH.]

CALL "result-page-output-program-name " USING data-name-1 data-name-2 RETURNING data-name-3

The interface for the arguments and the return value is as follows:

- "data-name-1" is an interface area for using the API of the Web server. Specify COBW3 that is already defined in library"COBW3.CBL."

- "data-name-2" is an output data storage area. Specify the 01 group item name that is already defined in the generated input data library.

- The data item (A-HTML-PATH), which specifies the path to the storage folder of the result page, is included as the first subordinateitem. When the application and result page are stored in different folders, the path to the storage folder of the result page must bespecified in this data item.

- "data-name-3" returns one of the following values which indicates the success or failure of processing:

- 0: All processing succeeded.

- Other than 0: An error occurred.

5.2 Using the Program Generation Tool to Output a Result PageThis section describes how to start and use the program generation tool to output a result page.

5.2.1 Starting the ToolStart the tool as follows:

1. From the tree view of the COBOL Project Manager, select the result page to be input to the program generation tool. (As shown inthe figure below, the result HTML page is contained in the "Others" folder of the project.)

- 29 -

Page 34: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

2. From the [Tools] menu of Project Manager, select [Generate a Program to Output a Result Page].

Note

This project must include one or more Web applications that were previously added by the Web application wizard.

5.2.2 Screen and OperationWhen the program generation tool to output a result page starts up, the screen for entering the data required for generating the program tooutput a result page is displayed.

Enter necessary data, and then click the [OK] button. The tool is executed.

- 30 -

Page 35: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Edit boxes

Result Page File Name:

The file name of the result HTML page specified at tool startup is displayed. This file name cannot be modified.

Maximum Length of Conversion Data:

Specify the maximum length of the area for storing the conversion data. Specify a value from 1 to 1024 (when conversion resultclass is alphanumeric) or from 1 to 512 (when conversion result class is national language). The default value is 100.

Maximum Count of Repeat Conversion Data:

To repeatedly process conversion data, specify the maximum repetition count of conversion data to be generated. Specify a valuefrom 1 to 1,000. The default value is 30.

Checkbox

Processes repeat conversion data:

Specify whether to generate the data definition and processing of repeat conversion data. This checkbox can be used only whenthe API type is [ISAPI] or [CGI]. In the default state, repeat conversion data is not processed.

List box

Generated COBOL Program Add Destination:

Select a Web application to which the program to output the result page and library generated by the tool are to be added as sourcecomponents. This list box is effective only when two or more Web applications previously added by the Web application wizardalready exist in the project.

Option buttons

Conversion Data Type:

Specify whether to generate a storage area for conversion data as an alphanumeric data item or a national-language data item. Inthe default state, an alphanumeric data item is assumed. National-language data item can be selected only when the applicationcode system is Unicode.

Type of API:

The type of API to be used by the program to output the result page to be generated is displayed. This API type cannot be modified.

Buttons

OK:

Click this button to validate the entered data and execute the tool.

- 31 -

Page 36: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Cancel:

Click this button to cancel processing.

Help:

Click this button to display help data.

Execution results

When the tool was executed, the specified program to output the result page and to output the data library are generated and added assource components to the specified Web application.

5.3 Rules on Generating a Program to Output a Result PageThis section describes the detailed rules on generating a program to output a result page.

5.3.1 Result Page (Web Page for Processing Result Output)The program generation tool to output a result page receives data from a result page that uses one of the following code systems:

- ASCII

- UTF-8 (Unicode)

- UCS-2 (Unicode)

The code system of the result page that can be input depends on the code system to be used in the related Web application. When the Webapplication will operate with ASCII, prepare the result page for ASCII. When the Web application will operate with Unicode, prepare theresult page for UTF-8 or UCS-2.

The conversion name to be replaced by the corresponding data item name at page output can be specified on the result page, which is tobe input to the program generation tool to output a result page. Such a conversion name can be specified by the following two methods:

[Format 1]: Simple specification

//COBOL//conversion-name//COBOL// [...]

[Format 2]: Repeated specification

//COBOL_REPEAT_START//

:

//COBOL_RESTART//conversion-name//COBOL_REPEAT// [...]

:

//COBOL_REPEAT_END//

In the default state, the conversion name specified in format 2 (repeated specification) is not processed. This conversion name is processedonly when [Processes repeat conversion data] was selected for the program generation tool to output a result page.

Note

The file name of the result page is expanded in character string format in the program to output the result page. In this case, the file namelength may exceed the maximum length of the COBOL nonnumeric literal. To avoid this, shorten the file name of the result page to 50characters or less.

5.3.2 Data Output Library

5.3.2.1 Naming rulesThe names of output data items and the library are determined based on the names (excluding extension) of the input result page andconversion name according to the following rules:

- 32 -

Page 37: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Library file name:

A library file name is generated by adding "-OUTDATA.CBL" to the name of the result page. If the length of the generated nameexceeds 50 characters, the name is shortened to 50 characters by deleting excess characters at the end of the name.

Group item name:

A group item name is generated by adding "-OUTDATA" to the name of the result page.

Output data item name:

An output data item name is generated by adding "O-" to the head of the conversion name. When a conversion name with the repetitionspecification is processed, group item "A-REPEAT_DATA_xx" (to which conversion data to be repeated belongs) and data item "A-REPEAT_COUNT_xx" (repetition count specification, where "xx" is a 2-digit serial number) are generated.

Note

Group item names and output data item names conform to the naming rules for COBOL user-defined words. Therefore, new names maybe generated after the original result page name and conversion name are modified. For example:

- If the total name length exceeds 30 characters, the original name is shortened.

- This tool does not support multi-byte characters in conversion names. The conversion name cannot contain multi-byte characters.

- This tool does not support multi-byte characters in the result page file name. The result page file name cannot contain multi-bytecharacters.

- Blank characters in the original name are ignored. Characters in the original name that cannot be used to construct a COBOL user-defined word are also ignored.

5.3.2.2 Rules on Generating Output Data ItemsThe attributes of generated output data items are determined according to the following information:

- Format of conversion name

- Conversion data type, Maximum length of conversion data, Maximum count of repeat conversion data specified by the programgeneration tool to output the result page

The following table lists the general formats of data items that can be generated for respective conversion names:

Conversion name specification Format of data item generation

Simplespecification

//COBOL//OUTPUT_DATA1//COBOL//

//COBOL//OUTPUT_DATA2//COBOL//

//COBOL//OUTPUT_DATA3//COBOL//

:

02 0-OUTPUT_DATA1 PIC {X|N} (length).

02 0-OUTPUT_DATA2 PIC {X|N} (length).

02 0-OUTPUT_DATA3 PIC {X|N} (length).

:

Repeatedspecification

//COBOL_REPEAT//DATA1//

COBOL_REPEAT//

//COBOL_REPEAT//DATA2//

COBOL_REPEAT//

//COBOL_REPEAT//DATA3//

COBOL_REPEAT//

:

02 A-REPEAT_COUNT_01 PIC 9(4).

02 A-REPEAT_DATA_01 OCCURS maximum-

count.

03 0-DATA1 PIC {X|N} (length)

03 0-DATA2 PIC {X|N} (length)

03 0-DATA3 PIC {X|N} (length)

:

- 33 -

Page 38: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

5.3.3 Generated Output Programs

5.3.3.1 Naming RulesA file name and program name are determined as follows according to the name (excluding extension) of the input result page:

File name:

A file name is generated by adding "OUTPUT-" to the head of the name of the result page and by adding ".COB" as the extension. Ifthe length of the generated file name exceeds 50 characters, the name is shortened to 50 characters by deleting excess characters at theend of the name.

Program name:

A program name is generated by adding "OUTPUT-" to the head of the name of the request page.

Note

Program names conform to the naming rules for COBOL user-defined words. Therefore, new names may be generated after the originalresult page name is modified. For example:

- If the total name length exceeds 30 characters, the original name is shortened.

- Blank characters in the original name are ignored. Characters in the original name that cannot be used to construct a COBOL user-defined word are also ignored.

- 34 -

Page 39: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Chapter 6 Hints on Web Application Development

6.1 Operation of HTML Documents from the COBOL ProjectManager

The COBOL Project Manager can create only one "Others" folder under a project file.

When such HTML documents as request pages and result pages are included in this folder, these documents can be used (i.e., displayedor edited) by the COBOL Project Manager as program resources.

6.1.1 Including HTML DocumentsHTML documents can be included by making use of the hierarchical tree in the COBOL Project Manager window.

Include an HTML document as follows:

1. If there is no "Others" folder under the project file in the COBOL Project Manager window, create one.

2. Select the "Others" folder.

3. Select [Add File] from the [Edit] menu.

-> The [Browse file] dialog box appears.

4. Select the target HTML document.

-> The selected HTML document is displayed under the folder.

6.1.2 Displaying and Editing HTML DocumentsHTML documents can be displayed or edited by making use of the hierarchical tree in the COBOL Project Manager window.

Use HTML documents as follows:

1. Select an HTML document to be displayed or edited.

2. To display the HTML document, select [Display] from the [Project] menu.

-> The default Web browser starts and displays the selected HTML document.

3. To edit an HTML document, select [Edit] from the [Project] menu or double-click the selected HTML document to enable documentediting.

Note

In the default state, the editor related by the system to the HTML document starts. If no editor is related by the system to the HTMLdocument, a general editor starts. The HTML editor relationship can also be established by changing the COBOL editor.

6.2 Using Editor TemplatesThe wizard and tools supplied by the assist functions for Web application development generate data input-output processing. To executethe following processing by using a Web application, however, you must first manually add the processing to the Web application template:

- Processing of Cookie data

- Getting specific information from Web server

- Getting authorization information

The template expansion function of the editor is useful for this purpose. This function supports various processing templates classified bypurpose. Insert an appropriate template into the specified source location.

- 35 -

Page 40: Web Development Tools - software.fujitsu.comsoftware.fujitsu.com › jp › manual › manualfiles › m150010 › b1wd336… · Web Development Tools. Preface Purpose of this manual

Use this function as follows:

1. Use the editor to open a COBOL source, and then move the cursor to the position where the template source code is to be inserted.

2. Select [Template] from the [Edit] menu of the editor.

3. From the view of [Template], scroll down to select the category of processing to be inserted. Then from the [Template] list box,select the template name of processing to be inserted. The processing code is actually inserted according to the selected templatethat is currently displayed in the preview window.

4. Click the [Insert] button. The processing prepared by the template is expanded and inserted into the program being edited.

Note

This function can only be used with the editor of the COBOL Project Manager.

- 36 -