RE: What the heck does this mean?
- Posted by "Derek Parnell" <ddparnell at bigpond.com> Jan 30, 2004
- 366 views
> -----Original Message----- > > Jonas Temple wrote: > > > > > > Okay, I'm stumped. I've got the following routine: > > > > global function ecarc_rtvDataArea(sequence system_name, sequence > > data_area_lib, > > sequence data_area, > atom starting_pos, > > atom length, sequence > dtaara_def) > > > > sequence parm_str > > atom parm_length > > > > parm_length = length(dtaara_def) > > -- We'll need to form the BEGSTR sequence using the > parameter structure > > -- supplied to this routine > > parm_str = ecarc_makeStructure(QWCRDTAA_RtnVar & dtaara_def, > > "DTAARA_RcvVar") > > parm_str &= QWCRDTAA > > -- Call the retrieve data area API > > parm_str = ecarc_call(system_name, "*LIBL", "QWCRDTAA", > parm_str) > > -- If the parms returned is a sequence, return the 8th > parm for the > > length > > -- of the passed parm structure > > if sequence(parm_str) then > > return parm_str[8..(8 + parm_length - 1)] > > else > > return "" > > end if > > > > end function > > > > That when included in a program (a rather large proram), > generates the > > following error: > > > > C:\Program Files\F.R.O.G. for IBM iSeries DB2\eucarc.ew:1025 > > Syntax error - expected to see possibly 'end', not '(' > > parm_length = length(dtaara_def) > > ^ > > If I comment the line out it runs fine. > > > > HELP!!!!!!!!!!!!!!!1 > > > > > > Jonas > > > The problem is that one of the parameters is called 'length' and when you use "parm_length = length(dtaara_def)" Eu thinks that you are referring to the parameter and not the built-in function. Renaming this parameter fixes the problem. -- Derek