Set Creation in FDL

Grouping jobs into named Sets enables you to use those Sets to specify retracing targets, create high-level flows, and generate reports. Use the CLI to create the Sets and order them in a hierarchical manner that makes sense to you. Each Set is created by using the S or S+ command.

Important: You can name Sets anything, but you cannot use the same name more than once. If you use the same name for the Set, the previous Set will be overwritten. To add to an existing Set, use the S+ procedure to append to a Set. See the instructions below.
One Set
To create a small, simple Set, do the following:
S foo1 { J vw sleep 0 } ## ID001
This create a Set name foo1, with one sleep job. For clarification purposes, an ID has been assigned. In the GUI, this is represented as such:
Figure 1. One Set


One Nested Set
To create a Set nested within a Set, do the following:
S foo2 {                     ## ID002
  S bar2 { J vw sleep 0 }                ## ID003
}                                        
Here, two Sets are created, named foo2 and bar2. However, only bar2 has a job assigned to it. Here is the GUI representation:
Figure 2. Set Nested with a Set


Two Sets are created, so each receives it's own ID number.
Using the Colon Syntax
You can use a colon ":" to create a visual representation of nested Sets in the Sets tab. This can be useful for organizing Sets without the need to create an acutal Set for every level of the desired heirarchy.
Create a visual representation of a hierarchical set structure, with only one job in one Set:
S foo3:bar3 { J vw sleep 0 } ## ID003
In this example, foo3 is just part of a single Set named foo3:bar3, which has one job. This is represented in the GUI as such:
Figure 3. Set Created with Colon Syntax


You can see that foo3 is shown in black, which indicates it is for visual representation only.
bar3 is shown in blue because it is the last colon-separated name component, so it represents the entire foo3:bar3 Set, which contains one job.
Because bar3 is only visually nested within foo3, one ID is associated with the Set.
Create Sets Each Having Jobs using the Colon Syntax
In the example above, only one Set had a job. However, you can create multiple Sets where each will have jobs associated with them, and use the colon to appear as nested. In this example, two Sets are created, and both will contain jobs.
S foo4 { J vw sleep 0 } ## ID004
S foo4:bar4 { J vw sleep 0 } ## ID004
Figure 4. Two Sets


Here, both foo4 and bar4 are blue, because both Sets contain functioning objects.
This can also be created with this command structure:
S foo5 {
  J vw sleep 0
  S foo5:bar5 { J vw sleep 0 }
}
Set foo5 is created, with a job associated with it. Then, bar5 is created within foo5, also with it's own job.

Append Sets

You can append to an existing set by using S+. This enables you to add to an existing Set without overwriting the original Set.

An example of using S+ and colons to create hierarchical sets is shown below:

Create the first Set
S "foo1" {
    J vw cp aa bb
}
Append a second Set to the first using S+

S+ "foo1" {
    J vw cp bb cc
}
foo1 now has two jobs attached to it. "J vw cp aa bb" and "J vw cp bb cc". Because S+ was used, rather than just the S procedure, the jobs were added to the foo1 Set, rather than overwriting the original.
Append Jobs to a Non-existing Set
If you try to append jobs to a Set that does not exist yet, the Set is created by default, with the added jobs attached to it.
For example
S+ "MyNewSet" {
    J vw cp cc dd
}
A new Set named "MyNewSet" is created.

Common Mistakes

Do not use the same Set name more than once. The procedure S is used to define exactly the content of the set. Extra elements are eliminated from the set. In the following example, the execution of the FDL fragment terminates with one set called "MySet" which contains the job vw cp xx yy and this job is always going to be "INVALID".
S "MySet" {
    J vw cp aa bb
}
# At this point the set MySet contains "vw cp aa bb"

S "MySet" {
    J vw cp xx yy
}

# At this point the set MySet contains "vw cp xx yy". 
# The job vw cp aa bb is forgotten