pears.IQXNetDecodePostValue

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

CREATE FUNCTION "pears"."IQXNetDecodePostValue"( 
  /* Application Maintained Function / Procedure - DO NOT EDIT*/
  IN "pdata" CHAR(250) ) 
RETURNS CHAR(250)
BEGIN
  DECLARE "rv" CHAR(250);
  DECLARE "i" SMALLINT;
  DECLARE "l" SMALLINT;
  DECLARE "c" SMALLINT;
  DECLARE "s" CHAR(3);
  SET "rv" = '';
  SET "l" = "length"("pdata");
  SET "i" = 1;
  while "i" <= "l" loop
    SET "s" = "substr"("pdata","i",1);
    SET "i" = "i"+1;
    IF "s" = '+' THEN
      SET "s" = ' '
    ELSE IF "s" = '%' THEN
        SET "c" = "hextoint"("substr"("pdata","i",2));
        SET "i" = "i"+2;
        IF "c" = 194 THEN // utf-8 2 byte code
          SET "s" = ''
        ELSE
          SET "s" = "char"("c")
        END IF END IF END IF;
    SET "rv" = "rv"+"s"
  END loop;
  RETURN "rv"
END
  • database/functions/pears_iqxnetdecodepostvalue.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1