NonStop Maintenances
Std Accounts Test
3-7-18
Hello,

I have a maintenance that imports data from xml files located in the server.

The maint is called with qupdating, yet still SERP freezes for all users while the import
is running.
The same happens if the function is called via background task
As far as I understand, NonStop maintenances allows system users to carry out their normal update
tasks while it runs, I need help. with locating what is wrong the below implementation :

Version 8.1 2016-02-12
Windows Server & Clients.

Selection of the relevant part of the code ..

global
updating function boolean DoClaimXmlFileImport(var string errstr)
begin
    record AKClaimSubVc ClaimSubr, oldClaimSubr;
    record AKClaimVc Claimr, Claim2r;
   
    folder = "Claims//Submissions//Imports";
tofolder = "Claims//Submissions//Imports//Processed";
    filename = GetFileNameInDir(folder,0);
    if (blank(filename)) then begin
        goto LDoClaimXmlFileImport;
    end;
    importfile = filename;
    tofilename = filename;
    filename = folder & "//" & filename;

       

    xdata = ParseXMLFile(filename);
    RecordNew(ClaimSubr);
    curstrkey = "Claim.Submission/Header/";
    senderid = XmlGet(xdata,curstrkey & "SenderID");
   
    //reading and adding data to record .....
   
   
    while (TestEOF==false) begin
        ImportField;
        NextImportLine(true);
    end;
    ClaimSubr.ImportCount = filecnt;
    ClaimSubr.ImportFileName = importfile;
    if (RecordStore(ClaimSubr,false)) then begin end;

    UpdateBrowses("AKClaimSubVc");
    MoveFile(tofilename,folder,tofolder);
    eventdate = CurrentDate;
    Logtext(0,"ClaimSubr.ImportCount: " &ClaimSubr.ImportCount);
    AKUpdateClaimHist(ClaimSubr.SerNr,"","SubImp",ClaimSubr.TransactionDate,eventdate,filecnt,eventamount,sernr,"");
    DoClaimXmlFileImport = false;
return;
end;
   

   
global
procedure ClaimXmlFileImportMn(record RcVc RepSpec)
begin
String 255 errstr;

Logtext(0,"DoClaimXmlFileImportRemote");
while (qupdating.DoClaimXmlFileImport(errstr)) begin
end;

return;
end;
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
David Delač
Hi Aldevinas, Please post your customisations so I can help you....
11:40 20 Feb 2025
Piotr Wycichowski
The register for Order Classes is common for Sales orders and Service orders. When I set an Order Class to create an Activity - it works for Sales Order, while for Service Orders - not. Is any setting...
09:30 18 Feb 2025