**RANGE( ***setofdatasets, setofintegers*
**[, UNORDERED | ORDERED(** *bool
***) ] [, STABLE | UNSTABLE ] [, PARALLEL [
(** *numthreads ***) ] ] [,
ALGORITHM(** *name ***) ]
)**

setofdatasets | A set of datasets. |

setofintegers | A set of integers. |

UNORDERED | Optional. Specifies the output record order is not significant. |

ORDERED | Specifies the significance of the output record order. |

bool | When False, specifies the output record order is not significant. When True, specifies the default output record order. |

STABLE | Optional. Specifies the input record order is significant. |

UNSTABLE | Optional. Specifies the input record order is not significant. |

PARALLEL | Optional. Try to evaluate this activity in parallel. |

numthreads | Optional. Try to evaluate this activity using
numthreads threads. |

ALGORITHM | Optional. Override the algorithm used for this activity. |

name | The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. |

Return: | RANGE returns a set of datasets. |

The **RANGE **function extracts a subset
of the *setofdatasets* as a SET. The
*setofintegers* specifies which elements of the
*setofdatasets* comprise the resulting SET of datasets.
This is typically used in the GRAPH function.

Example:

```
r := {STRING1 Letter};
ds1 := DATASET([{'A'},{'B'},{'C'},{'D'},{'E'}],r);
ds2 := DATASET([{'F'},{'G'},{'H'},{'I'},{'J'}],r);
ds3 := DATASET([{'K'},{'L'},{'M'},{'N'},{'O'}],r);
ds4 := DATASET([{'P'},{'Q'},{'R'},{'S'},{'T'}],r);
ds5 := DATASET([{'U'},{'V'},{'W'},{'X'},{'Y'}],r);
SetDS := [ds1,ds2,ds3,ds4,ds5];
outDS := RANGE(setDS,[1,3]);
//use only 1st and 3rd elements
OUTPUT(outDS[1]); //results in A,B,C,D,E
OUTPUT(outDS[2]); //results in K,L,M,N,O
```

See Also: GRAPH