IBM Support

Using the COUNT command within a LOOP command

Troubleshooting


Problem

First, using a VECTOR as the target of the COUNT command does not work. Example. VECTOR v(10). COUNT v(1) = var1 TO var10 (2). will return the error: >Error # 4570 in column 8. Text: ( >On the COUNT command, the count variable was not followed by the required >equals sign. >Execution of this command stops. You can however use variable substitution (I.e. DO REPEAT) for the target. You also can't use any form of variable for the value list. Example: COMPUTE ValueToCount = 1. COUNT newvar = var1 TO var10 (ValueToCount). as this returns the error: >Error # 4772 in column 19. Text: ValueToCount >On the COUNT command, the parenthesized value list is syntactically invalid. >Execution of this command stops. This prevents use of a variable to define the value to be counted.

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF014","label":"iOS"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"18.0","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

90649

Document Information

Modified date:
16 June 2018

UID

swg21489604