Previous Topic Table Of Contents Parent Topic Next Topic |  | # The SWSFCNT Function Related Topics Web Server API Function Index
| May be used in Shadow/REXX
| May be used from Other REXX interpreters
| High Level language interface is available
SWSFCNT is a high level function used to determine the number of files sent to the server in a File Post operation. Because multiple files can be presented in a single Post method, SWSFCNT returns the number of files present. The protocol for sending files in a Post operation is described in RCF 1867. To determine the number of files sent, you can either: Use the SWSFCNT function. Reference the built-in REXX varialbe WWW.FILE.0. SWSFCNT will return a zero if no files are present in the current Post. If SWSFCNT returns a value greater than zero, then files can be: Examined using the built-in variables WWW.FILE.N.FILENAME, WWW.FILE.N.HTTP_CONTENT_LENGTH, WWW.FILE.N.NAME, WWW.FILE.N.HTTP_CONTENT_TYPE, WWW.FILE.N.TOEBCDIC, and WWW.FILE.N.FLAGS. Manipulated using the built-in functions SWSFSET, SWSFRED, and SWSFGET . ## SWSFCNT Syntax The SWSFCNT function takes no arguments. The invocation format for SWSFCNT is:
          Z = SWSfcnt()
> ## Return Values SWSFCNT always returns a numeric value. A zero return value indicates that no files are present in the current Post. The SWSFCNT operation is logged to the Server's wrap-around trace file with the resulting return value. ## Example The following call will retrieve the number of files in the current invocation. Subsequent logic would process the files.
>     /*WWW  /testswsfcnt  sendtrace(yes)
>     /*REXX
>     Z = SWSFCNT()
>     IF (Z > 0) ...
Top