Precisely Speaking
May 21, 2012, 06:48:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: So what's news with you?  Tell us about it in "Getting To Know You"!
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: run SB+ process from TCL?  (Read 1069 times)
slestak
Uber-Pro
****
Posts: 69



« on: December 03, 2010, 07:57:40 AM »

I apologize if this is elementary.  I do a lot of iterative testing, and always leave TCL before executing an SB process.  Is there a way to run a slash command from regular Unidata TCL?

One thought is to create a wrapper BASIC routine to call SB.EXECUTE, but if a general solution was available that would be great.  Almost like an SB.RUN or something.
Logged
slestak
Uber-Pro
****
Posts: 69



« Reply #1 on: December 03, 2010, 07:59:07 AM »

Ok, answering my own question.  It appears the M voc items will take args, so "M FOO" will launch the SB process FOO.

This works pretty well, except the TERM setting is not obeyed.  Scrolled screen output (from a CRT stmt in a loop) is lost when the process ends.
« Last Edit: December 03, 2010, 08:05:19 AM by slestak » Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #2 on: December 03, 2010, 08:12:29 AM »

Is it safe to assume you've logged in to SB+ and then dropped to the colon before doing the M <cmd> thing?

If you want to capture the CRT output, you might use COMO ON <name> at the start and COMO OFF at the end to capture the screen output to a _PH_ item.  Much easier to deal with that way.

I'm not entirely following the "TERM setting is not obeyed"; if you were logged into SB+ and then dropped to the colon and then issued the M <cmd> from the colon, it should use the same terminal type as you originally set when you logged into SB+.  That's not happening?

And just so I'm clear, what's the point of dropping to the colon before issuing the SB+ process?  Is this to overcome that caching thing in Unidata?
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
slestak
Uber-Pro
****
Posts: 69



« Reply #3 on: December 03, 2010, 08:36:19 AM »

I live in TCL pretty much.  I do not use the SB+ TCL either.  Just a '0' at the menu to drop to tcl.  Have to go there to compile my unibasic anyway.

I also have an 80x50 terminal, but SB does not respect the TERM setting.  I think I have a workaround.  My first attempt, running "M FOO" will leave you in SB when the process completes.  and it is the repaint of the SB screen which obscures my screen output.

I have also made a basic routine, SBR.TESTRIG that has a single CALL.SB.PROCESS("FOO") and it runs FOO and leaves me at TCL.

The reason I am doing this is pure laziness.  I am testing an extract and have run it 30-40 times this morning it seems.  It is a 3 step procedure to compile, M, slash command.  FIguring this out will allow me to use the command stack on a 2 step procedure.  .X2, .X2

Most automation is born out of laziness.

Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #4 on: December 03, 2010, 08:39:19 AM »

I hear ya man... We stand in the presence of giants. Smiley
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
slestak
Uber-Pro
****
Posts: 69



« Reply #5 on: December 03, 2010, 09:00:41 AM »

This is even better.

  1 * needed to call SB process from real TCL
  2 CALL SB.PROCESS(FIELD(@SENTENCE," ",2))


Then I can do SBR.TESTRIG FOO
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!