Macro Scheduler 15

LabelToVar

LabelToVar>LabelName,VariableName[,WantLineBreaks,IgnoreVariables,EndToken]

 

Reads the contents of a data label into the specified variable.

 

The optional parameter WantLineBreaks can be set to 0 to force LabelToVar to discard line breaks.  By default line breaks are retained (WantLineBreaks=1).  Ommitting WantLineBreaks or setting it to anything other than zero will cause line breaks to be included as default.  Setting to zero causes line breaks to be removed.

 

Optional parameter IgnoreVariables can be set to 1 to ignore variables inside % symbols in the string.  The default is 0 (all variables are resolved).

 

Optional parameter EndToken allows you to set what can be used to signify the end of the block.  The default is the end comment token ("*/").  Whatever is specified must exist at the start of the line.

 

Note that WantLineBreaks, IgnoreVariables and EndToken must all be specified if any one is required.

 

A data label takes the same format as used by the binary import tool which imports binary data into a label.

 

LabelToVar is useful where you need to specify long constant strings in your script and wish to avoid concatenating each line.

 

Example:

 

LabelToVar>SQL1,mySQL

 

/*

SQL1:

select id, forename, surname

from customers

where

surname = '%strSurname%'

*/