IBM Support

How can I pass a negative number into a macro as a parameter?

Question & Answer


Question

When I run this macro definition using positional token definitions I can't seem to pass a negative number into it: *****************. set mprint=on. data list free/ time. begin data. 0 1 2 end data. define vars4 (!pos !tok(1)/!pos !tok(1)/!pos !tok(1)/!pos !tok(1)). compute int=!1. compute bt=!2. compute bbde=!3. compute btxbde=!4. !enddefine. vars4 96 -.76 -5.4 1.9. **************************. I get this as a result: vars4 96 -.76 -5.4 1.9. 28 0 M> 29 0 M> . 30 0 M> compute int= 96. 31 0 M> compute bt= -. >Error # 4007 in column 1024. Text: (End of Command) >The expression is incomplete. Check for missing operands, invalid operators, >unmatched parentheses or excessive string length. >This command not executed. 32 0 M> compute bbde= .76. 33 0 M> compute btxbde= - 34 0 M> 5.4 1.9. >Error # 4010 in column 5. Text: 1.9 >The expression contained two operands not separated by an operator. Check the >expression for omitted or extra operands, operators, and parentheses. >This command not executed. What can I do?

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Historical Number

80373

Document Information

Modified date:
16 April 2020

UID

swg21482424