I am trying to reshape variables from long to wide. I first tried:

. reshape wide i(pop_WDI_PW - ri_out_BZ) j(year)
option i() required

long wide
+---------------+ +------------------+
| i j a b | | i a1 a2 b1 b2 |
|---------------| <--- reshape ---> |------------------|
| 1 1 1 2 | | 1 1 3 2 4 |
| 1 2 3 4 | | 2 5 7 6 8 |
| 2 1 5 6 | +------------------+
| 2 2 7 8 |
+---------------+

long to wide: reshape wide a b, i(i) j(j) (j existing variable)
wide to long: reshape long a b, i(i) j(j) (j new variable)
r(198);

. dataex
input statement exceeds linesize limit. Try specifying fewer variables

and then when I tried to make a dataex I wss informed that there were too many variables so that I only selected one variable and still got the same error message:

. reshape wide, i(pop_WDI_PW) j(year)
invalid syntax
In the reshape command that you typed, you omitted the word wide or long, or substituted some other word for it. You should have typed

. reshape wide varlist, ...
or
. reshape long varlist, ...

You might have omitted varlist, too. The basic syntax of reshape is

long wide
+---------------+ +------------------+
| i j a b | | i a1 a2 b1 b2 |
|---------------| <--- reshape ---> |------------------|
| 1 1 1 2 | | 1 1 3 2 4 |
| 1 2 3 4 | | 2 5 7 6 8 |
| 2 1 5 6 | +------------------+
| 2 2 7 8 |
+---------------+

long to wide: reshape wide a b, i(i) j(j) (j existing variable)
wide to long: reshape long a b, i(i) j(j) (j new variable)
r(198);

. dataex
input statement exceeds linesize limit. Try specifying fewer variables
r(1000);

What am I doing wrong? Many thanks for any help.

Ric