Hi Rick, thank you for your response. I did not get an error response. I included Execute command but to no avail.
string reach (A7).
compute reach="".
vector #v=reach_1 to reach_7.
loop #i=1 to 7.
do if #i < 7.
if not(sysmis(#v(#i))) reach=concat(reach,string(#v(#i),F1),",").
else.
if not(sysmis(#v(#i))) reach=concat(reach,string(#v(#i),F1)).
end if.
end loop.
execute.
list reach_1 to reach_7 reach.
------------------------------
Irie Wila
------------------------------
Original Message:
Sent: Mon February 28, 2022 01:50 PM
From: Rick Marcantonio
Subject: Vectoring categorical
Yes, that must be it. I could/should have included an EXECUTE command. I used LIST, but then I used my own test data.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
Original Message:
Sent: Mon February 28, 2022 01:49 PM
From: Jon Peck
Subject: Vectoring categorical
Probably need an EXEC command to see the result.
--
Original Message:
Sent: 2/28/2022 1:48:00 PM
From: Rick Marcantonio
Subject: RE: Vectoring categorical
Hm. The reach_N variables look like numerics, with system-missing values. That's what I tested. My syntax should work. Did you get any error messages?
------------------------------
Rick Marcantonio
Quality Assurance
IBM
Original Message:
Sent: Mon February 28, 2022 01:45 PM
From: Irie Wila
Subject: Vectoring categorical
Hi Rick, thank you for replying, upon running these scripts reach dummy data seems to be empty.

------------------------------
Irie Wila
Original Message:
Sent: Mon February 28, 2022 10:05 AM
From: Rick Marcantonio
Subject: Vectoring categorical
My data for testing...
dataset close all.
data list free /reach_1 to reach_7 (7F1).
begin data.
1 0 1 0 5 0 4
0 9 9 9 5 4 6
0 0 0 0 1 2 3
0 1 2 1 8 0 9
0 0 1 0 0 4 1
end data.
recode all (0=sysmis).
****.
string reach (A7).
compute reach="".
vector #v=reach_1 to reach_7.
loop #i=1 to 7.
do if #i < 7.
if not(sysmis(#v(#i))) reach=concat(reach,string(#v(#i),F1),",").
else.
if not(sysmis(#v(#i))) reach=concat(reach,string(#v(#i),F1)).
end if.
end loop.
list.
****.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
Original Message:
Sent: Fri February 25, 2022 08:05 PM
From: Irie Wila
Subject: Vectoring categorical
Good morning, readers, mods. I'm quite stomped on my scripting on how combine categorical fields. So basically, I want to combine the value of reach_1 to 7 and store it to REACDUM field.

Thanks in advance. :)
------------------------------
Irie Wila
------------------------------
#SPSSStatistics