Você está na página 1de 7

How Flexible are Your Calculations?

| IBM i | IBM Systems Magazine

1 of 7

http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/17069p4.aspx

Administrator
Backup and Recovery
DB2
High Availability
LPAR
Networks
Performance
Security
Systems Management
Tivoli
Trends
AIX
Linux
Open Source
What's New
Tips & Techniques
Application Development
Systems Management
Miscellaneous
Case Studies
Automotive
Healthcare
Manufacturing
Miscellaneous
Non-profit
Retail
Storage
Disk
Servers
Software
Tape
Product News
Buyer's Guide
Administrator
Backup and Recovery
DB2
Domino
High Availability
LPAR
Networks
Performance
Printing
Security
Systems Management
WebSphere
Windows Integration
Developer
General
Java
Modernization
RPG
WebSphere
Trends
IBM Announcements
Linux
Open Source
SOA
What's New

9/27/2010 9:12 AM

How Flexible are Your Calculations? | IBM i | IBM Systems Magazine

2 of 7

http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/17069p4.aspx

Case Studies
Automotive
Banking/Finance
Healthcare
Insurance
Manufacturing
Miscellaneous
Non-profit
Retail
Storage
Disk
Optical
Servers
Tape
Product News
Product Reviews
ENDPGM Main Page
Administrator
Backup and Recovery
CICS
DB2
High Availability
IMS
LPAR
Migration
Networks
Performance
Security
Systems Management
Tivoli
Trends
Linux
Open Source
Security
SOA
What's New
z/OS
z/VM
Tips & Techniques
Application Development
Systems Management
Case Studies
Automotive
Banking/Finance
Healthcare
Insurance
Manufacturing
Miscellaneous
Retail
Storage
Disk
Servers
Software
Tape
Product News
Stop Run
Buyer's Guide Main Page

9/27/2010 9:12 AM

How Flexible are Your Calculations? | IBM i | IBM Systems Magazine

3 of 7

http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/17069p4.aspx

Business Strategy
Competitive Advantage
Consolidation
Executive Perspective
Green IT
Migration
Open Source
ROI
Infrastructure
Blades
Storage
Systems Management
Case Studies
Distribution
Healthcare
Manufacturing
Services
Web 2.0
Cloud
Social Media
Trends
Collaboration
IBM Announcements
IBM Research
Open Source
Social Media
What's New
Product News

AIX
MAINFRAME
POWER
Newsletters
About Us

Subscribe
Current Issue
Archive

IBM i
ALL EDITIONS
ADMINISTRATOR
DEVELOPER
TRENDS
TIPS & TECHNIQUES
CASE STUDIES

9/27/2010 9:12 AM

How Flexible are Your Calculations? | IBM i | IBM Systems Magazine

4 of 7

http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/17069p4.aspx

STORAGE
PRODUCT NEWS
ENDPGM
BUYER'S GUIDE

Developer > RPG

How Flexible are Your Calculations?


RPG programming techniques to help you solve unsolvable problems.
September 2007 | by Jon Paris and Susan Gantner

Print

Email

To accommodate this, well need to copy the data from the original variable into one that matches the common definition shared by the calculation
subprocedures. Once we accept that necessity, we can set up the names of the variables and their pointers in matching arrays, much as we did with
the procedure pointers and the operation codes. Given that our example program uses the simple variable names A, B, C and D, the three sets of data
look like this:

Notice that to simplify changes in the future, weve defined a single variable named number, which is referenced via the LIKE keyword when
defining the numeric variables to be used in the calculations. By defining fields this way, it becomes simple to change the program to process values
larger than the 15,5 packed fields currently supported, should we need to do so later.
Next page: >>

9/27/2010 9:12 AM

How Flexible are Your Calculations? | IBM i | IBM Systems Magazine

5 of 7

http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/17069p4.aspx

Page 1 2 3 4 5 6
Jon Paris is a technical editor with IBM Systems Magazine and co-owner of Partner400.
More Articles From Jon Paris
Susan Gantner is a technical editor with IBM Systems Magazine and co-owner of Partner400.
More Articles From Susan Gantner

Advertisement

WEBINAR
Thursday, September 30 2pm (ET) from LANSA
IBM i Enterprise Web Development ---- Fact or Fiction?

Browse products and services for Developer.

Advertisement

9/27/2010 9:12 AM

How Flexible are Your Calculations? | IBM i | IBM Systems Magazine

6 of 7

http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/17069p4.aspx

Maximize your IT investment with monthly information from THE source...IBM Systems Magazine EXTRA & Marketplace eNewsletters.
SUBSCRIBE NOW.
View past IBM i EXTRAs here

Related Articles
Even More Flexible Calculations
E-Newsletter Exclusive | In the September EXTRA e-Newsletter, Jon Paris and Susan Gantner shared some solutions to &qout;unsolvable&qout;
RPG problems with a technique for flexible calculations. Now they delve deeper with a more complex example, making a sequence of calculations
not only possible but simple to create and use.
RPG - Anchoring Your Team
Cover Story | Alternate approaches to extending your RPG applications.
The State of Modernization
Cover Story | Bruce Vining talks modernization with Jon Paris and Susan Gantner
RPG for the Web

9/27/2010 9:12 AM

How Flexible are Your Calculations? | IBM i | IBM Systems Magazine

7 of 7

http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/17069p4.aspx

iSeries EXTRA: By Now, the Case for RPG IV Should Be a No-Brainer


E-Newsletter Exclusive
IBM i
AIX
MAINFRAME
POWER
Homepage
About Us
Contact Us
Subscriptions
Editorial Calendar
Advertise With Us
Reprints
Privacy Policy
Terms of Service
Sitemap
IBM Systems Magazine is a trademark of International Business Machines Corporation. The editorial content of IBM Systems Magazine is placed on
this website by MSP TechMedia under license from International Business Machines Corporation.
2010 MSP Communications, Inc. All rights reserved

9/27/2010 9:12 AM

Você também pode gostar