HDTenEightyP/NetNews huggingface dataset:
From: ijk@cbnewsh.cb.att.com (ihor.j.kinal)
Subject: Re: A solution to SQL reformatting problem
Organization: AT&T
Date: Tue, 21 Jul 1992 17:33:59 GMT
Summary: using awk instead

AS some other readers pointed out, setting columns/COLUMNS does
not appear to work in many cases.

As an alternative, I whipped up a awk script to do this.
I've given some limitted testing to it, but it appears to do
basically what is desired here.  Note that ALL fields from
the file are selected - if you want a subset, then the extension 
to this script is left as an excersise for the user.  Also,
feel free to re-write in perl, etc.

Also note that if the normal isql works, this script attempts to
detect that - but I haven't tested the boundary conditions around
80, so be prepared.

Also, I've only typed some of the obvious types of data - others
will probably need to be added for total correctnes [e.g. float
and date types].

Standard disclaimers apply - and no support is promised!!!
ENJOY.
Ihor Kinal
att!trumpet!ijk
------------------------

# /bin/ksh
# dump_flat: script to give you column headings and fields
# $1 is dbname, $2 is file name.  This script attempts to insure alignment.
# Note that it only works for ALL the columns in a table - if you want
# a subset, some more work is needed.

if [ $# -ne 2 ]; then
	echo "USAGE: $0 dbname filename"
	exit 1
fi
export DB=$1
export FILE=$2
cd /tmp

(
isql $DB - <<!
info tables columns for $FILE;
!
) | tail +5 | egrep -v "^$" > cols

# use the columns info to create awk scripts to format  first the column 
# names, and then actual data.  Assume smallints take 5 spaces, and integers
# 10 spaces.

cat cols | tr ")" " " | tr "(" " " |  egrep -v "^$" | nawk '
		{ len=length($1); if ($2=="smallint" && len < 5)
							len=5
						else if ($2=="integer" && len < 10)
							len=10
						else if ($2=="char" && len < $3)
							len=$3
			printf "{ if (NR==%d) printf \"%%%ds \",$1} \n",NR,len;
			tot_len = tot_len + len +1;
		}

	END { if (tot_len <= 80) 
			printf "TOTAL length too short - %d\n",tot_len
		}

	' > t1.awk

# if the length of the fields is <= 80, a normal dump will suffice.
grep TOTAL t1.awk > /dev/null
if [ $? -eq 0 ]; then
	isql $DB - <<!
	select * from $FILE;
!
else

	nawk -f t1.awk cols
	echo "\n"
	cat cols | tr ")" " " | tr "(" " " |  egrep -v "^$" | nawk '
		{ len=length($1); if ($2=="smallint" && len < 5)
							len=5
						else if ($2=="integer" && len < 10)
							len=10
						else if ($2=="char" && len < $3)
							len=$3
			printf "{ if (NR==%d) printf \"%%%ds \",$2} \n",NR,len}
	' > t2.awk

	(
	2> /dev/null isql $DB - <<!
	select * from $FILE;
!
	) | tail +4 |nawk -f t2.awk

fi

# /bin/rm -f t[12].awk cols
exit 0
From: A.Heskett@bnr.co.uk (Tony Heskett)
Newsgroups: comp.databases.informix
Subject: Re: A solution to SQL reformatting problem (fwd)
Date: 21 Jul 92 10:48:08 GMT
Reply-To: A.Heskett@bnr.co.uk (Tony Heskett)
X-Informix-List-ID: <list.1328>


Steve Price writes (quoting cauhape@twg.com (Jeff Cauhape x7147))

> >    I've found a solution for UNIX systems.

Sort of ...

/usr/gdc/fcddev 10> stty columns 1000
unknown mode: columns

uname -a gives:

OSx64 moses 5.0d-900928 0909i Pyramid-9815

HP-UX gdc A.08.00 B 9000/855 116104132


I tried 'setenv COLUMNS 1000; tset -Q' on both boxes, but that
didn't have much effect either (except that the menu's didn't
display right out of isql).

> >    It appears that sql looks at the width of the output device as defined
> >by the "columns" variable in the stty data structure when it makes a decision
> >to change format or not. To fool sql into not changing the format, reset the
> >value of columns variable in your current session to be wide enough that
> >sql thinks there's enough room.

