Previous Topic Table Of Contents Parent Topic Next Topic |  | # The SWSFGET 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
SWSFGET is a high level function used to retrieve a line of data from files sent to the server in a Post operation. A file can be retrieved in either EBCDIC or ASCII. The attributes of the file in effect at the time of the SWSFGET call determine how the data is returned. The attributes of the file can be: Examined with the WWW.FILE.N.TOEBCDIC, and WWW.FILE.N.FLAGS built-in variables. Changed with the SWSFSET function, but by doing this, you will not change the above built-in variable values. ## SWSFGET Syntax The SWSFGET function takes two arguments. The invocation format for SWSFGET is:
          Z = SWSFGET(file, length)
> file Specifies the file number to be retrieved. The number must be between 1 and the number returned by a previous SWSFCNT() call. length Specifies the maximum length of data to be returned. If a line is longer than can be returned, a subsequent call can return the rest of the data. In this way, no data is lost. ## Return Values SWSFGET always returns a character string representing the returned data. SWSFGET will stop at the end of a line, indicated by the delimiters ASCII CR/LF or ASCII LF. In either case, the returned character string will contain the ending delimiter(s) unless the line is longer than the length argument. In that case, the returned string would not contain the delimiter(s); only the specified number of bytes would be returned. SWSFGET returns a string of length zero to indicate end-of-file. The SWSFGET operation is logged to the Server's wrap-around trace file with the arguments and resulting return data. ## Example This call will read a line of data up to 256 bytes long.
>     /*WWW  /testswsfget
>     /*REXX
>     Z = SWSFGET(1, 256)
Top