Save 
Join IIUG
 for   
 

Informix News
13 Jan 12 - MC Press online - Informix Dynamic Server Entices New Users with Free Production Edition ... Read
11 Jan 12 - Computerworld - Ecologic Analytics and Landis+Gyr -- Suitors Decide to Tie the Knot... Read
9 Jan 12 - planetIDS.com - DNS impact on Informix / Impacto do DNS no Informix... Read
8 Sep 11 - TMCnet.com - IBM Offers Database Solution to Enable Smart Meter Data Capture... Read
1 Aug 11 - IBM Data Management Magazine - IIUG user view: Happy 10th anniversary to IBM and Informix... Read
8 Jul 11 - Database Trends and Applications - Managing Time Series Data with Informix... Read
31 May 11 - Smart Grid - The meter data management pitfall utilities are overlooking... Read
27 May 11 - IBM Data Management Magazine - IIUG user view: Big data, big time ( Series data, warehouse acceleration, and 4GLs )... Read
16 May 11 - Business Wire - HiT Software Announces DBMoto for Enterprise Integration, Adds Informix. Log-based Change Data Capture... Read
21 Mar 11 - Yahoo! Finance - IBM and Cable&Wireless Worldwide Announce UK Smart Energy Cloud... Read
14 Mar 11 - MarketWatch - Fuzzy Logix and IBM Unveil In-Database Analytics for IBM Informix... Read
11 Mar 11 - InvestorPlace - It's Time to Give IBM Props: How many tech stocks are up 53% since the dot-com boom?... Read
9 Mar 11 - DBTA - Database Administration and the Goal of Diminishing Downtime... Read
2 Feb 11 - DBTAs - Informix 11.7 Flexible Grid Provides a Different Way of Looking at Database Servers... Read
27 Jan 11 - exactsolutions - Exact to Add Informix Support to Database Replay, SQL Monitoring Solutions... Read
25 Jan 11 - PR Newswire - Bank of China in the UK Works With IBM to Become a Smarter, Greener Bank... Read
12 Oct 10 - Database Trends and Applications - Informix 11.7: The Beginning of the Next Decade of IBM Informix... Read
20 Sep 10 - planetIDS.com - ITG analyst paper: Cost/Benefit case for IBM Informix as compared to Microsoft SQL Server... Read
20 Jul 10 - IBM Announcements - IBM Informix Choice Edition V11.50 helps deploy low-cost scalable and reliable solutions for Apple Macintosh and Microsoft Windows... Read
20 Jul 10 - IBM Announcements - Software withdrawal: Elite Support for Informix Ultimate-C Edition... Read
24 May 10 - eWeek Europe - IBM Supplies Database Tech For EU Smart Grid... Read
23 May 10 - SiliconIndia - IBM's smart metering system allows wise use of energy... Read
21 May 10 - CNET - IBM to help people monitor energy use... Read
20 May 10 - ebiz - IBM Teams With Hildebrand To Bring Smart Metering To Homes Across Britain... Read
19 May 10 - The New Blog Times - Misurare il consumo energetico: DEHEMS è pronto... Read
19 May 10 - ZDNet - IBM software in your home? Pact enables five-city smart meter pilot in Europe... Read
17 March 10 - ZDNet (blog) David Morgenstern - TCO: New research finds Macs in the enterprise easier, cheaper to manage than... Read
17 March 2010 - Virtualization Review - ...key components of Big Blue's platform to the commercial cloud such as its WebSphere suite of application ser vers and its DB2 and Informix databases... Read
10 February 2010 - The Wall Street Journal - International Business Machines is expanding an initiative to win over students and professors on its products. How do they lure the college crowd?... Read


End of Support Dates

IIUG on Facebook IIUG on Twitter


[ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Classics Forum

Re: Multiple columns of output on ACE

Posted By:
Date:

At the bottom of this email is how we did this.

- Joe Vigil

Jay Zwagerman wrote:
>
> Hello again
>
> I have another question about the ACE report. I currently have a report that prints out names and addresses on every row in the report. So the output is like this:
>
> Name
> Address1
> Address2
> City, State Zip
>
> Name
> Address1
> Address2
> City, State Zip
>
> and so on. I was wondering if it is possible to create this output in multiple columns like this
>
> Name Name Name
> Address1 Address1 Address1
> Address2 Address2 Address2
> City, State Zip City, State Zip City, State Zip
>
> Name "" ""
> Address1
> Address2
> City, State Zip
-----------------------------------------------------------------------
-- MULTI-COLUMN ACE OUTPUT
-----------------------------------------------------------------------
database avibank end

define
variable counter smallint
variable a_vendor_name char(30)
variable a_address1 char(30)
variable a_address2 char(30)
variable a_address3 char(30)
variable a_city char(25)
variable a_state char(2)
variable a_zip_code char(10)

variable b_vendor_name char(30)
variable b_address1 char(30)
variable b_address2 char(30)
variable b_address3 char(30)
variable b_city char(25)
variable b_state char(2)
variable b_zip_code char(10)

variable c_vendor_name char(30)
variable c_address1 char(30)
variable c_address2 char(30)
variable c_address3 char(30)
variable c_city char(25)
variable c_state char(2)
variable c_zip_code char(10)

variable d_vendor_name char(30)
variable d_address1 char(30)
variable d_address2 char(30)
variable d_address3 char(30)
variable d_city char(25)
variable d_state char(2)
variable d_zip_code char(10)
end

output
left margin 0
top margin 0
bottom margin 0
end

select vendor_name,
address1,
address2,
address3,
city,
state,
zip_code
from vndmst
order by vendor_name desc
end

format

first page header
let counter = 1
let a_vendor_name = " "
let a_address1 = " "
let a_address2 = " "
let a_address3 = " "
let a_city = " "
let a_state = " "
let a_zip_code = " "
let b_vendor_name = " "
let b_address1 = " "
let b_address2 = " "
let b_address3 = " "
let b_city = " "
let b_state = " "
let b_zip_code = " "

let c_vendor_name = " "
let c_address1 = " "
let c_address2 = " "
let c_address3 = " "
let c_city = " "
let c_state = " "
let c_zip_code = " "

let d_vendor_name = " "
let d_address1 = " "
let d_address2= " "
let d_address3= " "
let d_city = " "
let d_state = " "
let d_zip_code = " "

on every row

if counter = 4 then
begin
let d_vendor_name = vendor_name
let d_address1 = address1
let d_address1 = address1
let d_address1 = address1
let d_city = city
let d_state = state
let d_zip_code = zip_code

-- PRINTING GOES HERE

print column 1, a_vendor_name,
column 41, b_vendor_name,
column 84, c_vendor_name,
column 128, d_vendor_name
print column 1, a_address1,
column 41, b_address1,
column 84, c_address1,
column 128, d_address1
print column 1, a_address2,
column 41, b_address2,
column 84, c_address2,
column 128, d_address2
print column 1, a_address3,
column 41, b_address3,
column 84, c_address3,
column 128, d_address3
print column 1, a_city clipped, column 24, a_state,
column 27, a_zip_code,
column 41, b_city clipped, column 65, b_state,
column 68, b_zip_code,
column 84, c_city clipped, column 108, c_state,
column 111, c_zip_code,
column 128, d_city clipped, column 152, d_state,
column 155, d_zip_code
skip 1 line

let counter = 1
let a_vendor_name = " "
let a_address1 = " "
let a_address2 = " "
let a_address3 = " "
let a_city = " "
let a_state = " "
let a_zip_code = " "

let b_vendor_name = " "
let b_address1 = " "
let b_address2 = " "
let b_address3 = " "
let b_city = " "
let b_state = " "
let b_zip_code = " "

let c_vendor_name = " "
let c_address1 = " "
let c_address2 = " "
let c_address3 = " "
let c_city = " "
let c_state = " "
let c_zip_code = " "

let d_vendor_name = " "
let d_address1 = " "
let d_address2= " "
let d_address3= " "
let d_city = " "
let d_state = " "
let d_zip_code = " "
end
if counter = 3 then
begin
let c_vendor_name = vendor_name
let c_address1 = address1
let c_address1 = address1
let c_address1 = address1
let c_city = city
let c_state = state
let c_zip_code = zip_code
let counter= counter+ 1
end
if counter = 2 then
begin
let b_vendor_name = vendor_name
let b_address1 = address1
let b_address1 = address1
let b_address1 = address1
let b_city = city
let b_state = state
let b_zip_code = zip_code
let counter= counter+ 1
end
if counter = 1 then
begin
let a_vendor_name = vendor_name
let a_address1 = address1
let a_address1 = address1
let a_address1 = address1
let a_city = city
let a_state = state
let a_zip_code = zip_code
let counter = counter + 1
end
end

------------------------------------------------------------------
This message, including any attachments, contains confidential
information intended only for a specific individual and purpose.
It contains information which is private and legally protected by
law. If you are not the intended recipient, please contact the
sender immediately by reply e-mail and destroy all copies. You
are hereby notified that any disclosure, copying, distribution or
use of the contents of this transmission, or the taking of any
action or reliance thereon, is strictly prohibited.
------------------------------------------------------------------

Messages In This Thread

[ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Classics Forum is maintained by Administrator with WebBBS 5.12.