RETURNING
Posted in 2004
--0-205039779-1081095853=:79581 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I am conducting Unit Test on a function that is supposed to fetch a record from a table and return it. The function accepts an integer as input, which is checked against a column that is of data type SERIAL. My code is able to do this, of course simple, task nicely. I have a MAIN function to CALL this function and capture the record. Code in MAIN goes as... DEFINE SQLStatus INTEGER DEFINE Capture RECORD LIKE table.* CALL func (parameter) RETURNING SQLStatus, Capture.* DISPLAY statements are written to confirm the captured values, among which some members are not getting DISPLAYed. The function's functionality is later found to be proper, which is proved by putting the same DISPLAY statements inside its definition. I cannot proceed since DISPLAY statements are not allowed in an API. I do not possess DeBugger licence. Could someone please assess the intricacy. Regards --------------------------------- WIN FREE WORLDWIDE FLIGHTS - nominate a cafe in the Yahoo! Mail Internet Cafe Awards --0-205039779-1081095853=:79581 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <DIV>Hello,</DIV> <DIV> </DIV> <DIV>I am conducting Unit Test on a function that is supposed to fetch a record from a table and return it. The function accepts an integer as input, which is checked against a column that is of data type SERIAL.</DIV> <DIV> </DIV> <DIV>My code is able to do this, of course simple, task nicely.</DIV> <DIV> </DIV> <DIV>I have a MAIN function to CALL this function and capture the record.</DIV> <DIV> </DIV> <DIV>Code in MAIN goes as...</DIV> <DIV> </DIV> <DIV><FONT color=#ff7f00>DEFINE SQLStatus INTEGER<BR>DEFINE Capture RECORD LIKE table.*<BR></FONT></DIV> <DIV> </DIV> <DIV><FONT color=#0000ff>CALL func (parameter)</FONT></DIV> <DIV><FONT color=#0000ff>RETURNING SQLStatus, Capture.*</FONT></DIV> <DIV><FONT color=#0000ff></FONT> </DIV> <DIV>DISPLAY statements are written to confirm the captured values, among which some members are not getting DISPLAYed.</DIV> <DIV> </DIV> <DIV>The function's functionality is later found to be proper, which is proved by putting the same DISPLAY statements inside its definition. I cannot proceed since DISPLAY statements are not allowed in an API.</DIV> <DIV> </DIV> <DIV>I do not possess DeBugger licence. Could someone please assess the intricacy.</DIV> <DIV> </DIV> <DIV>Regards</DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV><p> <hr size=1> <font size="2" face="Arial, Helvetica, sans-serif"><strong>WIN FREE WORLDWIDE FLIGHTS</strong> - nominate a cafe in the <a href="http://www.yahoo.co.uk/internetcafes">Yahoo! Mail Internet Cafe Awards</a></font> --0-205039779-1081095853=:79581-- sending to informix-list