Save 
Join IIUG
 for   
 

Informix News
29 July 09 - Wall Street Journal - IBM to Acquire SPSS, Adding to Acquisitions... Read
11 February 09 - InformationWeek - IBM Drifts Slowly Toward Mainstream Cloud Computing... Read
11 February 09 - CNNMoney.com - IBM to Deliver Software via Cloud Computing With Amazon Web Services... Read
07 January 09 - Huliq News - IBM Power Servers Helps Bank of Chengdu Build Up Core Banking System.. Read
04 December 08 - Steeleye - Multicarta achieves 99.997% uptime for its Informix-based Credit Card Authorization Centre... Read
16 October 08 - VendorRate - Informix Earns Top Customer Satisfaction Score on VendorRate in Q3... Read
14 August 08 - IIUG.org - Sellout Expected for the 2009 IIUG Informix Conference... Read
29 April 08 - IntelligentEnterprise.com - IBM Informix Upgrade Enhances Clustering, Database Management... Read
29 April 08 - itweek.com - IBM 'Cheetah 2' mauls data costs... Read
28 April 08 - eWeek.com - IBM Uncages Cheetah 2 Data Server... Read
28 April 08 - CNNMoney.com - IBM Helps Clients Reduce Data Management Costs With New Informix Dynamic Server... Read
09 April 08 - CNNMoney.com - MediaSpan Embeds IBM Informix Dynamic Server Software for Delivering News to Print, Web and Wireless Devices... Read
08 April 08 - IT-Director.com - Informix seeks developers... Read
18 February 08 - marketwire.com - Icarus Studios Partners With IBM to Upgrade Performance, Availability for Its Online Games... Read
17 January 08 - eWeek.com - IBM Adds Mac Support to IDS for Higher Education... Read
17 January 08 - informationweek.com - Lotus Notes For iPhone Signals Closer Ties Between IBM, Apple... Read
16 January 08 - marketwire.com - IBM Informix Dynamic Server to Deliver Support for Mac OS X... Read
16 January 08 - internetnews.com - IBM's IDS to Support Mac Platform... Read
28 June 07 - REG Developer - IBM and Informix tie down Cheetah... Read
27 June 07 - CBRonline.com - IBM corrects its own Informix customer figures... Read
14 June 07 - vnunet.com - IBM changes spots with Informix 'Cheetah' database... Read
14 June 07 - eChannelLine - IBM expands scope for IDS... Read
14 June 07 - Resellernews - IBM: Informix database alive and kicking... Read
13 June 07 - DB2 Magazine - Cheetah is now out of the gate... Read
12 June 07 - IBM - IDS 11 release announcement (pdf)... Read
12 June 07 - ChannelWeb Network - IBM Uncages IDS 11, Aka Cheetah, Database... Read
12 June 07 - eWeek.com - IBM's 'Cheetah' Ready to Pounce... Read
12 June 07 - InformationWeek - IBM Unleashes 'Cheetah' Database... Read
12 June 07 - WebWire - IBM Strengthens Database Portfolio With New Informix Dynamic Server... Read
12 June 07 - Intelligent Enterprise - IBM Unveils Informix Upgrade... Read
12 June 07 - ComputerWeekly.com - IBM's Cheetah IDS makes leap to better data centre clustering... Read
12 June 07 - ebiz - IBM Unveils Next Generation Informix Dynamic Server... Read
12 June 07 - computerworld.com - Will 'Cheetah' help IBM's Informix chase down market share?... Read
12 June 07 - Internetnews.com - No Data Can Outrun This 'Cheetah'... Read
12 June 07 - de.internet.com - IBM neuer Datenbank-Server mit Codenamen Cheetah ist fertig... Read
12 June 07 - verifox.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - golem.de - Informix 11 vorgestellt... Read
12 June 07 - Computerwoche.de - IBM stellt neue Informix-Version vor... Read
12 June 07 - IBM.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - Heise - IBM gibt Informix 11 frei... Read
25 May 07 - Taiwan.CNET.com - Local Taiwan Informix user group established... (Chinese language) ... Read
18 May 07 - ChannelWeb Network - IBM Musters Partners For Cheetah Release... Read
18 May 07 - eWeek.com - IBM Looks to 'Cheetah' to Speed Up Blade Servers... Read
7 May 07 - DB2 Magazine - SQL Shortcuts - Use these tricks to generate IDS SQL scripts... Read


End of Support Dates

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

Classics Forum

RE: Multiple columns of output on ACE

Posted By:
Date:

I did not realize that attachments do not post. Here is a slightly more
elegant solution that uses arrays (actually subscripts).

And yes, you must have a last row to flush out the last records.

Regards,
Rich

email: rghiz@attbi.com


{==========================================================================}
{ }
{ File: labels.ace - Mailing Label Specification }

{ }
{==========================================================================}
{ Author: R. Ghiz }
{ Date: 01/21/93 }
{ This report prints 1-2 mailing labels across a page. It stores the }

{ labels in character strings (array1 thru array7) as it reads each row, }
{ and prints the labels when it has read the proper number of rows. }
{ At run time, user specifies the date to be used as selection }

{ criteria. }
{ Notes: }
{ Designed to print on 1-1/3" x 4.0" label stock }
{ Modifications: }

DATABASE minx100 END

