I have a table that consists of the following columns: login, stu_id, stu_name,
and login2. I wanted to pass thruogh the table and update the login2 column
to be a concatenation of the substring of login with a substring of the stu_id
column. I used the following program with a display statement where the
update statement is currently to see if my idea would work. The program
compiled and ran as expected. I then replaced the display statement with the
update statement and promptly got the following error messages. I looked in
the 4gl Reference manual- volume 1 and found the example in Cursor Management.
My code looks the same I think. One thought I had might be the reserved word
LOG, but why did the previous incarnation compile and run? Any thoughts would
be appreciated. Thanks for your help.
database logins
main
define p_stu_login record like stu_logins.*,
temp_string char(10)
declare c1 cursor for select * from stu_logins
foreach c1 into p_stu_login.*
let temp_string = p_stu_login.login[1,5] clipped,
p_stu_login.stu_id[4,6]
udpate stu_logins
|_____________________^
|
| A grammatical error has been found on line 13, character 23.
| The construct is not understandable in its context.
| See error number -4373.
set login2 = temp_string
|_________________________________^
|
| A grammatical error has been found on line 14, character 35.
| The construct is not understandable in its context.
| See error number -4373.
where current of c1
|_______________________________________^
|
| A grammatical error has been found on line 15, character 41.
| The construct is not understandable in its context.
| See error number -4373.
end foreach
end main
-----------------------------------------------------------------------
Phillip Pascoe Bob Jones University
uunet!bjudev!ppascoe Greenville, SC
-----------------------------------------------------------------------