02-12-2008
Blanks vs: Nulls
I'm relatively new to Pro*C programming. In the following example:
char name[21]; EXEC SQL SELECT 'John Doe' INTO :name FROM DUAL;
"John Doe" is in positions 0-7, blanks in 8-19, and a null in 20. I would really prefer the null to be in position 8 and I don't care what's after that. I wrote a trim function to do that. If I forget to trim and insert the data into an Oracle table, it creates problems.
Is there a better technique?
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I just had a filesystem / file corruption issue on my HSP's server due to disk capacity limits and fileswapping. I discovered that certain files got corrupted when fileswapping was not successful and they ended up with a string of control characters, or what I believe to be nulls, in them.
Does... (4 Replies)
Discussion started by: Dr. DOT
4 Replies
2. Shell Programming and Scripting
Hi,
I am trying to replace nulls with spaces in every record of a '|' delimited file. I used this command -
cat input.dat | sed 's/||/| |/g' > output
But if a space appears twice '| | |' , then only the first null is getting replaced with a space. The second one remains as a null. I... (7 Replies)
Discussion started by: novice1324
7 Replies
3. Shell Programming and Scripting
When I try to sort a file where some records contain nulls i.e. hex 00 the sort truncates the record when it reaches the null and writes message:
"sort: warning: missing NEWLINE added at end of input file myfile"
I'm assuming from this that the sort sees the null as a special character and... (6 Replies)
Discussion started by: ArthurWaik
6 Replies
4. Shell Programming and Scripting
Hello,
I am checking the length of each line of a fixed length file and making sure all lines are 161 length. My problem is that some files contain null characters which gets stripped out of my echo. How do I have the NULLs included in my check? (and I cannot replace or sub the NULL values with... (10 Replies)
Discussion started by: ironmix
10 Replies
5. Shell Programming and Scripting
Hi,
i have a file which contains data in fixed length. each row contains data of 10 characters fixed length. The data in the file appears like 4567782882
some times i may recieve dat less than fixed length of 10. in such a case i find nulls appended at the trailing spaces when i do a... (2 Replies)
Discussion started by: meeragiri
2 Replies
6. Red Hat
I am trying to count the number of columns in a delimited flat file. The record is tab delimited. When I use the command wc -w, I am getting unexpected results when the record contains a NULL value. I believe it is because there is a "word" missing.
The below example will return 4 words... (2 Replies)
Discussion started by: nmalencia
2 Replies
7. Shell Programming and Scripting
Ok,
I'm stuck here with a plan to get what I need done completed.
I want to use perl to produce a document. lets say the document will be a pdf document.
Now, is there a way for me to put a tiny little code in that pdf document that can make the pdf file null itself if run on a non-unix... (2 Replies)
Discussion started by: SkySmart
2 Replies
8. Shell Programming and Scripting
Hi,
I've a PIPE delimited file with about 5 fields. Sometimes the records in the 4th field is null, so I want to replace it based on values we get it on 2nd field in the same file.
Following is an example.
ABCD|X-TYPE 3.0|2010|X-TYPE|20000
CDEF|C-TYPE 2.5|2011|C-TYPE|10000
XYZ|LX... (4 Replies)
Discussion started by: rudoraj
4 Replies
9. UNIX for Beginners Questions & Answers
I want to remove from a file the trailing null characters (0x00) and stop doing so when a different byte is found (which should not be deleted), and either put the result to the same file or a different one.
Any ideas? (9 Replies)
Discussion started by: Tribe
9 Replies
LEARN ABOUT DEBIAN
biber::input::file::bibtex
Biber::Input::file::bibtex(3pm) User Contributed Perl Documentation Biber::Input::file::bibtex(3pm)
init_cache
Invalidate the T::B object cache. Used only in tests when e.g. we change the encoding
settings and therefore must force a re-read of the data
TBSIG
Signal handler to catch fatal Text::BibTex SEGFAULTS. It has bugs
and we want to say at least something if it coredumps
extract_entries
Main data extraction routine.
Accepts a data source identifier, preprocesses the file and then
looks for the passed keys, creating entries when it finds them and
passes out an array of keys it didn't find.
create_entry
Create a Biber::Entry object from a Text::BibTeX object
cache_data
Caches file data into T::B objects indexed by the original
datasource key, decoded into UTF8
preprocess_file
Convert file to UTF-8 and potentially decode LaTeX macros to UTF-8
parsename
Given a name string, this function returns a Biber::Entry::Name object
with all parts of the name resolved according to the BibTeX conventions.
parsename('John Doe')
returns an object which internally looks a bit like this:
{ firstname => 'John',
firstname_i => ['J'],
lastname => 'Doe',
lastname_i => ['D'],
prefix => undef,
prefix_i => undef,
suffix => undef,
suffix_i => undef,
namestring => 'Doe, John',
nameinitstring => 'Doe_J',
strip => {'firstname' => 0,
'lastname' => 0,
'prefix' => 0,
'suffix' => 0}
}
NAME
Biber::Input::file::bibtex - look in a BibTeX file for an entry and create it if found
DESCRIPTION
Provides the extract_entries() method to get entries from a BibTeX data source and instantiate Biber::Entry objects for what it finds
AUTHOR
Francois Charette, "<firmicus at ankabut.net>" Philip Kime "<philip at kime.org.uk>"
BUGS
Please report any bugs or feature requests on our sourceforge tracker at <https://sourceforge.net/tracker2/?func=browse&group_id=228270>.
COPYRIGHT & LICENSE
Copyright 2009-2012 Francois Charette and Philip Kime, all rights reserved.
This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
perl v5.14.2 2012-06-17 Biber::Input::file::bibtex(3pm)