Focal Point
Maintain -- EXEC AT REMOTE KEEP -- KEEP not working?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1391064562

January 10, 2008, 03:40 PM
John_Edwards
Maintain -- EXEC AT REMOTE KEEP -- KEEP not working?
I have set up a call to a remote server, calling it this way:

EXEC TESTLOGN AT VMEDASRV KEEP;

In that focexec I write:

SQL SQLDBC SET DBCLOGON vmlogin/username,password

. . . which seems to connect correctly and allow for data to be returned within itself. However, I would expect that session to remain alive, including the SET command within it. When I come back to Maintain and attempt to do a FOR ALL NEXT to the same table I test within the focexec, I get an invalid user error. Does anyone know -- does KEEP actually work correctly? Is there a system setting that I need to invoke?

J.



January 10, 2008, 09:19 PM
John_Edwards
Update -- after reading the help files with exceptional care, I have discovered that the KEEP option only keeps the session open for future EXECs, not for calls from the Maintain code itself (i.e., For-All-Next, Revise, or Delete, etc.) This is a non-starter for me so I likely will not pursue this issue further.

J.



January 11, 2008, 08:02 AM
Maintain Wizard
Good Morning John
Just a slight correction. The KEEP command tells Maintain to KEEP the external procedure in memory, so if we EXEC it again, we don't have to perform I/O to get it. The reverse, DROP, says we are not going to save this procedure in memory.

If you perform an EXEC that sets up FILEDEFS or ALLOCATES on a Server, you can then do a CALL to manipulate the data. We do this sometimes for USE commands for SU and flat file allocations. But, this is for data files. I am honestly not sure what would happen with system commands.

However, there IS a SYSMGR command that allows you to set system variables from inside a Maintain procedure. If you do need to persue this, check out that command.

Mark