DEFINE
VARIABLE cst char(43) {holds city, state, zip}
VARIABLE country CHAR(15) {variable for country}
VARIABLE array1 char(84) {Array for Rep., Cust ID}
VARIABLE array2 char(84) {Array for contact}
VARIABLE array3 char(84) {Array for company}
VARIABLE array4 char(84) {Array for address line 1}
VARIABLE array5 char(84) {Array for address line 2}
VARIABLE array6 char(84) {Array for city, state, zip}
VARIABLE array7 char(84) {Array for country}
VARIABLE start smallint {start of current label in
array}
VARIABLE finish smallint {end of current label in array}
VARIABLE l_size smallint {label width}
VARIABLE white smallint {spaces between each label}
VARIABLE count1 smallint {number of labels across page}
VARIABLE i smallint {label counter}
VARIABLE pg_count smallint {page counter}
VARIABLE bg_date DATE {date criteria}
END

INPUT
PROMPT FOR bg_date USING
"Enter Customer Review Date for search (mm/dd/yyyy)?"
END

OUTPUT
TOP MARGIN 2
BOTTOM MARGIN 0
LEFT MARGIN 0
PAGE LENGTH 60
REPORT TO "/var/tmp/labels.out"
END

SELECT
cust, {customer ID 10A}
arname, {customer name 30A}
aradr1, {address line 1 30A}
aradr2, {address line 2}
arcity, {city 20A}
arstat, {state 10A}
arzip, {zip code 10A}
arctry, {country 15A}
arcont, {customer contact 15A}
arcat, {customer category, to be used for BG code}
arsale, {sales rep. ID 10A}
arnoten, {note code used for source}
arcdat {credit review date, to be used for BG date}
FROM
arcust
WHERE arcdat = $bg_date AND
arcat = "bg"
ORDER BY arzip
END

FORMAT
FIRST PAGE HEADER

{ Nothing is displayed in this control block. It just initializes
variables that are used in the ON EVERY ROW control block }

LET count1 = 2 {# of labels across page, 2 up}
{count1=3 for 3 up}
LET i = 1 {Initialize label counter.}
LET l_size = 80/count1 {Determine label width (allow
five spaces total between labels) }
LET white = 5/count1 {Divide the five spaces between
the number of labels across the
page.}
LET pg_count = 1 {Init. no of labels on page}

ON EVERY ROW
IF arctry = "U.S.A." OR arctry = "USA" THEN
BEGIN
LET country = " "
LET cst = arcity CLIPPED, ", ", arstat CLIPPED, " ",
arzip CLIPPED
END
ELSE
BEGIN
LET country = arctry
LET cst = arcity CLIPPED, " ", arstat CLIPPED, " ",
arzip CLIPPED
END

LET finish = i * (l_size + white)
IF i = 1 THEN {force start for each label}
LET start = 2
ELSE
LET start = 44


{ This section assigns names, companies, addresses and zip codes
to arrays 1 thru 7 until i = the number of labels across a page }

LET array1[start, finish] = arnoten, "*", arsale
LET array1[finish - 15, finish] = cust
LET array2[start, finish] = arcont {contact}
LET array3[start, finish] = arname {company}

IF aradr1 = " " THEN {move lines up one if
1st}
BEGIN {address line is blank}
LET array4[start, finish] = aradr2
LET array5[start, finish] = cst
LET array6[start, finish] = country
LET array7[start, finish] = " "
END
ELSE
IF aradr2 = " " THEN {move lines up one if
2nd}
BEGIN {address line is blank}
LET array4[start, finish] = aradr1
LET array5[start, finish] = cst
LET array6[start, finish] = country
LET array7[start, finish] = " "
END
ELSE
BEGIN {print all address lines}
LET array4[start, finish] = aradr1
LET array5[start, finish] = aradr2
LET array6[start, finish] = cst
LET array7[start, finish] = country
END

IF i = count1 THEN
BEGIN
PRINT array1 CLIPPED {Print Rep. and Cust ID}
PRINT array2 CLIPPED {Print contact}
PRINT array3 CLIPPED {Print company}
PRINT array4 CLIPPED {Use clipped to remove trailing}
PRINT array5 CLIPPED {spaces for quicker printing.}
PRINT array6 CLIPPED
PRINT array7 CLIPPED
SKIP 1 LINE
LET array1 = " " {Reset the arrays to spaces.}
LET array2 = " "
LET array3 = " "
LET array4 = " "
LET array5 = " "
LET array6 = " "
LET array7 = " "
LET i = 1
LET pg_count = pg_count + 1 {increment # of lables}

IF pg_count > 7 THEN
BEGIN
SKIP TO TOP OF PAGE
LET pg_count = 1
END

END
ELSE
LET i = i + 1

ON LAST ROW
IF i > 1 {Print the last set of addresses}
THEN
BEGIN {if there were any left.}
PRINT array1 CLIPPED
PRINT array2 CLIPPED
PRINT array3 CLIPPED
PRINT array4 CLIPPED
PRINT array5 CLIPPED
PRINT array6 CLIPPED
PRINT array7 CLIPPED

LET pg_count = pg_count + 1
IF pg_count > 7 THEN
BEGIN
SKIP TO TOP OF PAGE
LET pg_count = 1
END

END
END

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.