| Author | 
         | 
          
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 01 2009 at 22:48 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi - I'm seeing a situation where one execution of a macro changes the value of a global variable, and a different execution of the same macro (but run with different parameters) running 20-30ms later uses the OLD value of the global variable.  
 
 -Is it possible there's a delay in updating the variable (i.e., would inserting a delay help)?
 
 -Is it possible that a macro loads its globals when it starts?  If so, is there a way to make it update on the fly, or otherwise facilitate better interprocess communication? 
 
 all (informed 8-}) thoughts welcome
 
 Thanks
 /j
  Edited by jeffw_00 - June 01 2009 at 22:49
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: June 02 2009 at 23:27 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Jeff,
 
 I thought this technically couldnt happen but checked the code just to make sure.  Everything concerning macros are passed through a single threaded execution queue so nothing can happen simultaneously.  So once a global variable is updated (this is a database operation), the new value will be used for every subsequent operation.
 
 Now what Im guessing could be happening is the following scenario.  When the eventlog says that a macro is executed, this entry is made when the macro is first launched.  This doesnt necessarily mean that the macro is finished.  If the macro has a wait or a messagebox or similar action, it will go into a "Wait" state and stop execution.  The execution queue will then go and launch whatever is next waiting in the queue (say the second macro).  So its possible that the global did not yet get updated yet the log shows macro1 executed followed by macro2.  Macro1 will not resume execution until macro2 completes execution or itself goes into a "Wait" state.  
 
 So Im thinking we may be something similar to the above.  Does the first macro have any "Wait" type of operations prior to the updating of the Global?
 
 Dave.
 
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   | 
       
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 03 2009 at 00:22 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi Dave - thanks - there are no waits involved, and I'm basing my comments on log entries showing when the variable is changed, and when it is used.  The macro starts off as follows
 
 -do some stuff- 
 if ({GBL}=1,"NEXTLINE","REAL_LABEL_FURTHER_DOWN") 
 Set Global GBL = 0.
 User message FOO
 Jump 999
 REAL_LABEL_FURTHER_DOWN
 (rest of macro)
 
 Now - two of these macros seem to be running at the same time.  In the event log I see
 
 10:24.25  Set GBL from 1 to 0
 10:24.25 FOO
 10:24.27  Set GBL from 0 to 0
 10:24.27 FOO
 
 That set GBL from 0 to 0 seems very weird, like the IF statement thought GBL was still a 1. 
 
 To be even more detailed:  This macro is triggered by either a Broadcast or Cleanup Message from a keypress trigger.  The code is designed to set GBL when a broadcast is received, and clear it when a Cleanup is received (or it gets cleared a second later by a different macro triggered from this one).  The goal is to trigger a macro from a broadcast OR a Cleanup message, but never from both.  
 
 In the failure case, broadcast/cleanup pairs are sequentially received from a couple of ControlLinc button presses, and then a subsequent button press generates ONLY a cleanup. So GBL is tested.  Even though GBL was cleared by the prior cleanup, the macro acts as if GBL was still set, and generates the odd looking "Set GBL from 0 to 0" message.
 
 If this doesn't trigger any thoughts, or suggestions for my further debug (which I'm happy to pursue), I can post the actual macro code and event log.  
 
 Thanks!
 /j
 
 
 
 
  Edited by jeffw_00 - June 03 2009 at 09:46
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 05 2009 at 16:44 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
here's the exported code fragment
 see that line 7 shouldn't go to line 8 if BDCST=1, except, well, it does.  
 
 Any thoughts?
 thanks
 /j
 
 
 KEYPRESS 1 37 (COMMENT) getvar_n(2,4) = 5 means broadcast, 6 means cleanup 0 
 KEYPRESS 2 27 if(ph_getvar_n(2,4)=5,"NEXTLINE","CHECK_FOR_CLEANUP") 0 
 KEYPRESS 3 38 0  ph_macroparm("DOBROADCAST",ph_getvar_s(1,1),ph_getvar_s(1,2) ,0,0,0) 0 
 KEYPRESS 4 27 "START" 0 
 KEYPRESS 5 26 CHECK_FOR_CLEANUP 0
  KEYPRESS 6 27 if(ph_getvar_n(2,4)=6,"NEXTLINE","DONE") 0 
 KEYPRESS 7 27 if ({BDCST}=1,"NEXTLINE","CLEANUP_START") 0 
 KEYPRESS 8 10 BDCST 0 0 
 KEYPRESS 9 38 0 ph_killmacrowait("DOBROADCAST") 0 
 KEYPRESS 10 36 "CLEANUP DETECTED AFTER BROADCAST, ABORTING" 0 
 KEYPRESS 11 27 "DONE" 0 KEYPAD: [LOCAL1] key: [LOCAL2]" 1 
 KEYPRESS 12 26 START
 
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 11 2009 at 21:38 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
bump?
 
 (no offense, but this could be a bug, since it started happening after I upgraded to 2.0)
 
 thanks!
 ?j
  Edited by jeffw_00 - June 11 2009 at 21:39
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         grif091 Super User 
          
 
  Joined: March 26 2008 Location: United States
 Online Status: Offline Posts: 1357
          | 
        
         
          
           | Posted: June 12 2009 at 19:37 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
