Hello,
I created an autocode pgm using a SQL statement and the generation process duplicated the Where keyword. Please see code below. Thanks.
I created an autocode pgm using a SQL statement and the generation process duplicated the Where keyword. Please see code below. Thanks.
Code:
stmt= 'Select distinct wprod, idesc, iums, wwhs, wopb, wadj, wrct, '+ 'wiss From iwi join iim on wprod = iprod join codes on key4 = '+ 'wwhs join mrbomdp a on wprod = a.bmitm# join mrbomhp b on '+ 'a.bmpr# = b.bmpr# and a.bmver# = b.bmver# Where wid = ''WI'' '+ 'and iid = ''IM'' and b.bmact = 0 and key1 = ''PLANT'' and key2 '+ '= ''WHSES'' and key3 = ''OK'''; search=vvIn_char('search':toUpper); if search <> *blanks; stmt+= ' where upper(WPROD) like '+SQ+search+'%'+SQ+' or'+ ' upper(IDESC) like '+SQ+search+'%'+SQ+' or'+ ' upper(IUMS) like '+SQ+search+'%'+SQ+' or'+ ' upper(WWHS) like '+SQ+search+'%'+SQ; endif;
Comment