Loop Command

Explanation Of Loop Command

When Automating a business process, you may need to process data repeatedly
until certain condition is met.This is repeatedly processing a data until a certain condition is met is called loop.

This command creates loop structures in your automation task to automate repetitive tasks by:

⚔️ Using start and end loop commands
⚔️ Including series of commands within the start and end loop commands,
which are executed repeatedly until a specific condition is met.
⚔️ Executing multiple records one at a time.


Automation Anywhere's Loop Command provides four different loop structures to automate repetitive tasks.

These includes:

⚔️ Start Loop
⚔️ End Loop
⚔️ Exit Loop
⚔️ Continue Loop

Start Loop Command enables you to start the loop.
You can define a series of actions to automate repetitive tasks within this structure.
These actions will be repetitively executed until the condition is met.
End Loop Command enables you to end the loop after the actions defined between the start and end loops are completed.
This command is inserted automatically within the start loop command.

If the End loop is mistakenly deleted, you can insert a new one.

The Exit Loop structure enables you to break out from a loop when an action or condition occurs.
The Exit loop command can exist only between start and End loop commands.

The Continue structure enables you to continue the next iteration of a loop when an action or condition occurs.
When the structure is executed,the commands up to end loop are skipped and next iteration of the loop is run.

Start Loop: It provides a list of sub-commands to create a series of action to automate a repetitive task.

The Times sub-command enables you to specify the number of times to loop through a specific task.

The List sub-command enables you to select an existing variable from the drop down list,
which will determine how many times the tasks are repeated before ending the loop.

The Conditions sub command allows you to run actions based on conditions that already exist.

E ach row in excel datasheet sub command is used in conjunction with the Get multiple Cells sub-command of the Excel command.

Each row in an internet explorer table is used in conjunction with the extract table sub command of the web recorder command.

Each row in S-Q-L Query data set is used in conjunction with various database commands.
It iterates the loop until the selected data is populated'in S-Q-L data set.

Each File in a Folder is used to perform an action on all files in a folder.
The number of files in a folder can vary.

Each folder in a Folder is used to perform an action on one or more of the folders.
It iterates the loop until the last sub folder of the selected folder.

Each row in a CSV or Text file is used to perform an action on every row in a CSV or Text file.

Each node in an XML data set is used to perform an action XML data set.
It iterates the loop until the last row of the data in the XML data set.


Each email message on server is used to perform an action on email messages in an email server.
It iterates the loop until the last email message on the server depending on the various conditions.

Note:- I will be updating this blog frequently.✍

Thank you for visiting this blog☕️

“You will not be punished for your anger, you will be punished by your anger”


To Learn Mainframe Modules (Cobol, Jcl, VSAM, DB2, CICS): Click here

For Latest Job Updates: Click here

For Online Shopping: Click here

You Might Also Like

0 Comments