HDTenEightyP/NetNews huggingface dataset:
From: adrianf@informix.com (Adrian FLynn)
Newsgroups: comp.databases.informix
Subject: Re: isql commands from shell prompt
Date: 14 Apr 92 09:04:40 GMT
Organization: Informix Software, Inc.

> 
> I have an Informix-SQL Version 4.00 in front of me.
> 
> How do I issue the following command from inside a shell script?
> 
>    load from "add_units.data" insert into fgistatus;
> 
> In which section is this discussed?  
> 
> I've never had an overview, and I can't seem to find what I need in the 
> index or by browsing each section's table of contents.
> 
> Judy 

Judy

From the command line this will work.

%isql dbname < sql_file

where dbname is the name of the database containing the table fgistatus
and sql_file is a file containing SQL statements ie. the load command.

Alternatively to reduce typing at the command line prepare the script to
use a here docoment.  So we have a file containing the following which we
chmod +x:-

isql dbname <<end_of_sql
load from "add_units.data" insert into fgistatus;
load from "another" insert into another_table;
end_of_sql

Substitute dbname.

I am not sure where this is discussed in the manuals.  

Regards
Adrian
-- 
-------------------------------------------------------
#include "usual.stuff.h"  Adrian Flynn           ^^^^^   
#include "disclaimer.h"   Informix Software Ltd  \O-O/   
#include "big.city.h"     London                   >
From: ilg@dasher.cc.bellcore.com (guthrie,ian)
Newsgroups: comp.databases.informix
Subject: logical logs
Date: 14 Apr 92 17:48:13 GMT
Article-I.D.: emory.8727
Reply-To: ilg@dasher.cc.bellcore.com (guthrie,ian)
X-Informix-List-ID: <list.1059>

I am running informix-online 4.00.UH2 on a Pyramid MIS-12/05 (OSx 5.1a).
Part of the output from 'tbstat -l' is listed below:


address  number   flags    uniqid   begin        size     used    %used
e0068944 1        U---C-L  5        100d64        250       66    26.40
e0068960 2        F------  0        100e5e        250        0     0.00
e006897c 3        U-B----  3        100f58        250      250   100.00
e0068998 4        U-B----  4        101052        250      250   100.00


My questions are:

1. What does the 'L' under the flags heading mean? I cannot find any
   definition in the manuals.

2. Why would online not release a log that has been backed-up (the
   last two lines)?

3. Is there a way to force online to release backed-up logs?


Thanks in advance for any help.

--
Name:    Ian Guthrie                    |Internet: ilg@cc.bellcore.com
Company: Bellcore                       |UUCP:     {uunet}!bellcore!bcr!ilg
Address: 3 Corporate PL., Rm. PYA 2G225 |Voice:    908.699.3354
         Piscataway, NJ 08855           |Fax:      908.336.2307
Newsgroups: comp.databases.informix
From: john@mks.com (John Postma)
Subject: Re: SQL query question
Organization: Mortice Kern Systems Inc., Waterloo, Ontario, CANADA
Date: Wed, 15 Apr 1992 17:23:57 GMT

In article <1992Apr14.153529.27934@nas.nasa.gov> jcarter@sun419.nas.nasa.gov (John R. Carter Sr.) writes:
>In an article regarding SQL query question Ruchi Patel writes:
>> Is there anyway you could update the lower case data into uppercase...
>> Is there anyway you could delete a character from the column...
>
>Although I like the sophisticated method submitted by Paul Roberts,
>I prefer to perform an ASCII dump of the offending records and let UNIX do
>the conversion, then reload the records. You may find this to be a bit faster
>and far less of a problem. UNIX can 'sed', 'tr', 'awk' or even 'perl'
>your most gruesome task with ease. It also has the advantage of taking 
>such mundane tasks out of the database leaving it to do what it does best.
>The disadvantage is that you need to lock the tables from updates while
>the data is 'outside' being modified, or do this at a time when you know
>no one is using the database. If you must have more real time access then
>Paul's solution is best.
>