> >I then reset the columns width to 1000 characters.

> >From here I run my sql script and it writes one record per line. Remember to 
> >reset your tty device back when your done.

Could you let us know what it *does* work on, please ?   Ta !

Suppose it also requires that the script is running on a terminal ?
As in, if I run a cron job, it doesn't get a tty and so I can't stty
the line.

> stty 80			# this is not really needed, since shell can not
> 			# reset stty values for parent shell

This *is* really needed, since this is a line driver thing, not a
shell environment thing.

> Steve Price 		UNIX: pacbell!pbhyf!rsprice	PHONE: (510)823-1951

Nice idea, thanks.  Shame it doesn't work everywhere, though.

Cheers - Tony.
_________________________________________________________________________
Tony Heskett                 th@bnr.co.uk       Phone: (+44) 279 402637
BNR, London Road, Harlow, Essex  CM17 9NA       Fax:   (+44) 279 451434
Newsgroups: comp.databases.informix
From: judym@col.hp.com (Judy Miller)
Subject: dbschema and documenting tables/columns
Date: Thu, 23 Jul 1992 16:49:57 GMT
Organization: HP Colorado Springs Division

I need suggestions for documenting an Informix database I support.

It has been modified greatly since it was first created.
I used the dbschema utility to create a fresh schema.

The problem is the orignal sql files contained lots of valuable 
documentation.

