Hello,
it is a single client system.
And problem is not that db is lost (in this case I would get an error I think),
=> my progress programm is completely lost and teh customer has to restart the program.
Here is the code without definitions:
Verarbeitung:
DO WHILE vl-x = TRUE
ON ERROR UNDO Verarbeitung, LEAVE Verarbeitung
ON END-KEY UNDO Verarbeitung, RETRY Verarbeitung
ON STOP UNDO Verarbeitung, RETRY Verarbeitung:
IF RETRY THEN
RUN Dispatch IN THIS-PROCEDURE ('Interrupt':U).
IF adm-vl-Interrupt THEN
LEAVE Verarbeitung.
ASSIGN vi-z = vi-z + 1.
RUN check4file IN vhg-libsystem("":U,vc-vorgfile) NO-ERROR.
/* internal check*/
IF {&OK} THEN DO:
RUN check4file IN vhg-libsystem("":U,vc-expfile) NO-ERROR.
IF {&OK} THEN DO:
ASSIGN vl-x = FALSE
pc-temp = "":U.
RUN anzeigen(pc-temp,0) NO-ERROR.
END.
ASSIGN vl-kopiert = TRUE.
RUN filecopy (vc-vorgfile,vc-inputfile) NO-ERROR.
/* internal proc */
IF {&OK} THEN DO:
INPUT STREAM herein FROM VALUE(vc-inputfile).
REPEAT:
IMPORT STREAM herein UNFORMATTED vc-Zeile NO-ERROR.
IF NUM-ENTRIES(vc-zeile,"-":U) > 2 THEN
ASSIGN pc-temp = ENTRY(2,vc-zeile,"-":U) + "-":U + ENTRY(3,vc-zeile,"-":U) NO-ERROR.
ELSE IF NUM-ENTRIES(vc-zeile,"-":U) > 1 THEN
ASSIGN pc-temp = ENTRY(2,vc-zeile,"-":U) NO-ERROR.
END.
INPUT STREAM herein CLOSE.
RUN anzeigen(pc-temp,0) NO-ERROR.
END.
ELSE DO:
ASSIGN vl-x = FALSE
pc-temp = "":U.
RUN anzeigen(pc-temp,0) NO-ERROR.
END.
END.
ELSE DO:
IF vl-kopiert = TRUE THEN DO:
ASSIGN vl-x = FALSE
pc-temp = "":U.
RUN anzeigen(pc-temp,0) NO-ERROR.
END.
ELSE DO:
IF vlg-cardwareaktiv = FALSE THEN DO:
ASSIGN vl-x = FALSE
pc-temp = "":U.
RUN anzeigen(pc-temp,0) NO-ERROR.
END.
ELSE DO:
RUN check4file IN vhg-libsystem("":U,vc-expfile) NO-ERROR.
IF {&OK} THEN DO:
ASSIGN vl-x = FALSE
pc-temp = "":U.
RUN anzeigen(pc-temp,0) NO-ERROR.
END.
ELSE DO:
ASSIGN vi-wert = vi-wert + 1.
/* nothing stay in 'do while' */
END.
END.
END.
END.
END. /* do while".*/