HDTenEightyP/NetNews huggingface dataset:
From: cortesi@informix.com (David Cortesi)
Newsgroups: comp.databases.informix
Subject: Re: RPT/DCL com file
Date: 27 Jul 92 16:29:15 GMT
Reply-To: cortesi@informix.com
Organization: Informix Software, Inc.

In article <9232@emory.mathcs.emory.edu> dave.snyder@snide.com (Dave Snyder)  
writes:
> 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.

Well, actually, if you are using an Informix SQL engine release 5.0,
you specify the primary key in your CREATE TABLE statement:
	CREATE TABLE customer (
		customer_num SERIAL PRIMARY KEY ...

When the primary key is a composite key, you can specify 
PRIMARY KEY (...list of columns...) after declaring the columns.
From: widener!obelix.informix.com!johnl@emory.mathcs.emory.edu (Jonathan Leffler)
Newsgroups: comp.databases.informix
Subject: Re:  Is there a return code from isql?
Date: 24 Jul 92 09:34:12 GMT
Reply-To: widener!obelix.informix.com!johnl@emory.mathcs.emory.edu (Jonathan Leffler)
X-Informix-List-ID: <list.1338>

Dear Judy,

Seems to be your lucky day -- two answers for two questions!
There again, maybe you'd prefer not to have this answer.

>From: uunet!col.hp.com!judym (Judy Miller)
>Subject: Is there a return code from isql?
>Date: 23 Jul 92 17:04:18 GMT
>X-Informix-List-Id: <news.1575>
>
>If I execute isql from a script, how can I test if it bombed?
>--------------------------
>$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.

You assume, I fear, in error.  There is, in my experience, no reliable way
of dealing with erros.  So much so that I've given up using isql in this
mode many, many moons ago, and I use my own ESQL/C program instead.  Your
test script doesn't reveal the full extent of the problem:

isql - - <<!
database aspdb;
begin work;
insert into table01 values (1, 2, 3)
insert onto table02 values (1, "abracadabra", "ambidextrous");
insert onto table02 values (1, "elementary", "sub-atomic physics");
commit work;
!

Since there is a typo (the "onto"), the second and third insert statements
will fail, but the commit will occur and work!  Ouch!  If you're really
interested, I could probably send you the program I use instead.

Yours,
Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>

PS: I assume $IFXDIR is a local synonym for $INFORMIXDIR?  Not that it
matters.
Newsgroups: comp.databases.informix
From: jr@speedy.uucp (Juergen Roberg)
Subject: Online 4.1 shared memory initialization
Organization: SNS - Berlin
Date: Fri, 24 Jul 1992 07:42:41 GMT


Problem using Informix-Online 4.1


When I try to start isql I get the following error messages:

-529	Cannot attach to shared memory.

Your application program is unable to initialize its connection to the 
database engine because you are using a shared-memory 
implementation and either: (1) the database shared memory has not 
been initialized, or (2) the maximum number of users has already 
started using the system. Check the accompanying ISAM error code 
for more information.

-123	ISAM error: no shared memory

This implementation of ISAM uses shared memory; however, the 
shared memory partition has not been established. Contact the 
system administrator or the person who installed the product.


This seems to be a problem solved easily, but

1) on call of tbinit you get the message: shared memory already initialized
2) there are no users connected.

Has anybody out there any opinions ?

Thank's in advance

