PDA

View Full Version : Autocode - Filemaintenance


snowdej
03-17-2010, 04:44 PM
Hi

I have tried (in vain) to create a file maintenance program and it never works, the SQL precompile fails saying

SQL0312 30 253 Position 10 Variable SINGLERECORD not defined or not usable.

The code snippet is shown here , D spec first

0029.00 d singleRecord e ds extname(CLIENTS)

The sub procedure.....

p LoadRecordsToArray...
p b
d pi

/free
BuildSQLStatement(RECORDDATA);
Exec SQL prepare alldata from :stmt;
if sqlstt<>STOP;
Exec SQL declare csr001 scroll cursor for alldata;
Exec SQL open csr001;
if post_Start<>0;
Exec sql fetch relative :post_Start from csr001 into :singleRecord;
endif;
Exec sql fetch next from csr001 into :singleRecord;
dow sqlcod=0 and count<post_Limit;
count+=1;
recordArray(count)=singleRecord;
Exec sql fetch next from csr001 into :singleRecord;
enddo;
endif;
return;
/end-free
p e


Any ideas?

sean.lanktree
03-17-2010, 05:40 PM
I assume that "CLIENTS" is the name of your file, correct? Does the environment that you logged in have an entry for the library in which the clients table exists?

snowdej
03-25-2010, 02:30 PM
Hi

Yes the file is called clients

The autocode works fine when creating a display only grid, just the autocode for a maintenance table.

I did create a unique key logical over it, the autocode (rightly) complains otherwise

Thanks

Julian

sean.lanktree
03-25-2010, 04:10 PM
What is the full Valence release number you are running? You can find this if you click "About" in the upper right hand corner of the portal.

snowdej
03-25-2010, 05:38 PM
Hi

The version is 2.1.20100304.0

Thanks

sean.lanktree
03-25-2010, 06:09 PM
I would first try the latest source and see if that solves your problem. If you have an active support pack...you should be able to download the update. Otherwise, download the entire install again as there was a later release just a couple of days ago.