#define.BundleSize(1000) TextIo textIO; container line; container lineBundle; int 0; numOfRows = new textIO = textIO(_name, #io_read); if (textIO) { while (textIO.status() == IO_Status::Ok) { line = textIO.read(); if (line) { lineBundle += [conpeek(line,1), conpeek(line,2)]; numOfRows++; if mod 0) (numOfRows #BundleSize == { MyCustomImport::processBundle(lineBundle); conNull(); lineBundle = } } } if (lineBundle) { MyCustomImport::processBundle(lineBundle); conNull(); lineBundle = } } else { throw error(strfmt("@SYS18678", _name)); } info(strFmt("%1 number of lines imported.", numOfRows)); } // AOSRunMode::Server private static server void processBundle(container _lineBundle) { container line; MyCustomTable customTable; ABC abcValue; int i = 0; new RecordInsertList recordInsertList = RecordInsertList(tableNum(MyCustomTable)); ttsBegin; if conLen(_lineBundle)) (i < { conPeek(_lineBundle, line = i);
#define.BundleSize(1000) TextIo textIO; container line; container lineBundle; int numOfRows = 0; textIO = new textIO(_name, #io_read); if (textIO) { while (textIO.status() == IO_Status::Ok) { line = textIO.read(); if (line) { lineBundle += [conpeek(line,1), conpeek(line,2)]; numOfRows++; if (numOfRows mod #BundleSize == 0) { MyCustomImport::processBundle(lineBundle); lineBundle = conNull(); } } } if (lineBundle) { MyCustomImport::processBundle(lineBundle); lineBundle = conNull(); } } else { throw error(strfmt("@SYS18678", _name)); } info(strFmt("%1 number of lines imported.", numOfRows)); } // AOSRunMode::Server private static server void processBundle(container _lineBundle) { container line; MyCustomTable customTable; ABC abcValue; int i = 0; RecordInsertList recordInsertList = new RecordInsertList(tableNum(MyCustomTable)); ttsBegin; if (i < conLen(_lineBundle)) { line = conPeek(_lineBundle, i);
Bestpracticesfordevelopingcustomizations_AX2012.docx