Top
NetCOBOL V11.0 CGI Subroutines User's Guide
FUJITSU Software

Appendix A Questions and Answers

This appendix explains questions and answers regarding the use of CGI subroutines.

Q1.

An error message was displayed in the WWW browser. What action should be taken?

A1.

Check that the WWW Server setting and Web application activation is the same as the program name specified in the FORM tag (ACTION attribute) on the application-invoking Web page.

Also check that the WWW Server is correctly set up, the program name is correct, and the storage location of the processing result output Web page is correct.

Q2.

Should data be protected from outside people?

A2.

In communication between a client and server, data may be read or changed by outside people. To prevent such problems that may affect system operation, an appropriate network security system such as Secure Socket Layer (SSL) should be installed.

Consult with the server administrator.

Q3.

A debugger was activated for execution time debugging, but the debugger screen was not displayed on the client. Why?

A3.

The debugger screen is usually displayed on the Web Server monitor, and is not displayed on the client.

Q4.

Files were not correctly input or output by a Web application. Why?

A4.

To read or write a file, the authorizations for reading and/or writing the file and the folder containing the file must be previously assigned to the ID of the user who executes the Web application.

Q5.

How can I dynamically change the display contents of a Web application?

A5.
(1) Use COBW3_SET_CNV, etc.

Write "//COBOL//conversion-name//COBOL//" in the variable part on the Web page for processing result output. Register the conversion character string by using CGI subroutine COBW3_SET_CNV, etc. Then, change the contents of the Web page by using COBW3_PUT_HTML.

(2) Use COBW3_PUT_TEXT.

Usually, the data that is to be written to an output file such as an HTML document can be written using COBW3_PUT_TEXT.

Therefore, prepare different COBW3_PUT_TEXT's for respective conditions in the program. Processing result data can be dynamically output by specifying the data name in the COBW3_PUT_TEXT.

(3) Divide one page into two or more files.

An output file can be divided into two or more files.

For example, call COBW3_PUT_HTML by specifying the file name of the first half of the output Web page. To process the last half of the output Web page, prepare various files that are described according to various conditions. Then, call COBW3_PUT_HTML by changing the file name according to the conditions in the program.

Thus, the last half of the Web page can be dynamically changed. When a page is divided into parts, two or more similar files need not be prepared.

Further, pages depending on various conditions can be created by combining these functions, i.e., (1) to (3).

Q6.

Why does the Web application not operate normally?

A6.

Check that COBW3_INIT is specified at the start of the Web application.

Then, collect log data and check the error information. For an explanation of the operation check method, see Chapter 5, "Confirming Application Operation."

Q7.

The following message was displayed in the WWW Browser. Why?

Server Error

The server encountered an internal error or mis-configuration and was unable to complete your request.

Alternatively, the Web application returned only part of the Web header. Why?

A7.

There may be an error in the Content type. Review the COBW3-CONTENT-TYPE value that was specified in COBW3_PUT_HEAD.

When an HTML document is output

COBW3_PUT_HEAD is not called. Or, specify either of the default value (LOW-VALUE) or COBW3-CONTENT-TYPE-HTML for a value of COBW3-CONTENT-TYPE if you call COBW3_PUT_HEAD.

When text data is output

COBW3_PUT_HEAD is called by specifying COBW3-CONTENT-TYPE-TEXT.

Q8.

When is a Content-type declaration message displayed in a WWW browser?

A8.

When COBW3-DMODE-DBG is specified in COBW3_INIT, the header information such as Content-type is displayed, as debug data, in the WWW Browser.

Such a message is not displayed unless COBW3-DMODE is specified.

Q9.

When a Web application was executed, the message from the file download was displayed. Why?

A9.

If a Web application has a Content-type declaration error, such a message may be output.

Check that the Content-type was declared correctly.

Q10.

Are there any conditions that must be satisfied when creating COBOL programs for Web applications?

A10.

Web applications can use almost and of the functions of COBOL. However, note that the following functions for screen operation cannot be used:

Presentation file module (Screen handling module)

Screen handling module

ACCEPT/DISPLAY function

(The operation function of environment variables, date, and time can be used, however.)

For details of the Web parameter reception and referencing, and processing result output, see Chapter 3, "Use of CGI Subroutines."

Q11.

Can the COBOL debugger be used?

A11.

