Loop Functions

Read(3346) Label: loop operation,

  esProc offers loop functions that perform loop operations.

Ø  A.(x,…)

Compute an expression with each member of a sequence, and return the results

Ø  A.avg()

Compute x with each member of the sequence and then compute the average of members of the new sequence

Ø  A.calc()

Compute an expression with one or more specified records and return the results

Ø  A.cand()

Perform logical AND operation over members of a sequence

Ø  A.conj()

Compute concatenation of all sequence-type members

Ø  A.contain()

Check whether a given data object is a member of a certain sequence

Ø  A.cor()

Perform logical OR operation over members of a sequence

Ø  A.count()

Count the number of members of a sequence

Ø  A.cumulate()

Compute sum of members of a sequence

Ø  A.diff()

Compute difference between sequence-type members of the new sequence

Ø  A.find(k)

Find a record according to its primary key value

Ø  A.icount()

Count the number of distinct members in a sequence

Ø  A.ifn()

Get the first non-null member in a sequence

Ø  A.isect()

Compute intersection of the sequence-type members of a sequence

Ø  A.iterate()

Perform interative loop on a record sequence and return the result of the last calculation of a given expression

Ø  A.max()

Find the maximum value among members of a sequence

Ø  A.maxp()

Return the member that makes the maximum value for the expression

Ø  A.median(k:n)

Divide a sequence into multiple segments and return the specified bordering member(s)

Ø  A.min()

Find the minimum value among members of a sequence

Ø  A.minp()

Return the member that makes the minimum value of the expression

Ø  A.mode()

Get the most frequently appearing member from a sequence

Ø  A.nvl()

Get the first non-null and non-empty-string member from a sequence

Ø  A.pfind()

Find the ordinal number of a record by its primary key

Ø  A.pmax()

Return the ordinal numbers of members with the maximum value in a sequence

Ø  A.pmin()

Return the ordinal numbers of members with the minimum value in a sequence

Ø  A.pos(x,k)

Get the position of a member in a sequence

Ø  A.pos(x)

Get positions of members of a sequence in another sequence

Ø  A.proportion()

Compute the proportion of each member of a sequence

Ø  A.pseg(x,y)

Return the ordinal number of the interval in which the parameter falls

Ø  A.pselect()

Return the ordinal numbers of members that satisfy the query criterion

Ø  A.psort()

Return the ordinal numbers of the sorted members in the original sequence

Ø  A.ptop()

Compute the specified expression(s) over each member of a sequence, sort the result members, and return ordinal numbers of the first n members in the original sequence

Ø  A.rank(y,x)

Get the ranking of a specified value among members a sequence

Ø  A.ranks(x)

Get rankings of members of a sequence

Ø  A.run(x1,x2,xi)

Compute one or more expressions with each member in a sequence and return the modified sequence

Ø  A.segp()

Return the member in a sequence corresponding to a certain interval number

Ø  A.select()

Return members that make the value of the expression true

Ø  A.sort()

Generate a new sequence by sorting the members of a sequence

Ø  A.sum()

Compute sum of members of a sequence

Ø  A.top()

Compute an expression over each member of a sequence and return a sequence consisting of the first n members or values

Ø  A.union()

Compute the union of all sequence-type members in a sequence

Ø  A.xunion()

Generate a new sequence by uniting and rearranging distinct members in each of a sequence’s sub-sequences

Ø  cum()

An iterative loop to get a cumulative value over records in which one of its fields has same values

Ø  get(level,F;a:b)

Get information about base members at a superior level in a multilayer loop function

Ø  iterate()

An iterative loop for calculating an expression

Ø  k.r(T.F)

Find a certain field of a specified row in a table sequence/in-memory table

Ø  k.row() 

Find one or more records according to specified key value(s)

Ø  n.f(x)

Perform a loop operation by declaring an integer loop variable

Ø  r.(x,…)

Compute expressions over a certain record and return result the last expression

Ø  r.run()

Compute an expression based on a record and return the modified record

Ø  rank()

An iterative loop for numbering records according to the values of certain fields

Ø  ranki()

An iterative loop for numbering records according to the values of certain fields

Ø  seq()

An iterative loop for numbering records in which a certain field contains same values

Ø  ~,#,F,A[i]...

Introduce the common rules of expressions in a loop function