Re: help with hex print

From: Richard Kuhler <noone_at_nowhere.com>
Date: Wed, 02 Jul 2003 07:01:31 GMT
Message-ID: <frvMa.64785$98.2242434_at_twister.socal.rr.com>


marbo wrote:
>
> Hi all,
> part of my procedure should generate random number, convert it to hex nad
> put it into table and text file
> I've tried to do it in two ways. (sample of code listed below). Both works
> if I try to select from dual table, but when I've put them into Oracle Forms
> my problems hve started:
> 1) i := rawtohex(abs(dbms_random.random()));
> do not waht to even compile
> 2) i := to_char(abs(dbms_random.random()),'FM0XXXXXXX');
> seem to work but in output text file generated via text_io procedures
> instead of hex number I've got # signs
>
> Does anybody any idea where is my mistake?
>
> marbo
>
> ----
> sample of code. It will not work, becuse I had to cut it (was much to long)
> byt maybe it will give you idea . . .
>
> i varchar2(500);
> BEGIN
>
> TEXT_IO.IS_OPEN(file_id)
> dbms_random.initialize(19254);
>
> -- 1:
> -- i := rawtohex(abs(dbms_random.random()));
> -- 2:
> --i := to_char(abs(dbms_random.random()),'FM0XXXXXXX');
> -- I try to pirnt i in 1 or 2 way - both do not work
>
> TEXT_IO.Put_Line(file_id, i);
> dbms_random.terminate;
> TEXT_IO.FCLOSE(file_id);
>
> END;
Worked just fine for me. Received on Wed Jul 02 2003 - 09:01:31 CEST

Original text of this message