<http://schema.org/articleBody>
"Gad, I find that I enjoy solving unique problems, so here is a pure SQL function which should take care of your formatting. CREATE FUNCTION YOURLIB.REVERSEHEB ( INSTR VARCHAR(4000)) RETURNS VARCHAR(4000) LANGUAGE SQL DETERMINISTIC CONTAINS SQL RETURNS NULL ON NULL INPUT NO EXTERNAL ACTION SET OPTION DBGVIEW = *SOURCE BEGIN ATOMIC DECLARE CHARSTR, NBRSTR, HLDSTR, REVSTR VARCHAR(4000) DEFAULT ''; DECLARE LEN INT DEFAULT 0; SET(CHARSTR, NBRSTR, LEN) = (TRIM(INSTR), TRANSLATE(TRIM(INSTR), X'41', X'404A4B4C4D4E4..."^^<http://www.w3.org/2001/XMLSchema#string>
<http://archive.midrange.com/midrange-l/201401/msg00043.html>