Page 1 of 1

How to read a text file in process?

Posted: Tue Nov 01, 2011 1:51 pm
by les
Good day! Help me please.
I have created a process, the data source is a text file. All the settings I made in the dialog boxes, creating variables, set delimiters.
The process reads data from a file and writes out to another file. It works.
Is it possible to specify a data source, delimiters in the code without dialog boxes? For example using the function:

Code: Select all

strPath = GetProcessErrorFileDirectory;
File = strPath | 'tm1server.log';

DataSourceType='CHARACTERDELIMITED';
DatasourceNameForServer=File;
DatasourceASCIIDelimiter=' ';
DatasourceASCIIQuoteCharacter='';
Is it possible to create variables in the code and write data into them from the source file?

Re: How to read a text file in process?

Posted: Tue Nov 01, 2011 2:11 pm
by Steve Vincent
from the source file, no.

you can't use the source file to pass paramaters including the location of the source file if that keeps changing. what you can do is have a config file (or cube view, attributes or anything that can hold what you need) in a static location and use that instead. so one TI can always use the same source, that picks up the various parameters then use that to pass the parameters from the initial TI to the one doing the work.