SQLCODE 12 is not an error but a warning and means correlation names for the
same columns within the same tables should be used.
Just try to modify your UPDATE statement as follows:
update LIb/file1 a set var =
(select var1 from lib/file2 b
where a.field1 = b.field2)
where exists(select * Lib/file2 c where a.field1=c.field2);
In former releases sometimes warnings were not sent out.
That's why you never should check for SQLCODE <> *ZEROS (or SQLCODE =
*Zeros) but always SQLCODE < *Zeros (=Error) andr SQLCODE = 100 (Last
Mit freundlichen Grüßen / Best regards
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Billy Waters
Gesendet: Saturday, 29.3 2014 14:27
Betreff: SQLCOD 12
update LIb/file1 set var =
(select var1 from lib/file2
where field1 = field2)
where exists(select * Lib/file2 where field1=field2);
RSTNG = 'UPDATE STATUS: ' + SQLSTATE;
If SQLCOD <> 0;
*INU1 = *on;
Take necessary actions in CL if INU1 is off or on.
If I call from command line:
UPDATE STATUS: 00000 (SQLSTAT)
Zero Records: 0
Off (State of INU1) check doe SQLCOD <> 0
If I start from MSSQL stored procedure
UPDATE STATUS: 01545
Zero Records: 0
update is successful
Different user ids when calling from command line vs from MSSQL.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l