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.

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

Web subroutines provide the following functions to easily create such application<br />

programs:<br />

Function Subroutine name Usage<br />

File upload COBW3_GET_UPLOADFILE_INFO Acquires the in<strong>for</strong>mation on an<br />

COBW3_GET_UPLOADFILE_INFO_X<br />

COBW3_GET_UPLOADFILE_INFO_N<br />

upload file.<br />

COBW3_GEN_UPLOADFILE<br />

Generates an uploaded file on the<br />

COBW3_GEN_UPLOADFILE_X<br />

COBW3_GEN_UPLOADFILE_N<br />

server.<br />

COBW3_DEL_UPLOADEDFILE Deletes an uploaded file.<br />

To upload a file, the following values must be written on the Web page <strong>for</strong> invoking<br />

an application:<br />

Tag name Attributes Value<br />

FORM<br />

METHOD POST<br />

ENCTYPE multipart/<strong>for</strong>m-data<br />

INPUT TYPE file<br />

For details of these tags and attributes, see the “<strong>NetCOBOL</strong> Web <strong>Guide</strong>” and other<br />

documents or home pages that explain HTML.<br />

The above tags can be used together with the INPUT tag of other types (that is,<br />

other than “file”) in the same FORM. The data that corresponds to these INPUT tags<br />

can be acquired by a subroutine such as COBW3_GET_VALUE regardless of whether<br />

the file upload function is used.<br />

Note: The NAME value specified in the INPUT tag (TYPE=”file”) <strong>for</strong> uploading files<br />

cannot be used in the INPUT tag of other types (that is, other than “file”).<br />

Otherwise, the normal operation of the Web subroutine is not assured.<br />

For example:<br />

:<br />

<br />

Do not specify<br />

:

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

Saved successfully!

Ooh no, something went wrong!