In order to handle a potentially large number of records, the Count and Skip clauses let you control how many records will go to the Output.
['['Count = <NumericExpression>']' ] [ '['Skip = <NumericExpression>']']
View Syntax conventions
Where:
Count
Determines the number of records that will go to the output. If Count takes the value 0 or less, it means no limit.
NumericExpression
Specifies the number of records in each block.
Skip
Determines the number of records omitted from the output. Skip takes positive values. If negative values are assigned, you may get an exception, which you will have to handle with error_handler.
The following will skip the first 100 customers and Output the next 20.
Customers
{
Customer [Count = 20] [Skip = 100]
{
Code = CustomerId
Name = CustomerName
}
}
This is the clause used to handle all the paging, for example:
parm(&PageNumber, &PageSize)
Customers
{
Customer [Count = &PageSize] [Skip = (&PageNumber - 1) * &PageSize]
{
Code = CustomerId
Name = CustomerName
}
}
This will handle any number of page lines and any page size.