@rhilty: As I mentioned the other day, we'd have to see your actual data in order to give you better advice.
However, I wanted to see if the macro needed any changes in order to work with the number of variables your log indicated you were actually trying to untranspose.
One thing that stood out was that your log indicated that you only had 29 PLBS variables for each child, rather than 30. Was that an oversight on your part, or do you actually only have 29.
Regardless, I put together a test dataset in order to see if the macro did indeed have a limitation that we hadn't considered. And, yes, it did have a limitation, but that has since been corrected. You can download the updated version of the file at: https://github.com/art297/untranspose
Also, you'll have to include an options statement before running the macro, namely:
options NOQUOTELENMAX;
However, if your actual file has even more variables than shown in your log, they would have to be dropped in the data parameter (e.g., data=SG.NonSPKv2 (drop=x y z),
And, you don't have to specify the libname_in and libname_out parameters since you use two-level file names in your data and out parameters.
Finally, you don't have to spell out the 29 or 30 PLBS and SCBE variables, since the macro will accept variable lists.
Here is the code I ran to both create and untranspose the test dataset I created:
libname SG '/folders/myfolders';
data SG.NonSPKv2;
informat classroom_id $5.;
informat child1_dateenrolled
child2_dateenrolled
child3_dateenrolled
child4_dateenrolled
child5_dateenrolled
child1_datedisenrolled
child2_datedisenrolled
child3_datedisenrolled
child4_datedisenrolled
child5_datedisenrolled mmddyy10.;
format child1_dateenrolled
child2_dateenrolled
child3_dateenrolled
child4_dateenrolled
child5_dateenrolled
child1_datedisenrolled
child2_datedisenrolled
child3_datedisenrolled
child4_datedisenrolled
child5_datedisenrolled mmddyy10.;
informat child1_name
child2_name
child3_name
child4_name
child5_name$20.;
infile cards truncover;
input classroom_id
program_id
child1_CCAP
child1_datedisenrolled
child1_dateenrolled
child1_daysperweek
child1_english
child1_enrolled
child1_hoursperweek
child1_id
child1_Kknown
child1_Kname
child1_liveswithyou
child1_name
child1_newteacher
child1_notattendingK
child1_otherlanguage
child1_otherlanguage_specify
child1_PLBS1-child1_PLBS30
child1_related
child1_relationship
child1_SCBE1-child1_SCBE30
child1_spanish
child2_CCAP
child2_datedisenrolled
child2_dateenrolled
child2_daysperweek
child2_english
child2_enrolled
child2_hoursperweek
child2_id
child2_Kknown
child2_Kname
child2_liveswithyou
child2_name
child2_newteacher
child2_notattendingK
child2_otherlanguage
child2_otherlanguage_specify
child2_PLBS1-child2_PLBS30
child2_related
child2_relationship
child2_SCBE1-child2_SCBE30
child2_spanish
child3_CCAP
child3_datedisenrolled
child3_dateenrolled
child3_daysperweek
child3_english
child3_enrolled
child3_hoursperweek
child3_id
child3_Kknown
child3_Kname
child3_liveswithyou
child3_name
child3_newteacher
child3_notattendingK
child3_otherlanguage
child3_otherlanguage_specify
child3_PLBS1-child3_PLBS30
child3_related
child3_relationship
child3_SCBE1-child3_SCBE30
child3_spanish
child4_CCAP
child4_datedisenrolled
child4_dateenrolled
child4_daysperweek
child4_english
child4_enrolled
child4_hoursperweek
child4_id
child4_Kknown
child4_Kname
child4_liveswithyou
child4_name
child4_newteacher
child4_notattendingK
child4_otherlanguage
child4_otherlanguage_specify
child4_PLBS1-child4_PLBS30
child4_related
child4_relationship
child4_SCBE1-child4_SCBE30
child4_spanish
child5_CCAP
child5_datedisenrolled
child5_dateenrolled
child5_daysperweek
child5_english
child5_enrolled
child5_hoursperweek
child5_id
child5_Kknown
child5_Kname
child5_liveswithyou
child5_name
child5_newteacher
child5_notattendingK
child5_otherlanguage
child5_otherlanguage_specify
child5_PLBS1-child5_PLBS30
child5_related
child5_relationship
child5_SCBE1-child5_SCBE30
child5_spanish
;
cards;
10-01 10 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1
11-01 10 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1
12-01 10 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 0 10/1/2016 10/2/2016 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1
;
options NOQUOTELENMAX;
%untranspose(data=SG.NonSPKv2, out=SG.NonSPKv3,
by=classroom_id program_id,
id=childnumber,
var=
CCAP
datedisenrolled
dateenrolled
daysperweek
english
enrolled
hoursperweek
id
Kknown
Kname
liveswithyou
name
newteacher
notattendingK
otherlanguage
otherlanguage_specify
PLBS1-PLBS30
related
relationship
SCBE1-SCBE30
spanish,
prefix=child, var_first=no, delimiter=_)
Let me know if that solves your problem.
Art
... View more