Everywhere Feature

 

Everywhere lets you test for values across every specified column or field, taking the place of AND logic. As with all AND logic, all conditions must be true.

 

"E" in your logic statement represents Everywhere.

 

Example 1 (Variable data): To test if a series of 3 questions have a value of Y. The responses are in variables Q2_1, Q2_2 and Q2_3:

 

Q2_1 E3 (Y)

 

 

Example 2 (ASCII data): To test if a series of 3 questions have a value of Y. The responses are in columns 35, 36 and 37 on record 1:

 

1/35 E3 (Y)

 

 

Example 3: You can use Everywhere across multiple fields:

 

1/35:3 E3 (122)

 

meaning, ‘starting on record 1, check columns 35-37, 38-40 and 41-43, all for value 122.’ To be included, there must be a 122 value in columns 35-37 AND 38-40 AND 41-43.

 

 

Example 4 (Variable data): You can use Everywhere for multiple values:

 

Q3A E3 (1,2)

 

meaning, ‘check variables Q3A AND Q3B AND Q3C for value 1 or value 2.’ To be included, there must be a 1 value or a 2 value in variables Q3A AND Q3B AND Q3C.

 

 

Example 5 (ASCII data): You can use Everywhere for multiple values:

 

1/35 E3 (1,2)

 

meaning, ‘starting on record 1, check columns 35 AND 36 AND 37 for value 1 or value 2.’ To be included, there must be a 1 value or a 2 value in columns 35 AND 36 AND 37.

 

You need only specify the first record number for fields or columns being scanned that start on one record and continue to another.

Using Skip (+) with Everywhere

 

Example 6 (ASCII data):

You can use Everywhere for positions or variables that are noncontiguous, but they must be separated by the same number of positions or fields to skip. You specify the number of positions or fields between each position to be tested, using the + symbol to indicate the number of positions to skip.

1/35 E3+2 (1)

meaning, “starting on record 1, check positions 35 and skip 2, three times, for value 1.” To be included, there must be a 1 value in position 35 AND 38 AND 41.

 

Example 7 (ASCII data):

The following example looks for multi-position fields:

1/21:3 E4+2 (23)

meaning, “starting in record 1, position 21, across four fields, skip two positions between fields (the fields being three positions wide) for the value 23.” The fields tested would be the positions 21-23, 26-28, 31-33 AND 36-38.

 

Example 8 (Variable data):

When the Skip feature is used with variable labels, it refers to positions rather than variable labels. Variables must be the same length. For example, to test the following “A” variables:

 

Variable label

Location:Width

Referring to

VAR1A

1/98:2

answer 1, brand 1

VAR1B

1/100:2

answer 1, brand 2

VAR2A

1/102:2

answer 2, brand 1

VAR2B

1/104:2

answer 2, brand 2

 

you would write:

VAR1A E2+2 (1)

meaning, “test the variable VAR1A on record 1, starting in position 98, across two fields, skip two between (the fields being two positions wide).” The fields tested would be the positions 98-99 and 102-103 (VAR1A and VAR2A).

Related topics:

Logic