SplitToList

Top  Previous  Next

×V4.1Ø

S

A

W

WS

ü

ü

Syntax - Splitting from a file

SplitToList <variable name> FILE <Row Delimiter> [<Column Delimiter>]

 

Syntax - Splitting from a variable :

SplitToList  <List Name> <Value to be Split> <Row Delimiter> [<Column Delimiter>]

       Where:

               <List Name> is the user defined name that is assigned to the list.

               <Value to be Split> is a literal string or a variable that contains a literal string.

               <Row Delimiter> is a literal string or a variable that contains a literal string.

               <Column Delimiter> is a literal string or a variable that contains a literal string.

 

Description:

This command is used to take the contents of a variable or string and split the variable or value into a list based on the specified delimiters.  Each time EMUE encounters the <Row Delimiter> in the <Value to Split>, EMUE begins copying the contents of the variable to the next row of the list.  If the <Column Delimiter> is specified, then each time EMUE encounters that delimiter, EMUE will begin copying the contents of the value to the next column in the current row of the list.

 

This command is useful when delimited data is stored in a single variable.  When working with web pages in particular, it is difficult to control the way that data is extracted from the site.  In some cases, especially in scenarios where the data appears in rows and columns, but is not returned that way, this command can be used to organize the data into rows and columns.

If the list does not exist, EMUE will create it.

 

Sample 1:

       The following example uses the carriage return line feed (new line character) as a delimiter to split the variable Locations into rows.  Since there is no column delimiter, the list will have only one column.

SplitToList Locations LocationsWebPage &crlf

 

Sample 2:

       The following example uses the carriage return line feed (new line character) as a delimiter to split the variable Locations into rows and the comma to split the columns.

SplitToList Locations LocationsWebPage &crlf ","

 

Sample 3:

       The following example uses a comma delimiter to split the current input line file into columns.

SplitToList Patients FILE "' ","

 

See Also:

CreateList

DisposeList

ListExists

FindListPosition

GetListCount

GetListMember

GetListPosition

PutListMember