Home » Developer & Programmer » Forms » Text_IO.get_line returning NULL instead of page eject (^L) character
Text_IO.get_line returning NULL instead of page eject (^L) character [message #159298] Fri, 17 February 2006 04:09 Go to next message
avjosh
Messages: 2
Registered: February 2006
Junior Member
Hi Everybody,

I have written a form module, which will split a character mode report text file to be able to print the report from desired page onwards. I am using Text_IO package to read the original file and to generate new file with contents from desired page onwards.

The problem is that, Get_line is returning null in place of a page eject character (^L), resulting in incorrect pagination.

Is there a way to trap control characters from source file ?
Please help

warm regards

[Updated on: Mon, 06 March 2006 21:47] by Moderator

Report message to a moderator

Re: Text_IO.get_line returning NULL instead of page eject (^L) character [message #159473 is a reply to message #159298] Sun, 19 February 2006 23:55 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Do you know that the "page eject character (^L)" exists in your file?

David
Re: Text_IO.get_line returning NULL instead of page eject (^L) character [message #160071 is a reply to message #159473] Thu, 23 February 2006 01:14 Go to previous messageGo to next message
avjosh
Messages: 2
Registered: February 2006
Junior Member
Hi Everybody

I have found the reason for ^L character being ignored.

I wrote the procedure to read the text file line by line and insert it into a temporary table with a varchar2(300) column.

When I temporarily changed this procedure to return the line read using get_line as an out parameter, it returned the ^L character correctly, which could be identified by displaying it's ASCII value(12).

But still if I try to insert the line as it is into the table, the row results in a null string. Though now I managed to handle the situation by trapping this ^L char at procedure level & insert required no.of blank lines, my doubt is

DOES THIS MEAN THAT A VARCHAR2 VARIABLE & A VARCHAR2 COLUMN HAVE DIFFERENT DATA STORAGE CAPABILITIES?

DOES THIS MEAN THAT VARCHAR2 VARIABLE CAN HOLD A NON-PRINTING CONTROL CHAR BUT VARCHAR2 COLUMN WILL REPLACE THIS COLUMN WITH A NULL STRING?

Hope someone will be able to give some satisfactory reason. I have gone thru Oracle help on CREATE TABLE column definition, but could not find mention of any such issue.

with warm regards
Re: Text_IO.get_line returning NULL instead of page eject (^L) character [message #160470 is a reply to message #160071] Sun, 26 February 2006 16:30 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
@others: Has anyone played with this Ctrl-L issue to confirm or refute it?

David
Previous Topic: EXE file or any such similar things possible ?
Next Topic: form with no heading
Goto Forum:
  


Current Time: Fri Sep 20 06:56:50 CDT 2024