Previous Topic: Service RoutinesNext Topic: Returned String


Returned Data

Frequently, a service routine returns data on the stack. Each stack record generally has a number of data fields that delimiters separate. To permit the largest possible variation in data content, the convention is to use the first character of each stack record as the delimiter for parsing the remainder of the record.

Example: Data Parsing

The following REXX instruction pulls a record from the stack and loads the first character in the variable, d. This variable is then used to parse the remainder of the record, extracting w1, w2, and w3. The dummy variable (.) is specified to allow for the future addition of more fields.

parse pull 1 d +1 w1 (d) w2 (d) w3 (d) .