If GPE = 0, the standard sorting is applied. transfer the files from the X3 server into the archiving system.
The full names of the files to be transferred are in the NOMFIC(1..NBFIC) variable
Setting the TRACE variable to 1 allows to determine if a log file is open.
An example of code:
$ACTION
ACTION example
When "ARCFIL": Gosub ARCFIL
When Default:
Endcase
Return
$ARCFIL
Gosub SET_NOMPCE From ARCHIVE
Gosub COPFIC From ARCHIVE: # File copy
Call SETREP(NOMPCE,REPERT) From GOBJTXT
Call EXISTE(REPERT,STAT) From ORDSYS
If STAT<>2
ERM = "|"+REPERT+"|\"+mess(9,141,1): Non-existent directory
Gosub AFF_ERR From ARCHIVE
Else
NOMFIC = DIRPCE+SEP+FICHIER1
NOMFIC = ctrans(NOMFIC," ","")
NOMPCE = right$(NOMPCE,instr(1, NOMPCE, "@")+1)
NOMPCE = ctrans(NOMPCE," ","")
Endif
Gosub ARCHIVE From ARCHIVE: # Parameters and archiving evaluation
If OK
If [F:ARC]TYPEVT=1
Call MAJPCE(CODFLD,VALFLD,DEBUG,TRACE) From ARCHIVE
Elsif [F:ARC]OBJLNK<>""
Gosub SETCLE From =NOMPRG
Call CREPCE([F:ARC]OBJLNK,CLEOBJ,CODFLD,VALFLD,DEBUG,TRACE) From ARCHIVE
Endif
Endif
Endif
Return
If adxmac(0) <> "" & adxmac(0) <> adxmac(-1)