|
The SWSFGET FunctionRelated Topics
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:
SWSFGET SyntaxThe SWSFGET function takes two arguments. The invocation format for SWSFGET is: Z = SWSFGET(file, length)
Return ValuesSWSFGET 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.
ExampleThis call will read a line of data up to 256 bytes long.
|