static void JobExportWorker(Args _args)
{
HcmWorker hcmWorker;
CommaTextIo file;
container line;
#define.filename(@'C:\Worker.csv')
#File
file = new CommaTextIo(#filename, #io_write);
if (!file || file.status() != IO_Status::Ok)
{
throw error("File cannot be opened.");
}
file.outRecordDelimiter('\r\n');
file.outFieldDelimiter('\t');
while select hcmWorker
{
line = [hcmWorker.personnelnumber,hcmWorker.Name()];
file.writeExp(line);
}
info(strFmt("File %1 created.", #filename));
}