Chapter Contents

Previous

Next
QUEUE_PARMTYPE

QUEUE_PARMTYPE



Define parameters and explicitly state their type (char or numeric).


Syntax
QUEUE_PARMTYPE Example

Syntax

CALL QUEUE_PARMTYPE(queueId, rc, parm1Type, parm1 <, (parm2Type, parm2) , ...,
(parm4Type, parm4)>);

Where... Is type... And represents...
queueId N queue identifier
rc N return code
parm1Type C parameter type
parm1 N or C parameter value

QUEUE_PARMTYPE defines parameters to send to a specific queue so that they can be sent when the QUEUE_SEND CALL routine is invoked. It takes a parameter-type flag so that the type of parameter may be explicitly set.

If QUEUE_SETPARM is called from within a macro, there is no way to send a numeric value as a string. For example, the macro variable set to 123 could never be sent as a string because QUEUE_SETPARM will view it as a numeric. For this reason, QUEUE_PARMTYPE allows the user to explicitly set the parameter type. So in the above example, the parameter flag could be set to C and the parameter value of 123 would be converted to a string by QUEUE_PARMTYPE.

The queueId parameter identifies the queue.

If an error occurs, rc is updated and returned as a non-zero value. Use the SYSMSG() function to print the message that is associated with the non-zero rc.

The parm1Type parameter indicates the parameter type. It must have a value of C if the parameter is character or a value of N if the parameter is numeric.

The parm1 parameter is the actual parameter value. The parameters are sent when the QUEUE_SEND CALL routine is invoked. Parameters may be numeric or character and may appear in any order.

The parameter type and the parameter value must be specified as a pair that has the type preceding the value. A minimum of one pair (parameter type followed by parameter value) up to the maximum of four pairs may be specified. This routine may be called multiple times if more than four parameters need to be defined in this manner.


QUEUE_PARMTYPE Example

This example defines four parameters to the queue that is identified by queueId. In this example, the year passes in a parameter type of C. This causes QUEUE_PARMTYPE to convert the numeric into a string and send it as a character parameter.

ctype = "C";
ntype = "N";
name = "John Doe";
age = 35;
company = "SAS";
year = 1996;
call queue_parmtype(queueId, rc, 
                    ctype, name, 
                    ntype, age,
                    ctype, company, 
                    ctype, year);


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.