Re: NULLS & ACE
Posted in 2000
Topics: General Discussion
From: Daryl Craig-Elliot <daryl@tcrs.freeserve.co.uk> > >Hello to all. > >This is my first posting to this group so... a little message for >Obnoxio (if you're reading) "Please be nice". No. >Never having had the luxury of NULLs on my original system I had to >decide how best to utilise them. Eh? You didn't have NULLs on your original system? >I settled on using NULL wherever poss. and disallowing blank entries on >all char fields. They seemed >to serve no useful purpose on our very small system and besides it was >as good as any tactic I could >think of. I hoped it would standardise the creation of new 'forms' & >'reports'. i.e. you know you only >have to check for NULL and not empty string or indeed a string full or >partially full of spaces! You know, it's amazing. They're all English words, but when you string them together like that, it doesn't make sense... >Applying my 'rule' to input; not a problem. However, when I try and >convert the ACE reports I find that >unlike PERFORM there is no NULL assignment value. e.g. LET foobar = Oh? >NULL. ACE initialises a char(n) >variable as a 'n' space filled string. On my old system I always >reinitialised variables to empty string and >now want to set them to NULL to keep them in line with my 'always use >NULL' rule. I tried to write a simple >c function to return NULL with 'strreturn'. Unfortunately, 'strreturn' >doesn't return NULL terminated strings >only strings of a specific length. What is the length of NULL? 0? In >which case 'strreturn' will return nothing! > >I have RTFMed and trawled the web but can find nothing about this >problem. Am I missing something or is >my tactic basically flawed?? I don't understand the problem. If you're trapping for nulls on input, how can they be a problem on output? Do you want nulls or not? What is the problem? ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Obnoxio The Clown wrote: > From: Daryl Craig-Elliot <daryl@tcrs.freeserve.co.uk> > > > >Hello to all. > > > >This is my first posting to this group so... a little message for > >Obnoxio (if you're reading) "Please be nice". > > No. > I suppose I asked for that really. > > >Never having had the luxury of NULLs on my original system I had to > >decide how best to utilise them. > > Eh? You didn't have NULLs on your original system? > Not as part of Informix, no. According to Jonathan Leffler they weren't implemented until ISQL 2.00. > > >I settled on using NULL wherever poss. and disallowing blank entries on > >all char fields. They seemed > >to serve no useful purpose on our very small system and besides it was > >as good as any tactic I could > >think of. I hoped it would standardise the creation of new 'forms' & > >'reports'. i.e. you know you only > >have to check for NULL and not empty string or indeed a string full or > >partially full of spaces! > > You know, it's amazing. They're all English words, but when you string them > together like that, it doesn't make sense... > I'm sorry maybe some punctuation was in order. Would you prefer it Latin next time. > > >Applying my 'rule' to input; not a problem. However, when I try and > >convert the ACE reports I find that > >unlike PERFORM there is no NULL assignment value. e.g. LET foobar = > > Oh? > Sorry? > > >NULL. ACE initialises a char(n) > >variable as a 'n' space filled string. On my old system I always > >reinitialised variables to empty string and > >now want to set them to NULL to keep them in line with my 'always use > >NULL' rule. I tried to write a simple > >c function to return NULL with 'strreturn'. Unfortunately, 'strreturn' > >doesn't return NULL terminated strings > >only strings of a specific length. What is the length of NULL? 0? In > >which case 'strreturn' will return nothing! > > > >I have RTFMed and trawled the web but can find nothing about this > >problem. Am I missing something or is > >my tactic basically flawed?? > > I don't understand the problem. If you're trapping for nulls on input, how > can they be a problem on output? Do you want nulls or not? What is the > problem? > Output? Who mentioned output? The problem is with the use of variables in the format section of the report. Where a variable may be set to the value of a field, it is possible that it maybe NULL, NOT NULL or space padded. I wanted to remove the possibility of space padded that's all. Sorry if it wasn't clear. Jonathan supplied me with a quick solve, which I should have found myself, and I am now happy. Thanks for my baptism by fire. You were quite kind really. I shall not be so tentative next time. Many thanks, Daryl. 8O) > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com