I've been working a certain amount recently with load interfaces, causing me to bemoan that there's no easy way of documenting them. As opposed to procedure steps (that are stored in tables PROGRAMS and PROGRAMSTEXT), these are in tables LOAD and LOADTEXT. Despite this, it was fairly easy to extend the SAVEPROGVERSION that I wrote about a few months ago to include load interface code.
There are two new snippets that have to be inserted into the procedure's text;
the first is at the beginning
:LOAD = 0; :TYPE = '\0'; /* 28/07/21: Get interface data */ SELECT EXEC.EXEC, EXEC.TYPE INTO :LOAD, :TYPE FROM EXEC, PROGRAMS WHERE PROGRAMS.EXECRUN = EXEC.EXEC AND PROGRAMS.PROG = :$.PRG;whereas the second part is towards the end: I have 'bolded' the new lines
GOTO 1 WHERE :TYPE = 'L'; /* Interface */ INSERT INTO GENERALLOAD (LINE, RECORDTYPE, TEXT) SELECT 3 + SQL.LINE, '4', TEXT FROM PROGRAMSTEXT WHERE PROG = :$.PRG; GOTO 2; LABEL 1; INSERT INTO GENERALLOAD (LINE, RECORDTYPE, TEXT) SELECT 3 + SQL.LINE, '4', TEXT FROM LOADTEXT WHERE LOAD = :LOAD; LABEL 2; EXECUTE INTERFACE 'TEST_PROGVERSION', SQL.TMPFILE, '-L', :$.GEN;
No comments:
Post a Comment