I must concur with Mr. Carter's response on this.  If the data you are
converting has any phone numbers that are not in the standard US or 
Canadian format, eg any European or other international phone numbers, the
basic updates shown earlier will miss them.  If you are in a position where
unloading the phone numbers to an ascii file is possible, then using a sed,
awk, vi, or whatever to search and replace all the hyphens, then reloading
the data (removing the orginals first) is the most complete method.         
(All this assuming you don't have 4gl or ESQL to set up a cursor and 
scan through the offending records, updating them where needed)
-- 
    /||  // // ,'/""\'   John Postma	         john@mks.com  (519)884-2251
   / ||/// //\' `\\\     Database Administrator,   Mortice Kern Systems Inc.
  /  |/ /_//  \\___/     35 King St. N., Waterloo, Ont., Can. N2J 2W9
o/   "Things are only impossible until they're not!" -- Capt Jean Luc Picard
From: infmx!obelix!johnl@uunet.UU.NET (Jonathan Leffler)
Newsgroups: comp.databases.informix
Subject: Re: Help! my install of ONLINE 4.00 is 30% slower than Standard Engine
Date: 13 Apr 92 16:58:13 GMT
Reply-To: infmx!obelix!johnl@uunet.UU.NET (Jonathan Leffler)
X-Informix-List-ID: <list.1053>

>From: uunet!cpqhou.compaq.com!thomasr (Thomas Rush)
>Date: 10 Apr 92 14:18:13 GMT
>Message-Id: <1992Apr10.141813.26235@cpqhou.compaq.com>
>Subject: Re: Help! my install of ONLINE 4.00 is 30% slower than Standard Engine
>Organization: Compaq Computer Corporation
>X-Informix-List-Id: <news.989>
>
>In article <1992Mar26.204539.7416@informix.com> cortesi@informix.com writes:
>>
>>Regarding your choice of query, "where description matches '*MEM*'"
>>will always use a sequential scan.  MATCHES (or LIKE) with a leading
>>wildcard can't use an index.
>>
>>	Dave Cortesi
>
>Hi, Dave!
>
>	While it may be true to say that MATCHES with a leading
>wildcard _doesn't_ use an index, isn't it possible that using the
>index might be faster:
>
>	since the index will have only this column, amount of data
>	to be searched is only the column we're interested in,
>	and,
>	it is possible that finding a hit may allow inteligent use
>	of Informix's compression scheme to guarantee that the next
>	_n_ rows are hits also?
>
>	Just wondering if anyone's actually done any looking into
>this, or if it is one of the things that everybody "just _knows_."
>
>thomas rush				uunet!cpqhou!thomasr
>compaq computer corporation		their employee,
>deep in the hearth of texas		not their opinions.

Below is some output from SET EXPLAIN.  I think you will see that the
optimiser (Version 4.10.UC2) does use index path when the only data
required is the indexed column.

SCHEMA:
CREATE TABLE Junk(J01 SERIAL NOT NULL, J02 CHAR(20) NOT NULL);
CREATE UNIQUE INDEX Pk_junk ON Junk(J01);
CREATE UNIQUE INDEX Ak_junk ON Junk(J02);

QUERY:
------
select * from junk where j02 matches "*c*"

Estimated Cost: 2
Estimated # of Rows Returned: 1

1) johnl.junk: SEQUENTIAL SCAN

    Filters: johnl.junk.j02 MATCHES '*c*' 


QUERY:
------
select j02 from junk where j02 matches "*c*"

Estimated Cost: 3
Estimated # of Rows Returned: 1

1) johnl.junk: INDEX PATH

    Filters: johnl.junk.j02 MATCHES '*c*' 

    (1) Index Keys: j02   (Key-Only)


Yours sincerely,
Jonathan Leffler (johnl@obelix.informix.com)
From: lhscmc@latrobe.edu.au (Craig Macbride)
Newsgroups: comp.databases.informix
Subject: Re: isrecnum bug in C-ISAM
Date: 14 Apr 92 03:12:28 GMT
Organization: La Trobe University

