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.

<strong>SAF</strong> <strong>Subroutines</strong> Interface<br />

Chapter 3. How to Use <strong>SAF</strong> <strong>Subroutines</strong> 23<br />

This section explains the calling interface <strong>for</strong> using the <strong>SAF</strong> subroutines.<br />

Note: It is possible to check errors and warning in the <strong>SAF</strong> subroutines by referring<br />

to COBW3-STATUS, and those in <strong>SAF</strong> specific subroutines by referring to COBW3-<br />

<strong>SAF</strong>-STATUS.<br />

Value Meaning<br />

0 Normal end<br />

Not zero Error number<br />

See Appendix B "Error Recovery Processing" <strong>for</strong> error numbers.<br />

Library<br />

The library file is a COPY member <strong>for</strong> use as a <strong>SAF</strong> data area. When calling <strong>SAF</strong><br />

subroutines, include the following library file in the Working-Storage Section with a<br />

COPY statement. This library file is stored in the folder in which Fujitsu <strong>NetCOBOL</strong><br />

has been installed.<br />

Library name: COBW3.cbl<br />

Format: Specify as follows:<br />

WORKING-STORAGE SECTION.<br />

COPY COBW3.<br />

To call <strong>SAF</strong> specific subroutines, include the <strong>SAF</strong> specific data area using the COPY<br />

statement. This library is also stored in the folder to which Fujitsu <strong>NetCOBOL</strong> has<br />

been installed.<br />

Library name: COBW3<strong>SAF</strong>.cbl<br />

Format: Specify as follows:<br />

WORKING-STORAGE SECTION.<br />

COPY COBW3.<br />

COPY COBW3<strong>SAF</strong>. *> Interface with a <strong>SAF</strong> specific subroutine<br />

Note: Do not specify REPLACING in the COPY statement of a <strong>SAF</strong> data area or write<br />

a REPLACE statement that might make the COPY statement a target <strong>for</strong> replacing.<br />

If names in the <strong>SAF</strong> data area are changed, the operation is not guaranteed.<br />

Calling <strong>SAF</strong> <strong>Subroutines</strong><br />

In order to initialize the environment of the <strong>SAF</strong> subroutines and to get the Web<br />

page parameter list, it is necessary to call COBW3_INIT be<strong>for</strong>e calling any other <strong>SAF</strong><br />

function. When terminating the processing <strong>for</strong> <strong>SAF</strong> subroutines, COBW3_FREE must<br />

be called to release resources acquired by the <strong>SAF</strong> subroutines.<br />

When calling other subroutines from a program that is not the one which called<br />

COBW3_INIT, the interface area (COBW3) defined in the program which called<br />

COBW3_INIT is shared among programs.

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

Saved successfully!

Ooh no, something went wrong!