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

Appendix A Questions and Answers

This appendix describes problems that you may encounter while using ISAPI Subroutines through questions and answers.

Q1.

Why was an error message displayed in the WWW Browser?

A1.

Check the WWW Server settings and whether the program name to start the Web application and that written in the FORM tag (ACTION) of the HTML document (Web page for invoking application) are identical.

Also, check whether the WWW Server settings, the program name, and the HTML document (Web page for processing result output) are stored at the correct locations. Furthermore, check the export function names, translation options, and contents of the module definition file.

Q2.

Is it necessary to protect data from outsiders?

A2.

Data in communication between the WWW Server and client may be referenced or changed by outsiders. To prevent such acts that could affect operations of a system, we recommend tasking necessary measures for network security such as SLL (Secure Socket Layer).

Consult with your WWW Server administrator.

Q3.

A file cannot be I/O correctly in a Web application.

A3.

To I/O a file, it is necessary to grant rights to I/O permission the file and the folder in which the file is stored to the user ID that executes the Web application.

Q4.

Is there any means to change the display contents of a Web application dynamically?

A4.
  1. Using COBW3_SET_CNV, and the like

    Write //COBOL//conversion name//COBOL// in the variable part of the Web page for processing result output. The page can be changed dynamically by substituting the conversion character string by using COBW3_PUT_HTML after registering the conversion name and a substitution character string (conversion character string) with such COBOL Web subroutine as COBW3_SET_CNV.

  2. Using COBW3_PUT_TEXT.

    The contents that are specified in such an output file as HTLM document can usually be specified in COBW3_PUT_TEXT.

    Thus, if output data is provided for each condition in the program, the page can be changed dynamically by specifying a data name in COBW3_PUT_TEXT.

  3. Dividing a page into two or more files

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

    For example, call COBW3_PUT_HTML after specifying the name of the file that describes the former half of a page to be output. For the latter half, prepare some files written adjusting to the conditions and change the file name to be output according to the condition in the program before calling COBW3_PUT_HTML again.

As is noted above, the latter half of a page can dynamically be changed.

In addition, by creating a page using components, it becomes unnecessary to prepare multiple similar files.

In addition, by combining the methods of 1) to 3) Above, pages that correspond to a variety of situations can be created.

Q5.

Why is a Web application not working correctly after starting it?

A5.

Check whether COBW3_INIT is specified at the start of the Web application. Alternatively, check whether at least one NAME is set within the page that starts the Web application.

If COBW3_INIT is specified, collect error information and do debugging while referencing "Operation Check" for investigation.

Q6.

The following message was displayed on the WWW Browser. Why? Server Error

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

Or,

Specified Web application has returned only part of the Web header.

A6.

An error in Content-type can be assumed. Check the value of COBW3- CONTENT-TYPE specified in COBW3_PUT_HEAD.

  1. When an HTML document (Web page for processing the resulting output) is output

    Omit the COBW3_CONTENT_TYPE value (LOW-VALUE) that does not call COBW3_PUT_HEAD or call COBW3_PUT_HEAD after specifying COBW3_CONTENT_TYPE_HTML.

  2. When text data is output

    Call COBW3_PUT_HEAD after specifying COBW3_CONTENT_TYPE_TEXT.

Q7.

Why is the Content-type declaration displayed on the WWW Browser?

A7.

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

Such information will not be displayed if COBW3-DMODE is not specified.

Q8.

A message "Do you want to save the file in disk?" was displayed on the WWW Browser after executing a Web application. Why?

A8.

Messages such as this may be output if the Content-type declaration of a Web application is not correct.

Check whether the Content-type declaration is correct.

Q9.

What should be kept in mind when creating a Web application with COBOL programs?

A9.

Most of the COBOL functions can be used in the Web application. However, notice that the following functions related to screen operations cannot be used.

  • Presentation file module (Screen handling module)

  • Screen handling module

  • ACCEPT/DISPLAY function

    (The environment variable, date, and time manipulation functions can be used.)

For details about receiving and referencing Web parameters and outputting processing results, see "How to Use the ISAPI Subroutines" In Chapter 3.

Q10.

How do you set the environmental variables required for starting the WWW Server?

A10.
  • For Windows® 2000

    Add the necessary environment variables in the [System Environment Variables (S):] in [Environment Variables (E)] in the [Details] sheet in the [System] folder in the [Control Panel] folder which can be displayed from the [Setup] menu in the [Start] button, then restart the WWW Server.

Otherwise, place the execution initialization file (COBOL85.CBR) in which the necessary execution environment information is specified in the same folder as for Web applications (.Dll).

Q11.

Can the COBOL debugger be used?

A11.

Yes, you can debug an application using the COBOL debugger in a Web environment. See "Checking the Operation Using the Interactive Debugger" in Chapter 5.

Q12.

The status code (Status-code) was displayed on the WWW Browser from the WWW Server. What does it mean?

A12.

See the basics of HTTP described in Appendix A, " For Beginners Developing COBOL Web Applications " in the "NetCOBOL Web Guide".

Q13.

Is it possible to control the timeout period?

A13.

It is a function of the WWW Server. Refer to the manuals of the WWW Server.

Depending on the WWW Server, the timeout period may be controllable by changing the environment settings or based on HTTP header information from the Web application side.

Q14.

