Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Roger asked how to make sysextents output in IDS 9.4 look like the 7.x layout. Jonathan Leffler said longer names make it impossible to fit easily and suggested ACE, SQLCMD with fixsep format, or casting to CHAR(18). John Miller offered a query combining chunk and offset into an INT8; Bernhard Gramberg suggested substrings like dbsname[1,20].
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Hi informixer,
I issue a SQL command in ids9.4:
database sysmaster;
select * from sysextents; the output look like :
dbsname rootdbs
tabname TBLSpace
start 1048589
size 50
How can I make the ouput format like ids 7.x :
dbsname tabname start size
rootdbs TBLSpace 1048589 50
rootdbs TBLSpace 1171277 50
roger
roger@star2000.com.tw wrote:
> I issue a SQL command in ids9.4:
> database sysmaster;
> select * from sysextents;> the output look like :
> dbsname rootdbs
> tabname TBLSpace
> start 1048589
> size 50
>
> How can I make the ouput format like ids 7.x :
>
> dbsname tabname start size
>
> rootdbs TBLSpace 1048589 50
> rootdbs TBLSpace 1171277 50
You can't easily. IDS 9.40 has 32-character user names and
128-character table and database names, so the data doesn't fit across
the page in 9.40 like it did in 7.31.
If you want reliably formatted output, either use a reporting tool like
ACE (part of ISQL) or use a tool like SQLCMD (IIUG Software Archive)
that has always generated across the page formats. You probably want to
use the fixsep format (fixed width fields, separated).
Alternatively, but not reliably, cast the dbsname and tabname values to
CHAR(18) for compatibility with 7.31.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
↪ replying to roger@star2000.com.tw
John Miller — — source: Usenet: comp.databases.informix
I believe this will get something close, but the names maybe truncated.
This is run in version 10 so I combine the chunk and offset into an
int8.
John
select
(trim(dbsname)||'.'||trim(tabname))::char(48),
chunk::int8*4294967295+offset as start, size
from sysextents
roger@star2000.com.tw wrote:
> Hi informixer,
> I issue a SQL command in ids9.4:
> database sysmaster;
> select * from sysextents;> the output look like :
> dbsname rootdbs
> tabname TBLSpace
> start 1048589
> size 50
>
> How can I make the ouput format like ids 7.x :
>
> dbsname tabname start size
>
> rootdbs TBLSpace 1048589 50
> rootdbs TBLSpace 1171277 50
>
> roger
>
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.