ST-BASETOOLS - READ Functions

Wichtig
Wichtig
using "ST-BaseTools.FBL"

BaseTools_Read_InitFile

Description: Inserts reading of filecontent line by line using BaseTools.
Return-Type: void
Nr.
Argument
Typ
Beschreibung
1
filePathAndName
string
Path and name of the file to be read.
2
fileEncoding
string
e.g. utf8bom (default = 'auto')
3
fileChannel
int
default = 4 (Opacc BlockScript)

BaseTools_Read_GetNextContentLine

Description: Inserts reading of filecontent line by line using BaseTools.
Return-Type: string
Nr.
Argumente
Typ
Beschreibung
1
fileChannel
int
default = 4 (Opacc BlockScript)
Beispiel
var filePath := '..\\tx\\test\\'
var fileName := 'bo.addr.csv'
if( BaseTools_Read_InitFile(filePath+''+fileName,'auto',1) = FALSE )
  { throw 'Open file'+filePath+''+fileName+' not possible!'}
// -----------------------------------------------------------------------------------------------------
while(READ.IsAtEnd(1) = FALSE)
{
  var lineContent := BaseTools_Read_GetNextContentLine(1) /// fileChannel  > default: '4'
}

BaseTools_Read_GetFullFileContent

Description: Reading full filecontent using BaseTools
Return-Type: string
Nr.
Argumente
Typ
Beschreibung
1
filePathAndName
string
Path and name of the file to be read.
2
fileEncoding
string
e.g. utf8bom (default = 'auto')
3
fileChannel
int
default = 4 (Opacc BlockScript)
Beispiel
var filePath := '..\\tx\\test\\'
var fileName := 'bo.addr.csv'
var fileContent :=  BaseTools_Read_GetFullFileContent(filePath+''+fileName,'utf8bom')