Previous Topic
Table Of Contents
Parent Topic
Next Topic

The SWSFRED 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

SWSFRED is a high level function used to retrieve a block 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 SWSFRED call will determine how the data is returned. The attributes of the file can be:

 

SWSFRED Syntax

The SWSFRED function takes two arguments. The invocation format for SWSFRED is:


      Z = SWSFRED(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.

 

Return Values

SWSFRED always returns a character string representing the returned data.

SWSFRED returns a string of length zero to indicate end-of-file.

The SWSFRED operation is logged to the Server's wrap-around trace file with the arguments and resulting return data.

 

Example

This call will read a block of data up to 8000 bytes long.


/*WWW  /testswsfred
/*REXX
Z = SWSFRED(1, 8000)

 


Top