Opens a text file for processing. It is the first function to call to begin writing a text file.
DFWOpen(FileName [ , fdel [ , sdel [ , append [ , encoding ] ] ] ] )
It can be an attribute, variable or constant of the character type. Its value will be considered as the file name to be processed. It may contain directory specifications or not. If it does not have them, it will be created in the current directory.
It can be an attribute, variable or constant of the character type, optional, which indicates the delimiter character among fields. If you wish to specify the tab character as separator, the value of this parameter must be the string “\t” string.
It can be an attribute, variable or constant of the character type, optional, which indicates the delimiter character of the string fields. Only the first character of the parameter value is considered. Its value may be any character not appearing in the texts. Its default value is the “ (quotation mark).
It can be an attribute, variable or constant of the numeric type, optional, which indicates what to do if the file exists. If it is 1, the file will be opened for append; if it is 0, the file will be overwritten with a new one.
It can be an attribute, variable or constant of the character type, optional, which indicates the encoding to be used to write the file. If you specify this parameter, it means that the length used in the function DFWPTxt means “number of bytes”.
Objects: Procedure, Transaction, Web Panel, Data Provider
Generators: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3)
This function may return some of the following values:
||The file has been opened.
||It occurs when this function is called more than once without previously calling the dfwclose function. If the trace is activated you will see the ADF0005 message indicating this error.
||It occurs when the file identified as <filename> could not be opened. The cause may be clearly identified by enabling the trace and looking for the message with ADF0001 code. It is most common for the file not to exist.
||Not enough memory
||It occurs when it is not possible to reserve a buffer of <length> bytes. If the trace is activated you will see the ADF0007 message indicating this error.
Delimited ASCII files functions