universepickjbase

How can I make the new list created by my UV BASIC program the active list when executed from TCL like in jBase's OR-LISTS program?


We are trying to convert from jBase to Universe. I've written a UV BASIC program called MERGE.MY.LISTS that joins an arbitrary number of existing lists together and saves the new list to list MYMERGEDLIST. My intention is to replicate the OR-LISTS program that comes with jBase.

0001 MYMERGED=' '
0002 LOOP
0003   GET(ARG.)MYARG ELSE EXIT
0004   GETLIST MYARG TO MYLIST
0005   LOOP
0006     READNEXT MYITEM FROM MYLIST ELSE EXIT
0007     PRINT MYITEM
0008     IF MYMERGED = ' ' THEN
0009       MYMERGED = MYITEM
0010     END
0011     ELSE
0012       MYMERGED = MYMERGED : @FM : MYITEM
0013     END
0014   REPEAT
0015 REPEAT
0016 WRITELIST MYMERGED ON "MYMERGEDLIST"

I am executing the program from TCL like this: MERGE.MY.LISTS LIST1 LIST2 LIST3 LIST4

The program is working perfectly with 1 exception: I can not figure out how to make the new list MYMERGEDLIST the active list upon return to TCL. In jBase, the OR-LISTS program automatically does this. I know that I can just use GET.LIST right after running my program, but I already have many PROCs and PARAGRAPHs that call OR-LISTS, and I'd rather not have to modify them at all if possible.

I have tried ending the program with "EXECUTE GET-LIST MYMERGEDLIST" and "PERFORM GET-LIST MYMERGEDLIST" with no luck. I believe that the list is becoming active inside the program, but once the program is done and control is returned to the PROC, the list is not active.


Solution

  • I don't have a Universe system here to test, but try CHAIN "GET-LIST ...".

    D3 has TCL commands and special operators for list manipulation like this. With these MVDBMS products all under one roof now, they are all influencing one another with complimentary features. It would be worthwhile to check with Rocket Support to see if any of those D3 nuances have been ported to Universe.