Sally,
thanks for your reply. i've tried you idea of assigning 'passed2'
before its passed to the function to a char3. by doing it this
way i have been able to trap for the ERROR -1207 i mentioned.
I dont know if you read my other post which says the value of the
serial column will NEVER EXCEED 999. Of course ,if it did a
FORMS -1207 error would stop the program.
so i have not been able to find out what causes the -1207
if my 'passed2' can not exceed 999.
any way it seems checking the STATUS when you enter the function
'some_function(' is too late ,the program has already stopped
>From: Sally Woolrich <Sally@excelsis.demon.co.uk>
<snip>
> DEFINE passed1 LIKE some_table.column1 ->> CHAR(12)
> passed2 LIKE other_table.column2 ->> SERIAL
>
> LET passed1 = "11"
> LET passed2 = 59
>
> CALL some_function(passed1,passed2)
>
> FUNCTION some_function(key_arg1,key_arg2)
> DEFINE key_arg1 LIKE some_table.column1,
> key_arg2 CHAR(3),
> loc_num INTEGER
>
<rest snipped>
<< 'passed2' will be (in effect) an integer, but 'key_arg2' is char(3).
<< Is this the cause of the problem? Have you tried defining a char(3)
<< in the top bit, and the 'LET char3 = passed2'?