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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NES Settings<br />

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

LINK /DLL /OUT:<strong>SAF</strong>SMPL.dll MainProc.obj<br />

F3BICBDM.obj F3BINSRT.lib F3BICIMP.lib KERNEL32.LIB LIBC.LIB<br />

/ENTRY:COBDMAIN<br />

The initialization file (COBOL85.CBR) can be allocated in the same folder as the .DLL,<br />

regardless of the current folder, by linking F3BICBDM. obj and<br />

specifying/ENTRY:COBDMAIN. It is very useful that the initial file can be allocated in<br />

the same folder as the .DLL since the current folder of the application under the<br />

server such as an NES is undefined. For details, see "<strong>NetCOBOL</strong> <strong>User's</strong> <strong>Guide</strong>.<br />

The following items must be set <strong>for</strong> NES when executing the Web application.<br />

• Define the <strong>SAF</strong> director to NES.<br />

• Define the Web application to the <strong>SAF</strong> director.<br />

• Register the MIME type of the application with NES.<br />

Defining the <strong>SAF</strong> Director to NES<br />

Note: Modification of the obj.conf file is not reflected to NES until NES is restarted.<br />

Initialize the <strong>SAF</strong> director in NES by editing obj.conf file in the folder where NES is<br />

installed.<br />

Open obj.conf file by using an adequate text editor. Locate lines starting with “Init”<br />

near the beginning of the file. Add the following description at the end of lines. In<br />

this example, the folder in which the COBOL is installed is set to C:\COBOL. The <strong>SAF</strong><br />

director is in that folder.<br />

Init fn= "load-modules" shlib="C:/COBOL/F3BIN<strong>SAF</strong>.dll"<br />

funcs="COBOL_Init,COBOL_Per<strong>for</strong>m"<br />

Notes:<br />

•<br />

•<br />

•<br />

Normally, a setting is written on a single line. When writing it over multiple<br />

lines, a space or tab must be written at the beginning of each continuation line.<br />

Do not edit other lines starting with Init . NES may fail to initialize.<br />

Backup of obj.conf file be<strong>for</strong>e editing is recommended.<br />

Defining the Web Application to the <strong>SAF</strong> Director<br />

In order to execute the Web application in NES, define the Web application to the<br />

<strong>SAF</strong> director.<br />

When NES is started, the <strong>SAF</strong> director loads the Web application and executes the<br />

loaded Web application in response to each request.

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

Saved successfully!

Ooh no, something went wrong!