Hi all
i iva seen many discussion about the error SQL0312, but sincerely, i don't be able to undestand why i receive this error;
if i compile a program with this instruction :
......
D QCUSTCDT E DS Qualified Template
D MainDs DS Qualified
D CUSNUM_W Like(CUSNUM)
D LSTNAM_W Like(LSTNAM)
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
.....
ExEC SQL
FETCH NEXT FROM mainCursor INTO :MAINDS;
Dow SqlStt = '00000' and ySflNrrPag <=ySfl££SfPg;
pri_ScanRek();
....
receive the following error
Position 48 Variable MAINDS not defined or not usable.
If i change the field definition in the mainds in this way:
D QCUSTCDT E DS Qualified Template
D MainDs DS Qualified
D CUSNUM_W 6S 0
D LSTNAM_W 8
i compile with no error SQL0312
why happend this, and wich workaround if i want define my fields with like ??
i have to use this code in v5r4 and v6r1
thanks in adcance
i iva seen many discussion about the error SQL0312, but sincerely, i don't be able to undestand why i receive this error;
if i compile a program with this instruction :
......
D QCUSTCDT E DS Qualified Template
D MainDs DS Qualified
D CUSNUM_W Like(CUSNUM)
D LSTNAM_W Like(LSTNAM)
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
.....
ExEC SQL
FETCH NEXT FROM mainCursor INTO :MAINDS;
Dow SqlStt = '00000' and ySflNrrPag <=ySfl££SfPg;
pri_ScanRek();
....
receive the following error
Position 48 Variable MAINDS not defined or not usable.
If i change the field definition in the mainds in this way:
D QCUSTCDT E DS Qualified Template
D MainDs DS Qualified
D CUSNUM_W 6S 0
D LSTNAM_W 8
i compile with no error SQL0312
why happend this, and wich workaround if i want define my fields with like ??
i have to use this code in v5r4 and v6r1
thanks in adcance
Comment