The COBOL debugger can be used also in the Web environment. See "Checking Operation by Interactive Debugger" in Chapter 5.

Q12.

A Status-code that was sent from the WWW Server was displayed in the WWW browser. What is its meaning?

A12.

See "HTTP Basics" in Appendix A, "For beginners Developing Web Applications " in the "NetCOBOL Web Guide."

Q13.

Can the expiration time (timeout period) be controlled?

A13.

Expiration time control is a function of the WWW Server settings. See the manual of the WWW Server.

Q14.

Can a Web application using the frame function be used in a Web application?

A14.

To use the frame function, special settings or special processing need not be described in the Web application.

If the WWW Browser supports the frame function, the frame function can be used by describing the frame.

Q15.

What information does the IPP interface file contain?

A15.

It contains script names, for example.

For details, see the manual of the IPP.

Q16.

Why can't COBW3_CHECK_VALUE, etc. correctly retrieve the VALUE specified with the <INPUT> tag?

A16.

If NAME was omitted in the INPUT tag, the VALUE of the INPUT tag is not set in the Web parameter in some WWW Browsers. If the INPUT tag requires the VALUE, always specify the NAME.

Q17.

Why can't NAME or VALUE be correctly retrieved by COBW3_GET_VALUE or COBW3_CHECK_VALUE, etc?

A17.

If the length of the retrieval-target character string that is contained in the Web parameter exceeds the quantitative limit, the CGI subroutine processes the character string within the range of the quantitative limit. Therefore, the expected result may not be obtained.

Q18.

A file that was specified with an absolute path could not be accessed. Why?

A18.

Check that the storage destination of the COBOL file to be used when the Web application is executed is specified correctly according to the drive configuration of the server machine to be used.

Q19.

Can resources in the network environment be accessed?

A19.

At the time of the Web application execution, the network drive configuration when the user logs in is invalid.

The network environment resources to be used at execution must be accessed by specifying UNC. For details, see "Programs Running under a Service," of the NetCOBOL User's Guide Chapter 21.

Q20.

Error message "No data is contained in the document." was displayed on the WWW browser. Why?

A20.

Always add one blank line before the <BODY> tag on the Web page to which the processing result is to be output from the Web application.

Q21.

How can the environment variables required to start the WWW Server be set?

A21.

Press the [Start] button, select [Settings], [Control Panel], [System], and then [Environment]. Add the necessary environment variable to the "System environment variable (S):" field, and reboot the system.

Alternatively, prepare the execution initial file (COBOL85.CBR) in which the necessary execution environment information is described, and then place the file in the folder that contains the COBOL Web application (.exe).

Q22.

Error message "F3BIPRCT.DLL was not found." is displayed in the server. Why?

A22.

Check that the NetCOBOL run-time system was installed correctly.

When a Web application is executed, the specified user environment variables are not validated.

To solve this problem, previously specify the installation folder of the COBOL run-time system in the system environment variable "PATH" of the server machine.

To validate the setting of the system environment variable, reboot the system.

Q23.

How can the display of a specified command on a WWW browser be suppressed when starting a Web application from a batch file?

A23.

Specify "@ECHO OFF" at the head of the batch file.

Q24.

What should be done if no response is received from the WWW Server?

A24.

The WWW Server may have a window input wait state or message box input wait state.

To execute a Web application on the WWW Server, describe the environment variable information (listed below) in the execution initial file or in the system environment variables.

Specifying the environment variable information prevents the window or message box from being displayed. Therefore, the operator input wait state is prevented.

Environment variable information

Explanation

@MessOutFile=File name

Outputs a COBOL execution-time message to a specified file.

@WinCloseMsg=OFF

Does not display a window closing message.

For details regarding various environment variables, refer to the NetCOBOL User's Guide.

The following functions that will display a window must not be used from a COBOL program:

  • Presentation file module (screen handling function)

  • Screen handling module

  • ACCEPT/DISPLAY function

(The operation function of environment variables, date, and time can be used, however.)

Q25.

The COBOL debugger cannot be activated. Why?

A25.

Check the following conditions:

Environment variable @CBR_ATTACH_TOOL=TEST was set.

The COBOL Tool Attaching Service was started.

Q26.

The COBOL debugger started, but debugging did not start. Why?

A26.

Display the [Debugging information] page in the [Start debugging] dialog box, and check that [Debugging information file storage folders] is correctly set.