Is Informix self-documenting (meaning you can add descriptions somewhere
in the database), or can someone suggest a method where I can make it
self-documenting?  (or I'll invent my own...)

I'd like the descriptive info to be part of the database, not a separate
file that must be maintained.

Judy
Xref: sparky comp.databases.informix:1599 comp.databases:5773 comp.unix.sysv386:12366
From: tlee@praeda.UUCP.UUCP (Terry Lee)
Newsgroups: comp.databases.informix,comp.databases,comp.unix.sysv386
Subject: Informix for SVR4
Keywords: informix intel svr4 esix dell microport
Date: 24 Jul 92 04:47:30 GMT
Followup-To: uunet!praeda!tlee
Organization: Praeda Management Systems, Inc.

Is anyone out there using Informix products on a vanilla SVR4 for intel
PC's .... ei. dell, esix or microport?  

If so, what o/s and informix products?  Any problems?

Several dicussions with Informix sales and tech support have turned up
nothing useful in this regard.  The party line seems to be that the
ATT SVR4 r 2.1 & 3.0 ports for the Star Server and 6386 should run, but
Informix will not recommend or support it!

I have an iABI third party products directory for SVR4 from ESIX, which
lists Informix products and a contact at Informix who is now an account 
rep. for Brazil, Chile ....

I guess maybe someone on the net (possibly an Informix employee) may have
some first hand knowledge?

Thanks in advance!
From: cdoe%perle.utah.edu@cs.utah.edu (Carlton Doe)
Newsgroups: comp.databases.informix
Subject: OnLine/Optical -- Need info.
Date: 28 Jul 92 21:35:06 GMT
Organization: University of Utah CS Dept


To any Informix rep or customer:

We are looking to incorporate the optical extensions of the OnLine engine into
our current working environment.  However I can't get ANYONE at Informix to
give me any information on the product other than a "technical" brief that
said OnLine can store images/documents as BLOBs.  Big news there.

I would like to speak with anyone who has the OnLine/Optical engine up and
running as well as anyone at Informix who can speak on the product.  Please
reply via e-mail to set up a time for a phone call.  Thanks in advance for
your reply.

-------------------------------------------------------------
Carlton Doe 
cdoe@sunset.utah.edu	
attmail: attmail!alexis!carlton
From: jeff@cbis.ece.drexel.edu (Jeff White)
Newsgroups: comp.databases.informix
Subject: Performance hit of using unbuffered/ansi logging
Date: 21 Jul 92 16:16:06 GMT
Organization: Drexel University, ECE Department, Philadelphia, PA


  I'm at a site running Online 5.0 on a DecStation 5000/240, Ultrix 4.2a.
One of our other dba's wanted to know if anyone an estimated or real
results indicating the performance loss by moving from buffered to
unbuffered logs.  My guess, if it exists, would be that the data would
be in a form more like performance increase when using buffered logs, at
various activity levels (10, 100, 1000 transactions per hour).  If those
numbers were like a 1% improvement for 10 tr/hr, 2% for 100, and 5% for
1000 transactions/hour, it would make decision making much easier.
  Any infor is appreciated.

					Jeff White
					jeff@cbis.ece.drexel.edu
Newsgroups: comp.databases.informix
From: judym@col.hp.com (Judy Miller)
Subject: Is there a return code from isql?
Date: Thu, 23 Jul 1992 17:04:18 GMT
Organization: HP Colorado Springs Division

If I execute isql from a script, how can I test if it bombed?

(I didn't see any discussion in Appendix I, Accessing Programs from the
Operating System.)

Example:   
--------------------------
$IFXDIR/isql -s <<-EOF
   database aspdb;
   delete from productdesc;
   typo to make it bomb
   load from "$ORBDIR/orb7050d" insert into productdesc;
EOF

if [ $? -ne 0 ]; then
   echo $?
else
   echo "OK"
fi
--------------------------

I'd like to test if it failed, but the following doesn't work since $? is 0.  
I assume there must be something else I can test.

Judy
From: jeff@cbis.ece.drexel.edu (Jeff White)
Newsgroups: comp.databases.informix
Subject: Best way to keep mirror (backup) on instance on another machine
Date: 31 Jul 92 18:10:23 GMT
Organization: Drexel University, ECE Department, Philadelphia, PA


  We have an Informix database instance on our primary database machine
with a defined raw disk space of 1G although probably about 150M is being
used now.  We want to create a 2nd computer which will act as a backup.
If the primary system goews down (for an extended period of time), the
backup would be brought online.  100% data availability in not required.
   Our current idea (not tested yet) would be to copy the dump achives
from the primary machine (we use tbtape to archive to a unix file, then
dump that to tape) to the backup and restore them, hopefully synchronizing
the databases at least at that point in time.  If it wasn't too difficult or
too expensive resource wise, I'd like to find a way that this updating
could be done more often or more easily.  Any ideas?


					Jeff White
					jeff@cbis.ece.drexel.edu
From: dave.snyder@snide.com (Dave Snyder)
Newsgroups: comp.databases.informix
Subject: Re: RPT/DCL com file
Date: 26 Jul 92 14:18:03 GMT
Reply-To: dave.snyder@snide.com (Dave Snyder)
X-Informix-List-ID: <list.1342>

Quoting FreeBird...
> 
>    when creating a table how do you specify the primary key?
> 
When creating a table with Informix products (except the low-level C-ISAM),
there is really no such thing as a primary key.  As a matter-of-fact, when
using Informix-SE which uses C-ISAM, if a table is created with one or
more indexes... ALL the indexes are treated as secondary keys.

DAS
-- 
David A. Snyder @ Snide Inc. - Folcroft, PA                    Current Release
                                                               is db4glgen-3.7
UUCP:  ..!uunet!das13!dave   INTERNET:  dave.snyder@snide.com
From: cris@logic.dsg.ti.com (Cris Schramm)
Newsgroups: comp.databases.informix
Subject: Online 5.0 (fwd)
Date: 27 Jul 92 14:43:10 GMT
Reply-To: cris@logic.dsg.ti.com (Cris Schramm)
X-Informix-List-ID: <list.1343>

> I am interested in any bugs/problems anyone is having with OnLine version
> 5.0.  We are running 5.00.UC2 on a sun 690MP and have come across a few
> quirks;
> 2. tbcheck -pe appears to be limited to 14 chunks. we currently have
>    21 chunks.

I'm running 5.00.UD1 and I tried this with 20 chunks with NO problems.
It has either been fixed in the UD1 version or is specific to the port 
you have.

> --
> Bob Baskett
> Motorola, Inc.
> baskett@hermes1.sps.mot.com

***---***---***---***---***---***---***---***---***---***---***---***---***
Regards,
Cris Schramm    Texas Instruments, Inc. 	     #include <disclaimers>
                Internet                Cris.Schramm@hub.dsg.ti.com
		TI Telephone    	(512) 250-4424
		Fax Phone		(512) 250-6051
***---***---***---***---***---***---***---***---***---***---***---***---***
From: lei@mediatech.COM (Charles Lei)
Newsgroups: comp.databases.informix
Subject: Programmer Position
Date: 29 Jul 92 20:18:05 GMT
Reply-To: lei@mediatech.COM (Charles Lei)
X-Informix-List-ID: <list.1345>

Mediatech, the nation's leading Media Communications company, 
is seeking candidates for the following position in our 
Chicago Office:

    PROGRAMMER/ANALYST
    
    Informix 4GL Programmer/Analyst to design and implement 
    functional modules for our distribution system.  The 
    successful applicant must work well in a team development 
    environment, yet still be able to develop software with 
    minimal supervision.  
    
    Strong communications and user relations skills, along 
    with a Bachelor's Degree in Computer Science, and 2-5 
    years of work experience in software analysis, design, 
    and implementation is required.  Must be familiar with 
    Informix 4GL/SQL.  FourGen CASE Tool experience and/or a 
    solid Unix/C background is helpful.

Please send resume and salary requirements to:

     Charles Lei
     Mediatech, Inc.            
     110 W. Hubbard Street
     Chicago, IL 60610        
     
     E-Mail: lei@mediatech.com
     Voice:  (312) 828-1146
     FAX:    (312) 828-0982

Newsgroups: comp.databases.informix
From: cgregory@suna7.cs.uiuc.edu (Christine Gregory)
Subject: Forward one screen in perform?
Originator: cgregory@suna7.cs.uiuc.edu
Organization: University of Illinois at Urbana-Champaign
Date: Tue, 28 Jul 1992 21:18:22 GMT


Is there a way -- while adding/updating data in perform -- to skip to the next
screen?  (Similar to the way CTRL-F skips to the next line.)

It seems logical that there would be some way to do this for large
forms, but maybe it's just me.

Thanks.

Christine A. Gregory				cgregory@ziggy.cs.uiuc.edu
Newsgroups: comp.databases.informix
From: cdoe%perle.utah.edu@cs.utah.edu (Carlton Doe)
Subject: OnLine 5.0 BUG -- create index problems
Date: 28 Jul 92 16:05:45 MDT
Organization: University of Utah CS Dept


7.27.92

	MAJOR BUG IN 5.0 -- tables MUST be locked in exclusive mode
	   before creating indexes or risk trashing the systables
	   rowid pointers into the indexes.  This trashes the data-
	   base requiring a dbexport/dbimport or restore from archive.

Just a warning to OnLine 5.0 DBA's.  The other day I needed to drop and recreate some
indexes on most of the tables in one of my databases.  I had done some table
shuffling within extents and some of the tables had grown significantly since their
original creation.  

I started a transaction, dropped the indexes and recreated them.  I checked the
sql script when finished as well as the engine log -- no errors recorded.  I committed 
the transaction and went home.  NOTE: Locks are tuned to 3000 and I was running a 
"tbstat -u -r 60" during the entire process and the greatest number of locks used was 685.

The next morning, no one could access the database.  I know, I know, I shouldn't have
believed the log or the result code from the script and should have tried to run 
some applications but I figured the engine had better be able to create indexes
correctly.  After much research on my part as well as tech support, we were able to 
reproduce AND AVOID the problem with a test table.  By not locking the table in exclusive
mode, the index would be created but the rowid pointers would get screwed up.  A
tbcheck -ci showed the index as ok but a tbcheck -cI (which hits the rowids) would
fail all over the place.  Worse, it (tbcheck -cI) couldn't correct the problem
because it couldn't drop the index to recreate it.  I also couldn't manually drop the index
and recreate it either; I got unknown rowid errors all over the place.  The tech support 
engineer later found notes to support this.

The only solution to the problem is to recreate the database either through a 
dbexport/dbimport or through restoration from archive.  I chose the later as
I always make it a practice to archive the system before and after I make any 
major changes to any of the databases.  

I must say I was pleased with the restoration process.  I had never done a restore
in the OnLine environment just Turbo.  The restore ran very smoothly and most
important of all, quickly!

Anyway, I pass this on to perhaps help someone avoid the same trap we ran into.

-------------------------------------------------------------
Carlton Doe 
cdoe@sunset.utah.edu	
attmail: attmail!alexis!carlton
Newsgroups: comp.databases.informix
From: jr@speedy.uucp (Juergen Roberg)
Subject: Re: Online 4.1 shared memory initialization
Organization: SNS - Berlin
Date: Mon, 27 Jul 1992 12:47:32 GMT


Thanks to all the people who send an answer.

The problem seems to be solved:

  It was Informix Star 4.0.

  If you set the variable SQLEXEC to sqlexec_tcp (as stated in the manual)
  you will have no longer access to shared memory (but tbmonitor indicates
  status is online).
  Just unset SQLEXEC and you won't have any problems.

  Informix Hotline is still working on that.


/*
 Juergen Roberg       |  Tel.     work : (030) 4607-3135
		      |         privat : (030) 3445384
 Siemens Nixdorf      |
 Software Engineering |
 GmbH                 |  Email   USA : roberg.bln@sni-usa.com
 Gustav-Meyer-Allee 1 |         !USA : roberg.bln@sni.de
 D-1000 Berlin 65     |
*/
From: rsprice@pbhyf.PacBell.COM (Steve Price)
Subject: Re: A solution to SQL reformatting problem (fwd)
Reply-To: rsprice@PacBell.COM (Steve Price)
Organization: Pacific * Bell, San Ramon, CA
Date: Tue, 21 Jul 1992 16:50:27 GMT

In article <9213@emory.mathcs.emory.edu> A.Heskett@bnr.co.uk (Tony Heskett) writes:
>X-Informix-List-ID: <list.1328>
>
>
>Steve Price writes (quoting cauhape@twg.com (Jeff Cauhape x7147))
>
>> >    I've found a solution for UNIX systems.
>
>Sort of ...
>
>/usr/gdc/fcddev 10> stty columns 1000
>unknown mode: columns
>
>uname -a gives:
>
>OSx64 moses 5.0d-900928 0909i Pyramid-9815
>
>HP-UX gdc A.08.00 B 9000/855 116104132
>
I have the same problem on ATT 3B20.
SO the solution is not a solution.  Too bad.  I tried to find a "column"
setting referred to in UNIX: The Complete Reference, Stephen Coffin
and in teh ATT 3B2 User and programmer references.  No such luck.

>> stty columns 80	# this is not really needed, since shell can not
>> 			# reset stty values for parent shell
>
>This *is* really needed, since this is a line driver thing, not a
>shell environment thing.
If "stty columns" worked at all you'd be correct!


Sorry I did not test this before I went and advertised to the whole planet.

However, the general principle of using a shell as a wrapper for calls
to INFORMIX programs, such as isql, does work and is often rather useful.
You can even pipe the output into sed, awk, etc inside the shell to 
sort or reformat the output.  If you use KSH you can do a lot of
powerful output formatting -- so much so that you might use the ksh instead
of ACE to do reports (assuming that you don't have INFORMIX-4GL).


-- 
Steve Price 		UNIX: pacbell!pbhyf!rsprice	PHONE: (510)823-1951

Evil can be displaced but never eradicated, as all solutions breed new problems.
Yet it is neccessary to keep on struggling toward solution.
Newsgroups: comp.databases.informix
From: milius@narziss.sni.de (Milius)
Subject: Information about database location
Date: Fri, 24 Jul 1992 06:31:12 GMT
Organization: Siemens Nixdorf Info.Sys. AG, Paderborn, Germany
Keywords: dbspace database ESQL/C-program

During installation our system allows to specify a dbspace where all objects
(tables, views, indicees, ...) of our database have to be stored.
At runtime our system creates new objects on user demands. Therefore we need
to know in which dbspace our database is located.
I know that there is a possibility to use the menue of tbmonitor
(STATUS.DATABASES) to get this information. Has anybody out there a good idea
to get this information out of an ESQL/C program?
Currently we are using Informix Online V4.0.

Thanks in advance


--
Volker Milius, c/o Siemens-Nixdorf Informationssysteme AG
STO-NC 332, Riemekestrasse 160, W-4790 Paderborn, Germany
EMail:   USA: milius.pad@sni-usa.com   |  Phone: (+49) 5251 835362
       EUNet: milius.pad@sni.de        |  Fax  : (+49) 5251 835353
Newsgroups: comp.databases.informix
From: dbh@dbsm.oz.au (David Hodge)
Subject: Informix EQSL/COBOL
Reply-To: dbh@thor (David Hodge)
Organization: SBC Dominguez Barry Ltd
Date: Thu, 30 Jul 92 02:12:01 GMT


Hi,

Does anyone else out there use EQSL/COBOL on Suns?. I would be
interested to hear about other peoples experiences with the product, as
I seem to regularly run into a variety of extremely annoying bugs which
leave me to wonder if anyone else is unfortunate enough to use this
product. Bugs such as 256 character limits in PREPARE statements, not
being able to number lines inside sql execs , core dumps on syntax
errors and including dummy linkage sections so the preprocessor can
find its way all leave me feeling fairly frustrated with it.

I guess I'd like to know what other bugs there are , and how other
people deal with them. Email me, and if there is enough interest I'll
summarise in a few days


David 


David Hodge.				        MHSnet :  dbh@dbsm.oz.au
SBC Dominguez Barry Limited.    	INTERNET GATEWAY:
Sydney Australia.              		dbh%dbsm.oz.au@munnari.oz.au

-- 
David Hodge.				        MHSnet :  dbh@dbsm.oz.au
SBC Dominguez Barry Limited.    	INTERNET GATEWAY:
Sydney Australia.              		dbh%dbsm.oz.au@munnari.oz.au
From: jeff@cbis.ece.drexel.edu (Jeff White)
Newsgroups: comp.databases.informix
Subject: Way to get list of all databases?
Date: 28 Jul 92 15:54:40 GMT
Organization: Drexel University, ECE Department, Philadelphia, PA


  Does someone know of a way (easy or not, but needs to be executeable
from command line, not interactive) to return a list of all the available
databases?  Someone pointed out that we should probably be running
'update statistics' on them each not, so tha tthe cost based optimizer
will have accurate information.
  I have come up with a filter script that will take the output of
'thcheck -pe' (Online 5.0) and return a list.  However, I would have
thought that information would be available from within the database
and not from an external program.

					Jeff White
					jeff@cbis.ece.drexel.edu
From: baskett@hermes1.sps.mot.com (Bob Baskett)
Newsgroups: comp.databases.informix
Subject: Online 5.0
Date: 23 Jul 92 01:53:09 GMT
Reply-To: baskett@hermes1.sps.mot.com (Bob Baskett)
X-Informix-List-ID: <list.1335>


I am interested in any bugs/problems anyone is having with OnLine version
5.0.  We are running 5.00.UC2 on a sun 690MP and have come across a few
quirks;

1. select a.rowid, b.rowid
   from   table1 a, table2 b
   where  a.col1 = b.col1

   this returns some interesting values - namely, if you dont have an
   index on the join columns for both tables it returns the max rowids
   from both tables for each line.  add an index to table1, you will
   get the correct rowids for table1 and the max rowid from table2.

2. tbcheck -pe appears to be limited to 14 chunks. we currently have
   21 chunks.

There are more. Let me know if you come across any.

--
Bob Baskett
Motorola, Inc.
baskett@hermes1.sps.mot.com
From: widener!informix.com!bgolden@emory.mathcs.emory.edu (Bernard Golden)
Newsgroups: comp.databases.informix
Subject: INFORMIX WORLDWIDE USERS CONFERENCE
Date: 21 Jul 92 20:23:09 GMT
Reply-To: widener!informix.com!bgolden@emory.mathcs.emory.edu (Bernard Golden)
X-Informix-List-ID: <list.1331>


In Steve Price's trip report about the IWUC (as it was known within the
company!), he notes:

> The next release of INFORMIX On-LINE, Version 6, is to be announced
> soon.  Two phase commit, stored procedures, more online transaction
> speed and power, and other features are included which Mr. Sippl 
> claimed will make it obvious that INFORMIX engines running on UNIX
> are not just capable of doing enterprise-wide on-line transactions,but
> are the "best" approach.

Actually, 2PC and stored procedures are features in the current version
of OnLine, Version 5.0.  It has many other features as well, many of them
oriented toward OLTP.  I recommend that our users contact their sales
reps for technical briefs on 5.0.

Thanks.

-b