Ppread(); Readfile() - IBM Prerequisite Scanner User Manual

Table of Contents

Advertisement

ppread()

Reads the contents of a file to a scripting dictionary object, further splitting each
line in the file by the specified separator input parameter if that separator exists in
the line.
Purpose
This function reads each line of the file, removes any leading or trailing spaces,
and checks whether it contains the separator. If it contains the separator, it splits
the line by the separator, adding each piece as an item to the dictionary object;
otherwise, it adds the trimmed line to an item in the dictionary object. It returns an
array that contains the dictionary object as the first index.
Syntax
ppread(fileName, sep)
Input parameters
String fileName
Character sep
Return values
Array array(dic)
Example
Example to be provided.

readFile()

Reads each line of a file into an index entry of an array.
Purpose
This function opens the file and reads each line of the file into an index entry of
the array. It returns the array.
Syntax
readFile(fileName)
Input parameters
String fileName
Return values
Array fileContents
124
Prerequisite Scanner: User's Guide
The name of the file to read into the dictionary object.
The character that represents the separator by which to split a line in the file.
Returns an array with the dictionary object (dic) as its first index.
The name of the file to read into the array.
Returns the array with the contents of the file.

Advertisement

Table of Contents
loading

Table of Contents