Programming Guide



send

Sends data to a buffer for retrieval by the receive command

Synopsis

send [ bundle bundleName ] [ append ] data dataExpr[,...]

Arguments

bundle bundleName
Optionally names the buffer, or bundle, in which to store the send data, where bundleName can be a string constant or variable. Bundle names can be up to 31 characters long. By using names, you can maintain additional bundles of send data in memory. The number of available bundles (including the unnamed bundle) defaults to ten, but can be changed by setting the max_bundles property. For example, this command sends data to named bundle empData:
send BUNDLE "empData" DATA empno, dept, status

If an existing bundle is already named bundleName, Panther frees the existing bundle and replaces it with the new one. If the named bundle exceeds the number of allowable bundles, Panther removes the oldest bundle from memory.

If no name is supplied, Panther stores the data in an unnamed bundle–that is, a bundle whose name is an empty string. Panther uses the unnamed bundle for receive calls that specify no bundle name.

append
Optionally appends the send data to the specified or unnamed bundle.

data dataExpr
Specifies the data to send from this screen, where dataExpr can be a constant, JPL variable, or field expression. Refer to "Object Specification" in Application Development Guide for more information about valid field expressions. You can specify multiple data arguments delimited by commas.

If dataExpr is a non-subscripted array, send writes all its occurrences. You can specify a single occurrence or range of occurrences within an array by subscripting it with this format:

array[intExpr[..[intExpr]]]

where intExpr evaluates to an integer. If you omit the last occurrence specifier, send writes all occurrences from the one specified to the end of the array. The following examples show different subscripts that are valid:

send DATA @widget("empno")[1] //get only occurrence 1
send DATA empno[1..10] //get occurrences 1-10
send DATA empno[ct..] //get all occurrences from ct to end

Description

The send command writes screen data to a buffer that is accessible through the receive command. send can send one or more values from fields and array occurrences on a screen. It can also send constant values and JPL variables, as well as parts of arrays or the current occurrence of an array.

Panther writes the send data to a temporary buffer, or bundle, which you can optionally name. Panther by default maintains up to ten named and unnamed bundles; the number of available bundles can be changed by setting the max_bundles property. If you omit a bundle name, Panther writes the data to an unnamed bundle; this data is accessed by the next receive command that omits the bundleName argument or specifies it as the empty string.

The bundle retains no information about its data sources. receive gets data in the order as it was sent. For example, the following send statement sends to an unnamed bundle the value in credit_acctno, the value 1000, and all values in occurrences of the array credit. The receive command receives this data in the same order:

send DATA credit_acctno, 1000, credit
receive DATA acctno, amount, references

See Also

receive