If a bug is being considered then a failure to find the label "CLEANUP_START" would produce the same results.  Just as the true side not finding "NEXTLINE" results in the next sequential statement, the false side not finding "CLEANUP_START" would execute the next sequential statement.  A variable compare problem or a label locate problem produces the same results.
  __________________ Lee G
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 12 2009 at 20:10 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
agreed - can't see any reason why it can't find the label though
 /j
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         grif091 Super User 
          
 
  Joined: March 26 2008 Location: United States
 Online Status: Offline Posts: 1357
          | 
        
         
          
           | Posted: June 12 2009 at 20:31 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Perhaps adding another if with the same variable compare that sets a variable indicating whether the true or false condition is the result.  Might help Dave’s analysis of which PH component is having difficulty, either variable content/compare or label location. 
  __________________ Lee G
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         BeachBum Super User 
          
  
  Joined: April 11 2007 Location: United States
 Online Status: Offline Posts: 1880
          | 
        
         
          
           | Posted: June 14 2009 at 11:59 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Just a wild guess but I’ve experienced strange problems in the past and have solved them using the PH_ function.
 
 if (PH_GETGLOBAL_S("BDCST") = ”1”, "NEXTLINE", "CLEANUP_START")
  __________________ Pete - X10 Oldie
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: June 15 2009 at 22:25 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Jeff,
 
 Ive looked through the fragment and the portion you've posted looks like it should work.  I can find no reason why it would fail.
 
 Could you email me an export of the macro so I can import it into my system and run some debugging?
 
 Thanks,
 
 Dave.
 
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   | 
       
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 16 2009 at 21:50 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
HI Dave - this is embarrassing, but I've looked through my old notes as well as a forum search, and though i can find some related comments, I'm not sure I know how to export a macro and I'm afraid of using the Multi-editor when I'm unsure.  Can you post a quick step-by-step?  I'll paste it in the front of my "powerhome/insteon" notebook.
 
 Thanks!
 /j
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         grif091 Super User 
          
 
  Joined: March 26 2008 Location: United States
 Online Status: Offline Posts: 1357
          | 
        
         
          
           | Posted: June 17 2009 at 22:38 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
