Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Modify Load statements with variables - syntax displays as error

Hi,

I try to use the same code for a full and a partial reload. Depending on which is executed, I want to add the 'add' keyword to the load statement with a variable:

if IsPartialReload() THEN

       TRACE Executing partial reload;

       Let vPartial = '1';

       Let vAdd = 'add';

else

       TRACE Executing full reload;

       Let vPartial = '0';

       Let vAdd ='';

endif;

....

concatenate (UM)

  $(vAdd) LOAD * INLINE [

     UserName, DeleteDate

     LastUpdate, $(vDate)

  ];

This is working fine, but the script editor marks the whole concatenate stuff as syntax error. Disturbing. Is there a way to bypass this?

Thanks

Jens

2 Replies
Gysbert_Wassenaar

No, it's because the script editor can evaluate the $(vAdd). That only can be done at run time when the script is actually executed. Therefore the script editor can't know if you've unintentionally made an error or intentionally wrote down code that can't be determined to be correct.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks, I was afraid that this is the answer. It's not really practical to have half the script highlighted as error.