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.

88 Chapter 6. Samples<br />

Program Files Provided<br />

•<br />

•<br />

•<br />

•<br />

•<br />

•<br />

<strong>Subroutines</strong> Used<br />

<strong>SAF</strong>MAIN.cob (COBOL source program)<br />

<strong>SAF</strong>START.htm (Web page <strong>for</strong> invoking application)<br />

<strong>SAF</strong>RPLY1.htm (Web page <strong>for</strong> processing output)<br />

<strong>SAF</strong>RPLY2.htm (Web page <strong>for</strong> processing output)<br />

<strong>SAF</strong>ERROR.htm (Web page <strong>for</strong> processing error output )<br />

COBOL85.cbr (Initialization file <strong>for</strong> program execution)<br />

The following <strong>SAF</strong> subroutines are used in the examples.<br />

• COBW3_INIT<br />

• COBW3_SET_CNV<br />

• COBW3_PUT_HTML<br />

• COBW3_RECEIVE_HEADER<br />

• COBW3_GET_REQUEST_INFO<br />

• COBW3_SET_COOKIE<br />

• COBW3_GET_COOKIE<br />

• COBW3_FREE<br />

Program Compiling<br />

The following shows how to compile a program using COBOL32 commands. If you<br />

have already copied the library file (COBW3.cbl) used by <strong>SAF</strong> subroutines to the<br />

sample folder, you can omit the “-I” option. The COBOL installation folder is<br />

“C:\COBOL” in the following examples.<br />

Program Linkage<br />

COBOL32 – IC:\COBOL –WC, "THREAD(MULTI)" <strong>SAF</strong>MAIN.cob<br />

Link and create a .DLL as follows.<br />

link /dll /out:<strong>SAF</strong>SMPL1.dll <strong>SAF</strong>MAIN.obj<br />

C:\COBOL\F3BICBDM.obj F3BINSRT.lib F3BICIMP.lib<br />

kernel32.lib libc.lib/ENTRY:COBDMAIN

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

Saved successfully!

Ooh no, something went wrong!