FUENTE ORIGINAL DEL ARTÍCULO
We all know the main way to compile an adonix source:
in Sage X3 version 6.x and earlier, in fact, there is a special editor (ADOTRT function) available,
from where you can compile with the F7 function key or with the appropriate menu.
From 7.x, in the web interface there is still the ADOTRT function available, with the “Compile” button available,
but the F7 key is no longer available, and ESC-F7 escape sequence can not be used.
From version 7.x we also have Eclipse available through the pluging Safe X3.
But if for some reason we needed to compile a source from a program?
Or if we wanted to recompile all the sources starting with Y?
(By the way, you know that the changes made by the end customer should they start with the Z?
The Y would be reserved for consultant developments…)
To do this, the following call is helpful:
Where:
- FOLDER is the folder where the file to be compiled is contained
- SOURCE is the name of the file, which must have extension src, to be compiled (but the name must be indicated without extension, for example “SPESOH”)
- DOSSIER is the name and dossier in which the folder is located: put nomap and it’s ok, except for special uses
- OK is a variable of integer type to indicated if the compilation was successful
To compile all customized sources, we can do:
Some comments:
- nomap o nomap(0), it’s the same, returns the name of the current dossier
- seg$(STR, start, end) returns a substring of STR that starts from the character in start position, up to index character end
- instr(start, STR, find) search the string find in STR from index start and returns the position
Summing up
need to remove “.src” from the file name.
You could use other dos commands to already have just the name directly, but it was less fun!