Dear Statalist,
I am trying to save the results of a short program I have written in a separate data set. For that I want the program to create a new data set and store several numbers (and strings). I thought this might be easily doable using the input command. However I am getting and error that I don't understand (see code examples below). Does someone have an idea what's going wrong here? Is there a different approach to my problem?
Produces the error:
unrecognized command: } invalid command name
And with:
I get the error:
unrecognized command: end
What's going on there?
I am trying to save the results of a short program I have written in a separate data set. For that I want the program to create a new data set and store several numbers (and strings). I thought this might be easily doable using the input command. However I am getting and error that I don't understand (see code examples below). Does someone have an idea what's going wrong here? Is there a different approach to my problem?
Code:
version 12 clear capture program drop test program define test if 1 { input number 3 end } end
unrecognized command: } invalid command name
And with:
Code:
capture program drop test program define test input number 3 end end
unrecognized command: end
What's going on there?
Comment