Hi all

I want to write a DBPROC which compares the chars of a string.
If there is one char, which isn't allowed, it has to be replaced by a valid char into that string.


But I don't know in how far the functionality is developed in dbproc's .
Maybe the DBPROC could have the following form :


create dbproc prog_one (IN input char(50), OUT outstr char(50)) AS
VAR fstr char(80);
i int ;
j int ;
schalter int ;
SET i = 0;
SET j = 0;
SET Schalter = 0;
SET fstr = "�����������������������������������������������������������";
while (i < len(input)) do
begin
SET Schalter = 0;
while (j < len(fstr) and Schalter != 1) do
begin
if ( input(i) = fstr(j) and j < 15 )
then
SET outstr(i) = 'A' ;
SET Schalter = 1;


                          else if ( input(i) = fstr(j) and j < 17 )
                          then
                                  SET outstr(i) = 'C' ;
                                             SET Schalter = 1;
                                                                   ... <shorted> ...

                          else
                                  SET outstr(i) = input(i) ;
                                  SET j = j + 1; end
              SET i = i + 1;
  end

But, I guess, there is no len() - function of variables, so how could I solve such a problem with the dbproc Syntax?
And is there an overview of dbprog functionalities ? (maybe some functions like strcomp(), len(), 'char IN string' ... )?


Best regards,
Danny


-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to