22.09.2013 Views

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

NetCOBOL for SPARC Architecture SAF Subroutines User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

70 Chapter 4. Generating and Executing a Web Application<br />

Executing a Web Application<br />

To execute a Web application, follow the procedure below.<br />

1. Compile and link the program.<br />

For details, see "Compiling and Linking".<br />

2. Set the environment.<br />

- Set up the environment <strong>for</strong> the NES. For details, see "NES Setup".<br />

- Set up the environment <strong>for</strong> <strong>SAF</strong> subroutines. For details, see "Environment<br />

Variable Setup <strong>for</strong> <strong>SAF</strong> <strong>Subroutines</strong>".<br />

3. Execute the Web application.<br />

Display the Web page that invokes the application (HTML document) and start<br />

the application.<br />

For details, see "Executing a Web application".<br />

Compiling and Linking<br />

A program created that uses <strong>SAF</strong> subroutines is compiled and linked as shown below.<br />

In the example, the file name is MainProc.cob and the entry-name is <strong>SAF</strong>-MAIN. If<br />

the Project Manager is used, use the build utility of the project manager <strong>for</strong><br />

compiling and linking.<br />

• Compile the COBOL source program.<br />

Two methods of compiling the COBOL source program are provided: By<br />

executing the WINCOB command from the Project Manager and by using the<br />

compile command at the command prompt. This section shows an example<br />

using the compile command .<br />

For details of compiling using the WINCOB command and compiling commands,<br />

see "<strong>NetCOBOL</strong> <strong>User's</strong> <strong>Guide</strong>."<br />

COBOL32 –WC, "THREAD(MULTI)" MainProc.cob<br />

Notes: <strong>SAF</strong> is a multi-thread application, so the compile option THREAD (MULTI)<br />

must be specified. In order to distinguish upper-case letters/lower-case letters of an<br />

application entry-name, or NES parameter name accessed by a subroutine such as<br />

COBW3_<strong>SAF</strong>_GET_PARM_XX, specify the compile option ALPHAL (WORD) or<br />

NOALPHAL .<br />

• Link the COBOL object program. (.DLL generation)<br />

Two methods of linking the object program are provided: By executing the<br />

WINLINK command from the Project Manager and by using the link command at<br />

the command prompt. In this section, an example of linking by using the link<br />

command is given. For details of linking by using the WINLINK command and<br />

link commands, see "Net COBOL <strong>User's</strong> <strong>Guide</strong>."<br />

The .DLL generated in this example is <strong>SAF</strong>SMPL.dll.<br />

The link operation is as follows:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!