Hi Markus.
I finally got around to trying your SQL What's with all the concatenation operations? And the :: Type-casting? All for nice columns? Leave that to the spreadsheet (or my beautify-unl.pl script.) Whatever the real problem is, I keep getting this error:
1207: Converted value does not fit into the allotted space
A noncharacter value, after conversion to a character string, is too
long to fit in the buffer that was provided.
Suppose I try it without concatenating columns: I still got the same error. Then I took out the width type-casting operators like :: CHAR(6) . The the query ran. Now I need to ask: What's with the constant "1" and the two dash columns? That's actually a question for Informix, not for you; those columns appear as such in the ixbar file, except that there are log backups running every couple minutes so the query will never quite match the ixbar file regenerated days or weeks ago. Here's my updated, working version of that query, formatted according to MY tastes :-):
-- In database sysutils
--
SELECT o.obj_srv_name[1,18], -- INFORIMXSERVER
o.obj_name[1,18], -- logical log number or dbspace name
o.obj_type, -- R = rootdbs, L = logical log,
-- CD = critical dbspace, ND = nonciritical
-- dbspace or sbspace, B == blobspace
CASE
WHEN a.act_type = 1 THEN 0 -- 1 = backup
WHEN a.act_type = 5 THEN 1 -- 5 = whole-system backup
END as action_type,
a.act_aid,
i.ins_level, -- level of backup: 0, 1, or 2
i.ins_copyid_hi,
i.ins_copyid_lo,
a.act_start,
1 as one,
i.ins_first_log,
i.rsam_time,
i.ins_req_aid,
i.ins_logstream,
"- " as dash1,
"- " as dash2,
i.ins_chpt_log,
i.seal_time,
i.prev_seal_time,
i.ins_backup_order
FROM bar_object o, bar_action a, bar_instance i
WHERE o.obj_oid = a.act_oid
AND a.act_aid = i.ins_aid
AND o.obj_oid = i.ins_oid
AND a.act_type IN (1,5)
ORDER BY a.act_aid, i.ins_backup_order;
Hopefully this will stay nicely formatted when it displays for you.
You bet I'm saving this in my directories! THANKS SO MUCH!
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
Original Message:
Sent: Mon March 24, 2025 07:18 AM
From: Markus Holzbauer
Subject: Columns in ixbar file
Hello Jacob,
I had a script that generate ixbar file from sysutils (in case of onsmsync will not do that).
Works for me with Version 14 / should also work with Version 12.
#!/bin/shDBACCESS_COLUMNS=186; export DBACCESS_COLUMNSdbaccess sysutils - 2>/dev/null <<EOF | awk '{if($0!~/^$/){printf("%-168s\n",$0)}}'OUTPUT TO PIPE "/bin/cat" WITHOUT HEADINGS SELECT o.obj_srv_name[1,18]::CHAR(19) || -- INFORIMXSERVER o.obj_name[1,18]::CHAR(19) || -- logical log number or dbspace name o.obj_type::CHAR(3) || -- R == rootdbs, L = logical log, CD == critical dbspace -- ND == nonciritical dbspace or sbspace, B == blobspace CASE WHEN a.act_type = 1 THEN 0 -- 1 == backup WHEN a.act_type = 5 THEN 1 -- 5 == whole-system backup END || " " || a.act_aid::CHAR(6) || i.ins_level::CHAR(2) || -- level of backup / 0 == full backup, 1/2 diff to prev level i.ins_copyid_hi::CHAR(11) || i.ins_copyid_lo::CHAR(11) || a.act_start::CHAR(20) || 1::CHAR(6) || i.ins_first_log::CHAR(6) || i.rsam_time::CHAR(12) || i.ins_req_aid::CHAR(6) || i.ins_logstream::CHAR(6) || "- " || "- " || i.ins_chpt_log::CHAR(6) || i.seal_time::CHAR(12) || i.prev_seal_time::CHAR(12) || i.ins_backup_order FROM bar_object o, bar_action a, bar_instance i WHERE o.obj_oid = a.act_oid AND a.act_aid = i.ins_aid AND o.obj_oid = i.ins_oid AND a.act_type IN (1,5) ORDER BY a.act_aid, i.ins_backup_order;EOF
HTH
Cheers,
Markus
------------------------------
Markus Holzbauer
------------------------------