In article <1653@das13.snide.com> dave@das13.snide.com (Dave Snyder) writes:
>In article <1992Apr13.034933.2354@luga.latrobe.edu.au>, lhscmc@latrobe.edu.au (Craig Macbride) writes:
>> When you read ISNEXT or ISPREV (with ISSKIPLOCK) and get a return code
>> indicating that the record is locked, you know that isrecnum is junk, but
>> the data returned is correct. Therefore, issue a read ISEQUAL on the key
>> which the ISNEXT/ISPREV read returned. This second read will return not
>> only the correct data, but also the correct isrecnum!
>
>Why not use ISCURR?  I believe that ISCURR reads the record where the
>file pointer is pointing regardless of what is in isrecnum.  Also, this
>method would work on Unique and Duplicate indexes (it'd be quicker too).

You'd have hoped that it would work, wouldn't you? Yep, it's the first thing
I tried, and guess what? When you use ISNEXT and get isrecnum left unchanged
from the previous call, and you then use ISCURR (and the record is still
locked by someone) ... isrecnum is _still_ not updated! 

The ISEQUAL read is the only way I can find of getting isrecnum updated in
these circumstances.

(ISLAST and ISFIRST also set isrecnum correctly in all instances as far
as I can tell, but they are not useful very often! :-()

-- 
 _--_|\		Craig Macbride	<lhscmc@luxor.latrobe.edu.au>
/      \			<s900387@minyos.xx.rmit.oz.au>
\_.--.*/
      v
Newsgroups: comp.databases.informix
From: john@mks.com (John Postma)
Subject: Re: Table lookup function in isql?
Organization: Mortice Kern Systems Inc., Waterloo, Ontario, CANADA
Date: Tue, 7 Apr 1992 19:09:11 GMT

In article <62980009@col.hp.com> judym@col.hp.com (Judy Miller) writes:
>Question: Is there some kind of table lookup feature in isql 
>          (Informix SQL Query Language)?
>
>Problem:  I have a list of keys to 4000 records which I need to delete from
>          a table of 12000.  
>
>I'm trying to avoid writing a program for this common function.
>(I do not have 4GL on this machine, but I do have ESQL/C.)
>
>Another option is to unload the table and eliminated the records outside of
>Informix, delete all, and then reload the remaining two-thirds.
>
>Judy
>

If I understand your question correctly you have 4000 key values in some
file or table, and you want to delete all the rows in this 12000 row 
table which contain any of the 4000 keys.  

You could issue a delete something like this one from SQL query language:

delete from big_table where key in (select key from tmp_keys_table);

-- 
    /||  // // ,'/""\'   John Postma	         john@mks.com  (519)884-2251
   / ||/// //\' `\\\     Database Administrator,   Mortice Kern Systems Inc.
  /  |/ /_//  \\___/     35 King St. N., Waterloo, Ont., Can. N2J 2W9
o/   "Things are only impossible until they're not!" -- Capt Jean Luc Picard
Xref: sparky comp.databases.informix:787 bit.listserv.sas-l:1777
From: oles@uniware.dk (Ole Skanning)
Newsgroups: comp.databases.informix,bit.listserv.sas-l
Subject: SAS interface to Informix
Keywords: SAS, Informix, interface
Date: 15 Apr 92 13:07:57 GMT
Followup-To: comp.databases.informix
Distribution: comp
Organization: UNIWARE danmark a/s


Hello Netters.

We are looking for a way to extract data from an Informix database
(SE or OnLine) into the SAS software system. 

Preferable using SQL statements to retrieve the data.

Does any of you know how this can be done, any software around that
can do it ?

Please email me and I'll summarize to the net.

regards
-- 
Ole Skanning
Organization: UNIWARE danmark a/s,  Bygstubben 12, DK-2950 Vedbaek, Danmark
Phone: Office: +45 42 89 49 99, Fax: +45 42 89 28 18, Home: +45 31 65 58 31
Reply-To: oles@uniware.dk
From: dranney@informix.com (David Ranney)
Newsgroups: comp.databases.informix
Subject: Re: isql commands from shell prompt
Date: 15 Apr 92 00:50:09 GMT
Organization: Informix Software, Inc.

In article <1992Apr13.225513.8254@col.hp.com> judym@col.hp.com (Judy Miller) writes:
>I have an Informix-SQL Version 4.00 in front of me.
>
>How do I issue the following command from inside a shell script?
>
>   load from "add_units.data" insert into fgistatus;
>
>In which section is this discussed?  
>
>I've never had an overview, and I can't seem to find what I need in the 
>index or by browsing each section's table of contents.
>
>Judy 


Hope this helps:

#!/bin/sh

isql - - <<!

database dbname;

load from "add_units.data" insert into fgistatus;

!
From: walt@mathcs.emory.edu (Walt Hultgren {rmy})
Newsgroups: comp.databases.informix
Subject: Here we go...
Date: 12 Apr 92 15:40:28 GMT
Article-I.D.: emory.8674
Organization: Emory University

This message is being posted shortly before I upgrade the gateway between
the Informix mailing list and comp.databases.informix.  The gateway was
formerly only one-way from c.d.i into the mailing list.  It is now being
switched to be completely bidirectional.

Each article that originates on the mailing list will have a line added to
its header of the form "X-Informix-List-ID: <list.####>" where "####" is a
sequentially increasing integer.

If you notice any significant change in the flow of News that seems to
involve the gateway, please let me know as soon as possible.

Thanks,

Walt.

-- 
Walt Hultgren             Internet: walt@mathcs.emory.edu   (IP 128.140.2.1)
Emory University              UUCP: {...,gatech,rutgers,uunet}!emory!walt
954 Gatewood Road, NE       BITNET: walt@EMORY
Atlanta, GA  30329  USA      Voice: +1 404 727 0648
From: Root@letterkenn-emh1.army.mil
Newsgroups: comp.databases.informix
Subject: turbo locks
Date: 15 Apr 92 13:08:06 GMT
Article-I.D.: emory.8737
Reply-To: Root@letterkenn-emh1.army.mil
X-Informix-List-ID: <list.1067>

We are running Informix Turbo engine and 4GL/SQL 2.10.03G on a Unisys
5000/95. (note, this is not On-Line, and not 4.0+).

We were told in class when we run tbstat -k it shows table level locks,
in exclusive mode, with a +X and last column=0, which is true. To figure out
which table is locked, however, we were told to look at the partnum column
and note the number (like 100013c). Then, we were told, if we run
"select hex(partnum) from systables" we could get the listing to let us
know what table that is. BUT, apparently in our level of Turbo "hex" is not
a valid syntax for select. Any ideas? I have tried calculator conversions
of the decimal "partnum" from systables, such as 33445543, into hex
but to no apparant avail. Yes, we are getting On-Line 4.1 sometime, whenever
the powers that be agree that we have a paid maint. contract!
The wonders of working for Uncle. Thanks for any help.

Ann Barnes
ISC-Letterkenny Army Depot
Chambersburg, PA
From: dave@das13.snide.com (Dave Snyder)
Newsgroups: comp.databases.informix
Subject: Re: Table lookup function in isql?
Date: 7 Apr 92 17:11:50 GMT
Organization: Snide Inc. - Folcroft, PA

In article <62980009@col.hp.com>, judym@col.hp.com (Judy Miller) writes:
> Question: Is there some kind of table lookup feature in isql 
>           (Informix SQL Query Language)?
> 
> Problem:  I have a list of keys to 4000 records which I need to delete from
>           a table of 12000.  

Assuming you used a SELECT statement to get your list... try:

  DELETE FROM tabname WHERE colname IN
    (SELECT colname FROM tabname WHERE contition)
	you're original select --^

DAS
-- 
David A. Snyder @ Snide Inc. - Folcroft, PA                    Current Release
                                                               is db4glgen-3.4
UUCP:  ..!uunet!das13!dave   INTERNET:  dave.snyder@snide.com
From: cauhape@twg.com (Jeff KB6TDU Cauhape)
Newsgroups: comp.databases.informix
Subject: Re: stuffing the read buffer
Keywords: buffer, read
Date: 13 Apr 92 19:11:25 GMT
Organization: The Wollongong Group, Palo Alto, CA

mukesh@elsouth.wsnc.org (Mukesh Rathor) writes:


>>Under DOS, a character can be placed in the front of the keyboard
>>buffer using the BIOS interrupt 16h, service 05h.  This character
... 

> 
>    or under Sys V 3.2.x.  I wrote a 4GL simulating sperform 2-screens
>    interface. Upon pressing escape on one screen, I wanted to "stuff
>    the buffer with an escape" so that when the next screen is
>    displayed, it will get terminated and after input will do the 
>    checking. I tried, and tried .... and finally resorted to 
>    asking the user to press the esc key again. It would be very
>    useful if the above was possible...

>    Mukesh
>    (mukesh@elsouth.wsnc.org)

Mukesh,

The method I use to determine whether to go on to the next screen or not
is to set a global flag on exit of the last field of the first form. 
Set your flag to FALSE before input from the first screen. Check the value
on exit from input. If the value is TRUE then you know you should probably
pull up the next screen. If it's FALSE, then you know the user pressed control-
C instead.

----------------------------------------------------------------------------
Jeff Cauhape  cauhape@TWG.COM   415/962-7147   Room 224 (SneakerNet)

"I haven't lost my mind. It's backed up on tape somewhere."
----------------------------------------------------------------------------
From: dave@das13.snide.com (Dave Snyder)
Newsgroups: comp.databases.informix
Subject: Re: how to get the value of a typed-in field
Date: 9 Apr 92 01:36:27 GMT
Organization: Snide Inc. - Folcroft, PA


In article <1992Apr8.173243.27830@das.harvard.edu>, bochner@das.harvard.edu (Harry Bochner) writes:

> In article <1992Apr7.162351.9860@cssnl.syssup.tds.philips.nl>, harry@.syssup.tds.philips.nl (Harry Weseman) writes:
> > In informix-4gl, (I have 1.10.03), I would like to inspect what the user
> > has typed in. I am using an INPUT statement, that gives me the value of
> > a field with the AFTER FIELD clause. However, with the ON KEY clause, and
> > then an IF INFIELD(field1) statement, I know that the user has typed something
> > into the field I want, but I cannot get it from the input buffer. Or is
> > there a way?
> 
> If I understand you correctly, the problem is that the value isn't stored in the
> variable until the user exits from the field, and that hasn't happened yet in
> your case. Version 4.1 provides a way to do this (the get_fldbuf() function), but
> it's described in the section on enhancements, so it doesn't look like there's
> any way to do it in older versions. So I think you're out of luck, unless
> upgrading is an option for you.


I had tried researching this awhile ago when Johnathon Leffler had mentioned
that there is an un-documented, un-supported way of doing a get_fldbuf() in
pre-4.1 releases of Informix-4GL.  I sent him mail asking for a few pointers
but I never heard back :-(  Anyway, Johnathon, if your listening... do you
have any suggestions, tips, and/or pointers?  Alan (Denney), would you be
able to shine a little light on the subject... please?


DAS
-- 
David A. Snyder @ Snide Inc. - Folcroft, PA                    Current Release
                                                               is db4glgen-3.4
UUCP:  ..!uunet!das13!dave   INTERNET:  dave.snyder@snide.com
From: kristen.m.altman@ccd.harris.com (Kristen Altman)
Newsgroups: comp.databases.informix
Subject: delimiters
Date: 16 Apr 92 18:13:12 GMT
Reply-To: kristen.m.altman@ccd.harris.com (Kristen Altman)
X-Informix-List-ID: <list.1071>


Informix fans,

I am having a major problem with my application and I'm hoping that someone
can help.

I need to be able to put a delimiter between the data fields returned from
a select statement.  This data is being written to standard output.  An
example would be:

>isql testdb -
>select field1, field2, field3 from test;  {where the delimiter is "|"}

a   |b   |c   |
d   |e   |f   |

etc...


My application uses only Informix-ISQL.                         

If anyone has any idea how this might be accomplished (without using the
unload command), I would love to hear from you!!

Thanks in advance
 
Kristen Altman

P.S. In Sybase, this is accomplished with the isql command.  When you call
isql, you can specify a delimiter to separate the fields.  Maybe there's 
something similar in Informix that I don't know about (I hope).
-- 
*******************************************************
*                   Kristen Altman                    *
*                 kma@ccd.harris.com                  *
*       Harris Controls and Composition Division      *
*                   Melbourne, FL                     *
*******************************************************
From: dave@das13.snide.com (Dave Snyder)
Newsgroups: comp.databases.informix
Subject: Re: Unknown sqlca.sqlcode (-522)
Date: 15 Apr 92 02:01:53 GMT
Organization: Snide Inc. - Folcroft, PA

In article <8719@emory.mathcs.emory.edu>, MYERS@PASCAL.ACM.ORG writes:
>   I'm running INFORMIX/se 4.1 and ESQL/C 4.1 on a Sun4.  I get an error
> of (-522) and the book doesn't day what that is.  Any input would be

Table (tabname) not selected in query.

DAS
-- 
David A. Snyder @ Snide Inc. - Folcroft, PA                    Current Release
                                                               is db4glgen-3.4
UUCP:  ..!uunet!das13!dave   INTERNET:  dave.snyder@snide.com
Newsgroups: comp.databases.informix
Subject: Re: how to get the value of a typed-in field
From: hugh@fivegl.co.nz (Hugh Grierson)
Date: Sat, 11 Apr 92 22:10:12 GMT
Reply-To: hugh@fivegl.co.nz (Hugh Grierson)
Organization: Task Management Ltd, Auckland, New Zealand

In article <1992Apr8.173243.27830@das.harvard.edu> bochner@das.harvard.edu (Harry Bochner) writes:
>In article <1992Apr7.162351.9860@cssnl.syssup.tds.philips.nl>, 
>harry@.syssup.tds.philips.nl (Harry Weseman) writes:
>|> In informix-4gl, (I have 1.10.03), I would like to inspect what the user
>|> has typed in.
>
>Version 4.1 provides a way to do this (the get_fldbuf() function), but
>it's described in the section on enhancements, so it doesn't look like there's
>any way to do it in older versions. So I think you're out of luck, unless
>upgrading is an option for you.
>

Here's basically what we use.  Of course this is completely undocumented,
unsupported by anyone, not guaranteed to do anything, but it works for us...


    #include "sqlfm.h"

    extern _EFICB *eficb;

    fgl_getbuffer()
    {
	if (eficb->_EFbuf)
	    retquote(eficb->_EFbuf);
	else
	    retquote("");
	return 1;
    }

Take a peek in /usr/informix/incl/sqlfm.h.  
There are a few other goodies there.

Hope this helps.
Hugh.
-- 
-Hugh Grierson--hugh@fivegl.co.nz----------Go fast or go home----------------
-Task Management Ltd-Auckland-New Zealand-Ph:+64.9.5206109-Fax:+64.9.5206101-
From: bob@worms-emh2.army.mil ("Robert F. Kane")
Newsgroups: comp.databases.informix
Subject: Re:  SAS interface to Informix
Date: 16 Apr 92 17:48:06 GMT
Reply-To: bob@worms-emh2.army.mil ("Robert F. Kane")
X-Informix-List-ID: <list.1070>

Ole Skanning (oles@uniware.dk) writes:

>We are looking for a way to extract data from an Informix database
>(SE or OnLine) into the SAS software system. 

>Preferable using SQL statements to retrieve the data.

>Does any of you know how this can be done, any software around that
>can do it ?

The easiest way to extract data from an Informix database is to use the 
DBEXPORT command that comes with version 4.0 and above.  If you do not
have access to this command, a share ware version of it is availiable on
the Emory host, thanks to Dave Snyder.  Either of the commands will create
a set of ASCII files delimited by "|" symbols.  A schema will also be 
generated and stored in 'DBNAME'.sql.  This should allow you to port the
data to your other database, assuming you can accept ASCII data.

-----------------------------------------------------------------------------
Bob Kane                   Internet: bob@worms-emh2.army.mil (IP 134.235.9.2)
TechDyn Systems               Voice: (049) 6241-75936   (GERMANY)
CMR 421, BOX 706                Fax: (049) 6241-500154 
APO AE 09056