See Topic for Macro Export description...
 
 Macro Export
  __________________ Lee G
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 17 2009 at 22:46 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
thanks...
 
 
 
 Ok - immediately below is a log excerpt.  If you read it bottom to top, you can see that I added a line that prints the value of BDCST before it is tested.  You can see that it is 0, and then passes the "if {BDCST}=1" test and changes it from 0 to 0  This happens 3 times  because multiple copies of the macro are running.  
 
 Below that is the exported macro.
 
 I'm sure it's something stupid, but I don't see it.
 
 Thanks for your help
 /j
 
 
 6/17/09  08:36:31.5     28      CLEANUP DETECTED AFTER BROADCAST, KEYPAD: BPRESS_B1 key: 2,  ABORTING        &nbs p; 252     User   Message     16777215  &nb sp;  #ffffff     32768&nb sp;    #008000
  6/17/09  08:36:31.5     16      Global variable BDCST changed from 0 to  0           ;251     Global   Variable     0   &nb sp; #000000     15780518      #a6caf0
  6/17/09  08:36:31.484     28  &nbs p;  BROADCAST =  0           ;250     User   Message     16777215  &nb sp;  #ffffff     32768&nb sp;    #008000
  6/17/09  08:36:31.468     8    ;  Macro KEYPRESS  executed.        &nb sp; 249     Macro  & nbsp;  0     #000000  ;    65535      #ffff00
 6/17/09  08:36:31.453     11  &nbs p;  Trigger check of B1C2ON  performed.        &n bsp; 248     Trigger   Check     16777215    ;  #ffffff     8388608&nb sp;    #000080
  6/17/09  08:36:31.437     30  &nbs p;  Incoming Insteon received on Insteon DM controller POWERLINC. From Address:[09.CD.66] To Address:[05.12.2D] Flags:[69] Cmd1:[17] Cmd2:[2].  Decode: Group Cleanup. From: BDRM1KEYPAD To: POWERLINC1 Group: 2,  On         &nbs p;247     Insteon   In     0    &nb sp;#000000     65280  &nb sp;  #00ff00
 6/17/09  08:36:30.25     28    ;  CLEANUP DETECTED AFTER BROADCAST, KEYPAD: BPRESS_B1 key: 3,  ABORTING        &nbs p; 246     User   Message     16777215  &nb sp;  #ffffff     32768&nb sp;    #008000
  6/17/09  08:36:30.25     16    ;  Global variable BDCST changed from 0 to  0           ;245     Global   Variable     0   &nb sp; #000000     15780518      #a6caf0
  6/17/09  08:36:30.234     28  &nbs p;  BROADCAST =  0           ;244     User   Message     16777215  &nb sp;  #ffffff     32768&nb sp;    #008000
  6/17/09  08:36:30.218     8    ;  Macro KEYPRESS  executed.        &nb sp; 243     Macro  & nbsp;  0     #000000  ;    65535      #ffff00
 6/17/09  08:36:30.187     11  &nbs p;  Trigger check of B1C3ON  performed.        &n bsp; 242     Trigger   Check     16777215    ;  #ffffff     8388608&nb sp;    #000080
  6/17/09  08:36:30.187     30  &nbs p;  Incoming Insteon received on Insteon DM controller POWERLINC. From Address:[09.CD.66] To Address:[05.12.2D] Flags:[69] Cmd1:[17] Cmd2:[3].  Decode: Group Cleanup. From: BDRM1KEYPAD To: POWERLINC1 Group: 3,  On         &nbs p;241     Insteon   In     0    &nb sp;#000000     65280  &nb sp;  #00ff00
 6/17/09  08:36:29.109     28  &nbs p;  CLEANUP DETECTED AFTER BROADCAST, KEYPAD: BPRESS_B1 key: 3,  ABORTING        &nbs p; 240     User   Message     16777215  &nb sp;  #ffffff     32768&nb sp;    #008000
  6/17/09  08:36:29.093     16  &nbs p;  Global variable BDCST changed from 0 to  0           ;239     Global   Variable     0   &nb sp; #000000     15780518      #a6caf0
  6/17/09  08:36:29.093     28  &nbs p;  BROADCAST =  0           ;238     User   Message     16777215  &nb sp;  #ffffff     32768&nb sp;    #008000
  6/17/09  08:36:29.062     8    ;  Macro KEYPRESS  executed.        &nb sp; 237     Macro  & nbsp;  0     #000000  ;    65535      #ffff00
 6/17/09  08:36:29.046     11  &nbs p;  Trigger check of B1C3ON  performed.        &n bsp; 236     Trigger   Check     16777215    ;  #ffffff     8388608&nb sp;    #000080
  6/17/09  08:36:29.015     30  &nbs p;  Incoming Insteon received on Insteon DM controller POWERLINC. From Address:[09.CD.66] To Address:[05.12.2D] Flags:[69] Cmd1:[17] Cmd2:[3].  Decode: Group Cleanup. From: BDRM1KEYPAD To: POWERLINC1 Group: 3,  On         &nbs p;235     Insteon   In     0    &nb sp;#000000     65280  &nb sp;  #00ff00
 
 
 insert into macroheader values ('KEYPRESS','General Controlinc Press',0,0,1);
 insert into macrodetail values ('KEYPRESS',1,37,'',NULL,'getvar_n(2,4) = 5 means broadcast, 6 means cleanup',0,'');
 insert into macrodetail values  ('KEYPRESS',2,27,'',NULL,'if(ph_getvar_n(2,4)=5,"NEXTLINE"," CHECK_FOR_CLEANUP")',0,'');
 insert into macrodetail values ('KEYPRESS',3,36,'',NULL,'"BROADCAST_DETECTED, KEYPAD: [LOCAL1] key: [LOCAL2]"',1,'');
 insert into macrodetail values  ('KEYPRESS',4,38,'',0,'ph_macroparm("DOBROADCAST",ph_getvar_ s(1,1),ph_getvar_s(1,2),0,0,0)',0,'');
  insert into macrodetail values ('KEYPRESS',5,27,'',NULL,'"START"',0,'');
 insert into macrodetail values ('KEYPRESS',6,26,'',NULL,'CHECK_FOR_CLEANUP',0,'');
 insert into macrodetail values  ('KEYPRESS',7,27,'',NULL,'if(ph_getvar_n(2,4)=6,"NEXTLINE"," DONE")',0,'');
 insert into macrodetail values ('KEYPRESS',8,36,'',NULL,'"BROADCAST = {BDCST}"',0,'');
 insert into macrodetail values ('KEYPRESS',9,27,'',NULL,'if ({BDCST}=1,"NEXTLINE","CLEANUP_START")',0,'');
 insert into macrodetail values ('KEYPRESS',10,10,'BDCST',NULL,'0',0,'');
 insert into macrodetail values  ('KEYPRESS',11,38,'',0,'ph_killmacrowait("DOBROADCAST")',0,' ');
 insert into macrodetail values ('KEYPRESS',12,36,'',NULL,'"CLEANUP DETECTED AFTER BROADCAST, KEYPAD: [LOCAL1] key: [LOCAL2], ABORTING"',0,'');
 insert into macrodetail values ('KEYPRESS',13,27,'',NULL,'"DONE"',0,'');
 insert into macrodetail values ('KEYPRESS',14,26,'',NULL,'"CLEANUP_START"',0,'');
 insert into macrodetail values ('KEYPRESS',15,36,'',NULL,'"CLEANUP DETECTED, KEYPAD: [LOCAL1] key: [LOCAL2]"',1,'');
 insert into macrodetail values ('KEYPRESS',16,26,'',NULL,'START',0,'');
 insert into macrodetail values ('KEYPRESS',17,38,'',0,'ph_killmacrowait("GOCLEAR")',0,'');
 insert into macrodetail values  ('KEYPRESS',18,27,'',NULL,'if(ph_getvar_n(1,2)>5,"SIX_TO_ TEN","NEXTLINE")',0,'');
 insert into macrodetail values  ('KEYPRESS',19,16,'',NULL,'if(ph_getvar_n(1,2)=1,1,3)',0,'') ;
 insert into macrodetail values  ('KEYPRESS',20,38,'',0,'ph_macroparm("MULTIPRESS","FRONTSPOT CYC","FRONTSPOTOFF","DRIVEWAYON","DRIVEWAY_CYC"," [LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',21,27,'',NULL,'"FINISHUP"',0,'');
 insert into macrodetail values  ('KEYPRESS',22,16,'',NULL,'if(ph_getvar_n(1,2)=2,1,3)',0,'') ;
 insert into macrodetail values  ('KEYPRESS',23,38,'',0,'ph_macroparm("MULTIPRESS","NIGHTON", "NIGHTOFF","SLEEPINSET","NULL"," [LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',24,27,'',NULL,'"FINISHUP"',0,'');
 insert into macrodetail values  ('KEYPRESS',25,16,'',NULL,'if(ph_getvar_n(1,2)=3,1,3)',0,'') ;
 insert into macrodetail values ('KEYPRESS',26,38,'',0,'ph_macroparm("GOBUTTON","[LOCAL1]",0,0,0,0)',0,'');
 insert into macrodetail values ('KEYPRESS',27,27,'',NULL,'"DONE"',0,'');
 insert into macrodetail values  ('KEYPRESS',28,16,'',NULL,'if(ph_getvar_n(1,2)=4,1,3)',0,'') ;
 insert into macrodetail values  ('KEYPRESS',29,38,'',0,'ph_macroparm("MULTIPRESS","BEDROOM2S OUNDON","BEDROOM2SOUNDOFF","LIVRMLITESON","LIVRMLITESOFF"," [LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',30,27,'',NULL,'"FINISHUP"',0,'');
 insert into macrodetail values  ('KEYPRESS',31,27,'',NULL,'if(ph_getvar_n(1,2)=5,"NEXTLINE", "ERROR")',0,'');
 insert into macrodetail values  ('KEYPRESS',32,38,'',0,'ph_macroparm("MULTIPRESS","PHONESW85 18","PHONESW2589","TOOLCHARGERON","TOOLCHARGEROFF"," [LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',33,27,'',NULL,'"FINISHUP"',0,'');
 insert into macrodetail values ('KEYPRESS',34,26,'',NULL,'SIX_TO_TEN',0,'');
 insert into macrodetail values  ('KEYPRESS',35,16,'',NULL,'if(ph_getvar_n(1,2)=6,1,3)',0,'') ;
 insert into macrodetail values  ('KEYPRESS',36,38,'',0,'ph_macroparm("MULTIPRESS","REARLITES CYC","REARLITESOFF","XMASON","XMASOFF"," [LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',37,27,'',NULL,'"FINISHUP"',0,'');
 insert into macrodetail values  ('KEYPRESS',38,16,'',NULL,'if(ph_getvar_n(1,2)=7,1,3)',0,'') ;
 insert into macrodetail values  ('KEYPRESS',39,38,'',0,'ph_macroparm("MULTIPRESS","KITCHENMU SICON","KITCHENMUSICCYC","KITCHENMUSICON","KITCHENMUSICOFF", "[LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',40,27,'',NULL,'"FINISHUP"',0,'');
 insert into macrodetail values  ('KEYPRESS',41,16,'',NULL,'if(ph_getvar_n(1,2)=8,1,3)',0,'') ;
 insert into macrodetail values  ('KEYPRESS',42,38,'',0,'ph_macroparm("MULTIPRESS","MAILALERT RESET","MAILALERTRESET","FAMROOMHEATON","FAMROOMHEATOFF"," [LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',43,27,'',NULL,'"FINISHUP"',0,'');
 insert into macrodetail values  ('KEYPRESS',44,16,'',NULL,'if(ph_getvar_n(1,2)=9,1,3)',0,'') ;
 insert into macrodetail values  ('KEYPRESS',45,38,'',0,'ph_macroparm("MULTIPRESS","BEDROOM3S OUNDON", "BEDROOM3SOUNDOFF","UPPHONEON","UPPHONEOFF","[LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',46,27,'',NULL,'"FINISHUP"',0,'');
 insert into macrodetail values  ('KEYPRESS',47,27,'',NULL,'if(ph_getvar_n(1,2)=10,"NEXTLINE" ,"ERROR")',0,'');
 insert into macrodetail values  ('KEYPRESS',48,38,'',0,'ph_macroparm("MULTIPRESS","CLOTHESWA SHERON","CLOTHESWASHERCYC","BIKELITEONSHORT","BIKELITEONLONG ","[LOCAL1]")',0,'');
 insert into macrodetail values ('KEYPRESS',49,26,'',NULL,'FINISHUP',0,'');
 insert into macrodetail values ('KEYPRESS',50,38,'',0,'ph_setglobal_a("[LOCAL1]",0)',0,'');
 insert into macrodetail values ('KEYPRESS',51,27,'',NULL,'"DONE"',0,'');
 insert into macrodetail values ('KEYPRESS',52,26,'',NULL,'ERROR',0,'');
 insert into macrodetail values ('KEYPRESS',53,36,'',NULL,'"Failed to find branch for [LOCAL2] from [LOCAL1]"',0,'');
 insert into macrodetail values ('KEYPRESS',54,26,'',NULL,'DONE',0,'');
 
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: June 17 2009 at 23:11 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Jeff,
 
 Found it!  Line 140 of your macro is a label "CLEANUP_START" (with the quotes).  Remove the quotes and you should be good.  To go to this label as is, you would need to change your line 90 to if ({BDCST}=1,"NEXTLINE",'"CLEANUP_START"')
 
 Because the label is not matching, control will always go to the next line (line 100).
 
 I knew it would be simple once I saw the actual code  .
 
 Dave.
 
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   | 
       
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: June 17 2009 at 23:17 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
As a little afterthought, since this is a very easy mistake to make, here is a little SQL to find anywhere you've used quotes in a Label command:
 
 
Code: 
   
    
    
      
       | select * from macrodetail where type = 26 and send_keys like '%"%' or send_keys like '%''%' | 
       
       | 
    
    | 
 
 
 
 Just open the Multi-editor, change to SQL mode (shift-F5), copy and paste the code above, execute it (little running man on the tool bar).  You'll get a list of every occurance.
 
 HTH,
 
 Dave.
 
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   | 
       
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 17 2009 at 23:23 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi Dave - thank you so much.  I've stared at it for many minutes (I won't exaggerate and say hours) looking for that kind of error.  Sometimes another set of eyes helps.
 
 I owe you one man - thanks
 
 and I'll run that SQL sometime soon (going to bed now - but happy)
 
 Thanks!
 
 /j
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   | 
       
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: June 19 2009 at 21:06 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
didn't find anything else, and the macro now runs properly (had an occurance this morning)
 
 all is well and thanks! ! !
 /j
         | 
        
       
        | Back to Top | 
         
          
         | 
        
       
       
        |   |       
      | 
    
   
  |