/*
 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: A.Heskett@bnr.co.uk (Tony Heskett)
Newsgroups: comp.databases.informix
Subject: Re: Way to get list of databases ?
Date: 28 Jul 92 21:08:04 GMT
Reply-To: A.Heskett@bnr.co.uk (Tony Heskett)
X-Informix-List-ID: <list.1344>


Jeff White writes:

}   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?  

Well, someone does.   From Ken Evilsizor a little while ago:

} > A week ago I posted a request for info on how to get a list of available
} > databases into 4GL program using On-Line 4.0.  I am assuming that they are
} > stored in a table in rootdbs.
}  
} There is a function called sqgetdbs() that can provide the information that
} you request.  While attending an OnLine for Database Administrators class
} we received a listing for 'prlogdb' written by Jim McCann, Informix and
} crediting Mark J. of Informix for the dbnames code.  I will post the
} dbnames function if Informix doesn't mind.
}  
} ---------------------------------------------------------------------------
} Ken Evilsizor                   Email: sdrc!cinnet!carsinfo!ken
} CARS Information Systems
} 4000 Executive Park Dr.         Disclaimer: All opinions expressed are
} Cincinnati, OH 45241                definitely my own.

I get the feeling that this *hasn't* been posted, but that you'd get
a fair way by playing with sqgetdbs().   Otherwise, mail him & grovel ;-)

Cheers - Tony.
_________________________________________________________________________
Tony Heskett                 th@bnr.co.uk       Phone: (+44) 279 402637
BNR, London Road, Harlow, Essex  CM17 9NA       Fax:   (+44) 279 451434
Xref: sparky comp.databases.informix:1610 comp.databases:5789 comp.unix.sysv386:12426
From: aland@informix.com (Colonel Panic)
Newsgroups: comp.databases.informix,comp.databases,comp.unix.sysv386
Subject: Re: Informix for SVR4
Keywords: informix intel svr4 esix dell microport
Date: 25 Jul 92 01:10:00 GMT
Followup-To: comp.databases.informix
Organization: Enterprise Technology Center, Informix Software, Inc.

In article <296@praeda.UUCP.UUCP> tlee@praeda.UUCP.UUCP (Terry Lee) writes:
>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!

The "party line", in this case, is correct.  The only platform that port 
has been tested on is AT&T SVR4 R2.1 on the 6386 or StarServer.  

The only problem I've encountered on others is that the 5.0 products
(the original acceptance port; there has since been a new 5.0 port that
I haven't tried) wouldn't install on Consensys 1.2 (SVR4 R3.0), seemingly 
due to a botch in how the pkgadm stuff was set up that AT&T SVR4 R2.1 
didn't mind.  Whether that problem would exist on other SVR4 3.0 
variants, I don't know.  Whether it was resolved in the later port, I
also don't know (but I doubt it).  4.1 products were OK (in my limited
testing), as they didn't use pkgadm at that time.

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

I've repeatedly lobbied for support for some of the others (especially Dell
SVR4), but I'm always told that "the market isn't asking for it".  So, be
sure to tell your sales critter that you exist!   [-:

My own opinions, etc. etc.    Followups to comp.databases.informix.

--
Alan Denney      aland@informix.com      {pyramid|uunet}!infmx!aland

"I'm tough!  When my girlfriend tells me that she doesn't want to see me
 anymore, I just poke her in the eyes!"
"I'm tough!  I'm into Punk Yoga.  That's where you stand on *somebody else's*
 head."
"I'm so tough, when I go down to the beach, I kick sand in my *own* face!"
    -- George Smilovich
Newsgroups: comp.databases.informix
From: dinguyen@wam.umd.edu (Dzi Nguyen)
Subject: Index Size
Originator: dinguyen@rac1.wam.umd.edu
Organization: University of Maryland at College Park
Date: Thu, 30 Jul 1992 22:28:46 GMT

Hi netter,
Does anyone know exactly how to calculate the total index size of a 
particular table like you see when you do dbschema.  According to the 
Informix Training 'Book', add 8 bytes to the length of each key, and then
sum up all index entries, this should be the total index size.  But this
never work unfortunately.
ex:
{ TABLE "dnguyen".foo_tbl row size = 34 number of columns = 8 index size = 70 }
create table "dnguyen".foo_tbl 
  (
    f1 serial not null,
    f2 char(8) not null,
    f3 char(1),
    f4 char(6),
    f5 char(1),
    f6 char(1),
    f7 char(1),
    f8 char(12)
  )
create index "dnguyen".i_f1 on "dnguyen".foo_tbl (f8);
create index "dnguyen".i_f23 on "dnguyen".foo_tbl (f2,f3);
create index "dnguyen".i_f1 on "dnguyen".foo_tbl (f1);
create index "dnguyen".i_f4 on "dnguyen".foo_tbl (f4);

thanx in advance...

------------------------------------------------------------------------------
CSC - Partner
Dzi Nguyen
dinguyen@wam.umd.edu
------------------------------------------------------------------------------
-- 



**********************************************************
Newsgroups: comp.databases.informix
Subject: SCROLL statement help
From: imf@datamark.co.nz (Ian Franklin)
Date: Fri, 24 Jul 1992 03:33:22 GMT
Organization: Datamark International Ltd.

I am using INFORMIX 4GL Version 4.00 on a standard engine and am
having some problems with a DISPLAY ARRAY. The problem is that the
array holds past, present and future data and I would like to position
the cursor on the data relevent to the present and then allow the user
to scroll up or down as he/she desires. To do this I assumed that
I could use the SCROLL command to do this positioning however the
manuals I have do not have any examples of how this is achieved, only
the command format and a one line description. I used the SCROLL
statement in a FOR loop, testing on a date and if the date does not
fall with in the current month I would SCROLL up 1. This was done
just before the DISPLAY ARRAY but once the array is displayed to the
screen it is starting at the first table entry still. In debug mode
the FOR seems to be working fine.

Could someone out there please point out what I am doing wrong (Its
sure to be something obvious like the command not doing what I
thought) or provide an example of this commands correct use.

Thanks in advance.
-- 
Ian Franklin       | imf@datamark.co.nz | +64-4-233-8186 (work) |
Datamark Intl Ltd  |--------------------------------------------|
Wellington         | I drink to make other people intresting    |
New Zealand        |                    - George Jean Nathan    |
Newsgroups: comp.databases.informix
From: jtt@tct.com (John Tombs)
Subject: Re: Is there a return code from isql?
Date: Fri, 24 Jul 1992 16:50:43 GMT
Organization: TC Telemanagement, Clearwater, FL

In article <1992Jul23.170418.16866@col.hp.com> judym@col.hp.com (Judy Miller) writes:
>If I execute isql from a script, how can I test if it bombed?
>
>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
>--------------------------

We redirect standard error to a temporary file, then grep it for error
messages (all from within the script, of course). Clumsy, but it works.


-- 
John Tombs at Teltronics/TCT        <jtt@tct.com>,     <uunet!myrddin!tct!jtt>
                     Real Modem Users Do It Internally.
From: ALANB@OWGVM0.VNET.IBM.COM (Alan Beal)
Date: Fri, 31 Jul 92 11:38:35 EDT
Newsgroups: comp.databases.informix
Subject: tbmonitor on HP VUE
Organization: Federal Systems Company (IBM)

I am installing Informix OnLine 5.0 on an HP 9000/700 and am at the
point of running tbmonitor to do the preliminary configuration.  I
am running in VUE using a hpterm.  The problem is that tbmonitor is
not running in full screen mode so it is rather difficult to make
the required changes.  Does anyone know the correct TERM setting
for this environment?

Alan Beal         alanb@owgvm0.vnet.ibm.com
                  (607)751-2026
Newsgroups: comp.databases.informix
From: ijk@cbnewsh.cb.att.com (ihor.j.kinal)
Subject: Re: A solution to SQL reformatting problem
Organization: AT&T
Date: Wed, 22 Jul 1992 12:01:57 GMT
Summary: bug in previous listing

It occurred to me after I posted that my prgram would only work for
one record.  Here's the modified program works for more.  Other
disclaimers still apply.
Ihor Kinal
-------------------------------------
# /bin/ksh
# 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 '
		BEGIN { printf "{ if (NF==0) {cnt =0; printf \"\\n\"} else cnt++}\n" }
		{ 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 (cnt==%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
Newsgroups: comp.databases.informix
From: oneworld!charles (Charles W. Cooper II)
Subject: Re: Latest Informix Truck Schedule
Reply-To: charles@oneworld.wa.com
Distribution: usa
Date: Tue, 21 Jul 1992 16:22:33 GMT

William Daul writes
> Date: Thu, 16 Jul 92 17:02:00 PDT
> 
>                    ....
>            _____________\
>       ~  / Informix   /-)___
>      ~  /  Truck     /   /_@/
>     ~   --OO-------OO---O--/
> 

How about picking up some NeXT machines on your way from Menlo Park???
From: kristen.m.altman@ccd.harris.com (Kristen Altman)
Newsgroups: comp.databases.informix
Subject: Re: A solution to SQL reformatting problem
Date: 21 Jul 92 12:33:09 GMT
Reply-To: kristen.m.altman@ccd.harris.com (Kristen Altman)
X-Informix-List-ID: <list.1329>


 
Tony Heskett writes: 

> 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).

You can add the Motorola boxes to the list of the "didn't works".  Actually
I called Informix, and I could swear they said that the 80 columns was
hardcoded, but that could just be for my port.

It was a great idea though, and if it will work for some, that's great!

Kristen

-- 
*******************************************************
*                   Kristen Altman                    *
*                 kma@ccd.harris.com                  *
*              Harris Controls Division               *
*                   Melbourne, FL                     *
*******************************************************
From: aland@informix.com (Colonel Panic)
Newsgroups: comp.databases.informix
Subject: Re: Online 4.1 shared memory initialization
Date: 29 Jul 92 03:30:11 GMT
Organization: Enterprise Technology Center, Informix Software, Inc.

In article <jr.712241252@speedy> jr@speedy.uucp (Juergen Roberg) writes:
>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)

It doesn't say this in the Informix manual (reference: p 21-23, 1/90 edition).
What manual is this from?

>  you will have no longer access to shared memory (but tbmonitor indicates
>  status is online).
>  Informix Hotline is still working on that.

--
Alan Denney      aland@informix.com      {pyramid|uunet}!infmx!aland

"I'm tough!  I'm into Punk Yoga.  That's where you stand on *somebody else's*
 head."
"I'm so tough, when I go down to the beach, I kick sand in my *own* face!"
    -- George Smilovich
From: uaa1006@dircon.co.uk (Peter Miles)
Newsgroups: comp.databases.informix
Subject: Informix on SCO UNIX 3.2.4
Date: 26 Jul 92 14:01:51 GMT


One of the companies I do some work for has Informix v4 running 
on their SCO UNIX systems which are currently version 3.2.2.

They are thinking of upgrading to SCO version 4, but want to 
know whether this will cause a problem with their Informix packages
(specifically 4GL, ESQL/C, SQL, Standard Engine and On-line, 
plus Informix Net).

Has anyone done this already? Do you need an update to the Informix 
package for it all to work? Do new SCO features such as long 
filenames and symbolic links cause any problems?

Thanks for any help!

Please email me, and I'll post a summary if there's interest.

                -- Pete
-- 
Pete Miles			uaa1006@dircon.co.uk
				...uknet!dircon!uaa1006
Newsgroups: comp.databases.informix
From: shemminga@cix.compulink.co.uk (Stuart Hemming)
Subject: Informix .FRM files.
Reply-To: shemminga@cix.compulink.co.uk
Date: Wed, 29 Jul 1992 08:40:30 +0000

Does anybody have any technical information regarding the internal
format of Informix .FRM files. The reason I'm asking is because of a 
problem I've discovered with .PER files which does'nt allow fields of
variable length, ie. The length of the field is'nt known until run
time and the only way we've found of getting around the problem is by
keeping loads of .PER files which are all the same apart from the
length of the field.

If you can think of another way around this problem (maybe an easier
way), I would be very grateful.

--
These opinions are mine -- let's face it who'd want them

Send me mail -- No reasons, just send it.

stuart@cix.compulink.co.uk            Tel +44 778 426444
[Stuart Hemming]
Stuart
|8-)
From: widener!obelix.informix.com!johnl@emory.mathcs.emory.edu (Jonathan Leffler)
Newsgroups: comp.databases.informix
Subject: Re: Way to get list of databases ?
Date: 29 Jul 92 22:13:06 GMT
Reply-To: widener!obelix.informix.com!johnl@emory.mathcs.emory.edu (Jonathan Leffler)
X-Informix-List-ID: <list.1346>


I enclose a shell archive of dbnames.ec.
Compile using: esql -o dbnames dbnames.ec

Probably won't wok with ESQL/C 4.10 unless you can find the file rfnmanip.o
in one of the other libraries you have installed, but try it and see.
Works OK with ESQL/C 4.00 and ESQL/C 5.00.

This is totally unsupported, and not guaranteed on any platform whatsoever!

Yours,
Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>

:	"@(#)shar.sh	1.8"
#! /bin/sh
#
#	This is a shell archive.
#	Remove everything above this line and run sh on the resulting file.
#	If this archive is complete, you will see this message at the end:
#	"All files extracted"
#
#	Created: Wed Jul 29 22:23:04 GMT 1992 by johnl at Informix Software Ltd.
#	Files archived in this archive:
#	dbnames.ec
#
#--------------------
if [ -f dbnames.ec -a "$1" != "-c" ]
then echo shar: dbnames.ec already exists
else
echo 'x - dbnames.ec (1625 characters)'
sed -e 's/^X//' >dbnames.ec <<'SHAR-EOF'
X/*
X@(#)File:            dbnames.ec
X@(#)Version:         1.1
X@(#)Last changed:    91/03/14
X@(#)Purpose:         Print list of visible databases
X@(#)Author:          John Cooke/Mark Jeske/Jonathan Leffler
X*/
X
X/*
X**********************************************************
X**	This code is derived from two almost identical      **
X**	programs with the identifications preserved below:  **
X**********************************************************
X**	dbnames.ec                                          **
X**	List all available database names.                  **
X**	Mark J (Informix) 3-13-91                           **
X**********************************************************
X**	From: johnc@obelix (John Cooke)                     **
X**	Quite a coincidence ....  I wrote THIS program:     **
X**	program to get the names of all visible databases   **
X**********************************************************
X**	Compile using:                                      **
X**	esql -o dbnames dbnames.ec $INFORMIXDIR/lib/librds.a       **
X**********************************************************
X*/
X
X#ifndef lint
Xstatic char     sccs[] = "@(#)dbnames.ec	1.1 91/03/14";
X#endif
X
X#include <stdio.h>
X
X#define MAXDBS    100
X#define FASIZ     (MAXDBS * 19)
X
Xmain()
X{
X	int             ndbs;
X	int             sqlcode;
X	int             i;
X	char           *dbsname[MAXDBS + 1];
X	char            dbsarea[FASIZ];
X
X	if ((sqlcode = sqgetdbs(&ndbs, dbsname, MAXDBS, dbsarea, FASIZ)) != 0)
X		fprintf(stderr, "error code %d from sqgetdbs\n", sqlcode);
X	else
X	{
X		for (i = 0; i < ndbs; ++i)
X			printf("%d %s\n", i, dbsname[i]);
X	}
X
X	return (0);
X}
SHAR-EOF
chmod 444 dbnames.ec
if [ `wc -c <dbnames.ec` -ne 1625 ]
then echo shar: dbnames.ec unpacked with wrong size
fi
# end of overwriting check
fi
echo All files extracted
exit 0
From: jacob@informix.com (Jacob Salomon)
Newsgroups: comp.databases.informix
Subject: Re: ESQL/C and error msgs
Summary: rgetmsg(short errnum, char * target, short target_length)
Keywords: error esql
Date: 22 Jul 92 20:08:41 GMT
Organization: Informix Software, Inc.

In article <9219@emory.mathcs.emory.edu>
   snorri@strengur.is (Snorri Bergmann) writes:

>Hi y'all!

Hi back, Snorri.

Say! If you're from so far north (Iceland) why are you (y'all?)
speaking in a Southern drawl?  ;-)

>Is there function in esql/c to get the SQL error message if you have
>the sql error code? (Similar to ERR_GET function in 4gl).

Yes - it's called rgetmsg and it's parameters are as described in the
prototype in summary line.  In the 5.0 manual, it is described on page
7-13.

>Thanks in advance,

You're welcome retroactively. ;)

>Snorri Bergmann               | Internet: snorri@strengur.is
>Strengur Consulting Engineers | Bang:     ...!uunet!strengur.is!snorri
>Storhofdi 15                  | Phone:    +354 1 685130
>112 Reykjavik Iceland         | Telefax:  +354 1 680628

Jacob Salomon, Client Services, Informix Inc.
-- 
----------------Obligatory smart-$$$ remark:---------------------
| There's two kinds of people: Those who categorize people into |
| two groups and those who don't.   (Barth's Aging proverb.)    |
-----------------------------------------------jacob@informix.com
Newsgroups: comp.databases.informix