Is it possible to use an HTML document with frames in a COBOL Web application?

A14.

There is no need to write special settings or processing in a COBOL Web application to use the frame function.

If the frame function is supported by the WWW Browser, only the description of frames in HTML is needed.

Q15.

Why can the value in VALUE specified by the <INPUT> tag using COBE3_CHECK_VALUE not be retrieved correctly?

A15.

If NAME is omitted in the INPUT tag, the value of VALUE in the INPUT tag may not be entered in the Web parameter depending on the WWW Browser. Be sure to specify NAME if the INPUT tag needs the value of VALUE.

Q16.

Why is the retrieval using COBW3_GET_VALUE or COBW3_CHECK_VALUE not correct?

A16.

If the length of a character string for retrieval contained in the Web parameter exceeds a preset value, retrieval processing is performed by the Web subroutines within the limit of the string length. Therefore, expected values may not be obtained.

Q17.

Why is an error "F3BIPRCT.DLL cannot be found" displayed on the WWW Server?

A17.

Check whether the COBOL run-time system is installed correctly. When a Web application is operating, specified user environmental variables will not be enabled.

Set in advance the install folder of the COBOL run-time system to the system environmental variable PATH of the WWW Server machine. At this time, it is necessary to restart the WWW Server to enable the settings of system environmental variables.

Q18.

Why can a file specified using an absolute path not be accessed?

A18.

When specifying the storage location of COBOL files used for executing a Web application, it is necessary to specify the location according to the drive configuration of the WWW Server machine to be used.

Q19.

Can resources of the network environment be accessed?

A19.

When a Web application is executed, the configuration of network drives when the user logged in is not enabled. Access resources of the network environment to be used for execution by specifying UNC. For details, refer to the "NetCOBOL User's Guide".

Q20.

Why was an error "No data is contained in document" displayed on the WWW Browser?

A20.

Be sure to start a new line after the </HEAD> tag of an HTML document (Web page for processing the resulting output) output from a Web application.

Example

<HTML>  ¯
<HEAD>  ¯
×××
</HEAD> ¯
¯
<BODY>  ¯
×××
</BODY> ¯
</HTML> ¯
Q21.

What should you do if no response is received from the WWW Server?

A21.

It is possible that a window or message box is waiting for input on the WWW Server.

To execute a COBOL program on the WWW Server, write the following environmental variable information in the initialization file for execution or set it in the system environmental variables.

No window or message box will be displayed after specifying this environmental variable information and so the input wait state of the operator can be avoided.

Environment variable information

Meaning

@MessOutFile=file-name

Output all COBOL run-time messages to a specified file.

@WinCloseMsg=OFF

Disable the display of a message appearing when a window is closed.

For details about an environment variable, see the "NetCOBOL User's Guide."

Additionally, do not use in a COBOL program the following screen I/O functions.

  • Presentation file module (Screen handling module)

  • Screen handling module

  • ACCEPT/DISPLAY function

(The environment variable, date, and time manipulation functions can be used.)

For details, see "NetCOBOL User's Guide".

Furthermore, check IIS or ODBC settings (if ODBC is used) because they may be incorrect.

Q22.

Why is the COBOL debugger not started?

A22.

Check the following:

  • The environment variable, @CBR_ATTACH_TOOL=TEST is set.

  • The COBOL Tool Attaching Service is started.

Q23.

The COBOL debugger is started, but debugging does not start.

A23.

Check the [Debugging Information] page in the [Start Debugging] dialog to see if the [Debug information file storage folder] is set correctly.

Q24.

A Web application that uses the session management function, if started twice, sometimes does not run correctly.

A24.

A Web application that uses the session management function, if started twice, runs unstably. To avoid this problem, use JavaScript, etc. in the WWW Browser to avoid starting such a Web application more than once. For general precautions on manipulating a WWW Browser, see "NetCOBOL Web Guide".

Q25.

What state does the Web applications executed in WWW Server when the WWW Browser is canceled by some reasons?

A25.

The following causes are thought by the condition that the WWW Browser is canceled.

  • The WWW Browser is closed.

  • The Connected time-out function works.

In general, the session is started by the request from the WWW Browser between the WWW Browser and the Web application process in HTTP. And, the session ends at once when the Web application is completed, and the transmission of the response data to the WWW Browser is completed.

Therefore, it is necessary to configure the Web application which works in WWW Server to complete all processing in the HTTP session of one time (For example, OPEN->READ/WRITE->CLOSE of the file is done).

In this case, only the HTTP session between the WWW Browser and WWW Server interrupts even if the WWW Browser is canceled, and there is no problem in the Web application as mentioned above configured. Therefore, the Web application continues and is executed.

However, the error occurs if the response is transmitted by using COBW3_PUT_HTML and COBW3_PUT_TEXT after the HTTP session is interrupted.

When the session management function of the Web subroutine is used, the collection processing of various resources is necessary. The collection processing of the resource must use the termination procedure when the time-out is generated.

For example, a certain system assumes that files OPEN when requests first time and files CLOSE when finally requesting. At this time, there is danger to which file CLOSE is not done and the file is broken when the WWW Browser is canceled when the middle requests. Therefore, the Web application for the recovery processing executed at the time-out is made, and consideration by which file CLOSE in that is necessary.

For details, see "Session Management Function" in Chapter 3.