%{---------------------------------------------------------%} %{ NDUPDATE - Retrieve/update single record %} %{ %} %{ Craig Pelkie %} %{ Bits & Bytes Programming, Inc. %} %{ craig@web400.com %} %{ Copyright (c) 2001, Craig Pelkie %} %{ ALL RIGHTS RESERVED %} %{---------------------------------------------------------%} %{---------------------------------------------------------%} %{ Section A: Defines for macro %} %{---------------------------------------------------------%} %define { DATABASE = "*LOCAL" DTW_DEFAULT_REPORT = "NO" SHOWSQL = "YES" %} %{---------------------------------------------------------%} %{ Section B: SQL function updateCusrec %} %{---------------------------------------------------------%} %function(dtw_sql) updateCusrec (IN CUSNUM, IN INIT, IN LSTNAM, IN STREET, IN CITY, IN STATE, IN ZIPCOD) { update qgpl.qcustcdt set INIT = '@dtw_raddquote($(INIT))', LSTNAM = '@dtw_raddquote($(LSTNAM))', STREET = '@dtw_raddquote($(STREET))', CITY = '@dtw_raddquote($(CITY))', STATE = '@dtw_raddquote($(STATE))', ZIPCOD = $(ZIPCOD) where CUSNUM = $(CUSNUM) %} %{---------------------------------------------------------%} %{ Section C: SQL function getCusrec %} %{---------------------------------------------------------%} %function (DTW_SQL) getCusrec (IN pmCusnum) { select * from qiws.qcustcdt where cusnum = $(pmCusnum) %report{ %row{