Hi, i was reading thread 3682 about using data areas in free, but they are type char and i have a decimal (6, 0) one:
Type . . . . . . . . . : *DEC
Length . . . . . . . : 6 0
When i read it, i get an error that i am trying to redefine it as a char instead of a decimal. Here's the code:
This is the error i get:
The type or length of the data area PRODUCTEST/NUMTRAA
does not match with the defined data area in the program.
Cause . . . . . : You have defined the data area as type char and length 1. The real data area
PRODUCTEST/NUMTRAA is of type *DEC and legth (6 0).
What i am doing wrong? I don't want to use C style DEFINE codes and such.
Type . . . . . . . . . : *DEC
Length . . . . . . . : 6 0
When i read it, i get an error that i am trying to redefine it as a char instead of a decimal. Here's the code:
Code:
DNUMTRA DS DTAARA('NUMTRAA') DNUMERO 1 6 0 /free IN *LOCK NUMTRA; NUMERO=NUMERO+1; OUT NUMTRA; /end-free
The type or length of the data area PRODUCTEST/NUMTRAA
does not match with the defined data area in the program.
Cause . . . . . : You have defined the data area as type char and length 1. The real data area
PRODUCTEST/NUMTRAA is of type *DEC and legth (6 0).
What i am doing wrong? I don't want to use C style DEFINE codes and such.
Comment