View this email as a Web page Please add System iNetwork RPG Coder to your Safe Sender list.

System iNetwork
Network Home Forums Archive Join the Network Contact Us
System iNetwork RPG Coder
Issue 62
February 04, 2010
RJS Software Systems
RJS
Software Systems Make your office paperless and more productive! With WebDocs you can electronically store, manage and distribute invoices, purchase orders, spool files, PC data, emails, faxes and more. Think of WebDocs as an electronic filing cabinet that allows you to securely access and share information from anywhere. Visit us at www.rjssoftware.com or call us at 1-888-RJS-SOFT for a FREE 30-day demo.

Passing Variable-Length Parameters to Subprocedures
By Bob Cozzi

In RPG, there is a subtle but important difference between the VARYING keyword that is used to assign a variable-length attribute to a character field and the OPTIONS(*VARSIZE) keyword that is used to permit a variable of any length to be passed as a parameter to a subprocedure or program. Often these two different features are referred to as variable-length field or variable-length parameter. So confusing is this that many people refer to variable-length fields as varying fields to more closely associate them with their keyword attribute. This week I explain the benefits of and differences between using these keywords with parameters. *Read more...


SystemiNetwork
House
Ad

Evaluate your System i security!
Provide us with some quick information and you'll earn a chance at winning an Apple iPod Touch 8GB, 3rd Gen. Start here!




On the Web

What do we need to do to bridge the communications gap between technology and business leaders in today's organizations? Perhaps IT should become more service-aligned or more business-aligned. Read Sean Chandler's thoughts on the subject in the February System iNEWS article, "Checking Your IT/Business Alignment."


Cozzi's Corner

Join Bob Cozzi in March for a Seminar on Modernizing Your RPG Skills

Most RPG programmers want to know how to access the IFS, most want to know the best practices when using free-format, most want to know how to open and process an XML file in RPG IV.

For just $199 you can be that kind of programmer. Attend Bob Cozzi's 1-day seminar "Modernizing RPG IV Programming Skills". Learn more here...

Why avoid modernizing your programming staff? Why avoid updating your own skill set? Why spend $1000+ for a multi-day conference when you get everything you need for $199?

Do yourself a favor, send your entire programming staff to this seminar. But hurry, its just a few weeks away, and space is limited at each location. We've scheduled the following two cities exclusively:

  • Phoenix/Scottsdale, Arizona - March 2, 2010
  • ChicagoLand (Lombard) - March 16, 2010

More details are listed below or visit the Seminar website www.RPGWorld.com/academy to register today.

This is a power-packed Seminar where RPG Programmers receive the kind of training they need to compete in today's world. Taught by the guy that wrote the book on RPG and RPG IV, Bob Cozzi.

Registration Fee: $199 if you register before March 1st ($299 thereafter)

  • 8:00 to 9:15 Free Format -- Ground Breaking Techniques You Can Use Today
  • 9:45 to 11:00 Free Format How-To Techniques for everyday use
  • 11:00 to 12:15 Advanced RPG IV Free Format Coding with Subprocedures and APIs
  • 1:00 to 2:15 Using the IFS within RPG IV and free-format
  • 2:30 to 3:45 Embedded SQL in Free Format for Database I/O
  • 4:00 to 5:00 Question and Answer Working Group

Seminar Description

This seminar will be customized to the audience level, as necessary. However, we find that most people like the concise, accurate, real-world skill set introduced to them.

Free Format - Ground Breaking Techniques You Can Use Today

Moving to Free-format RPG IV can be an interesting experience. Whether you've never coded it before, written a routine or two or have been writing free-format for years, there are always issues when migrating legacy code. In this session, but illustrates the Free-Format syntax rules, compares existing fixed-format to free-format, and gives you tips about how to convert code such as Date arithmetic, normal math, and even those Indicatory results to free format. In addition an overall coding style and structure are  recommended that can be taken back and shared with the rest of the programming staff.

Free Format How-To Techniques for Everyday Use

Most fixed-format RPG IV converts handily to free-format. But what do you when you run into a MOVE Numeric-to-Character opcode? What about the other way round? How are these types of coding issues handled in free-format? Bob Cozzi has been doing this a long time. He's solved just about every issue that's come up with simple, easy to follow alternatives. Some are direct but not obvious, some require a user-written subprocedure (provided in the seminar handout), and some require an understanding of how things work. Don't worry, its all in there, and Cozzi makes it look easy.

Advanced RPG IV Free-format Coding with Subprocedures and APIs

In this Modern RPG world, simply reading from a database and writing to a subfile isn't the only game in town. In this session Cozzi shows you how to leverage tools that you already own but may not know about. Including how to incorporate them into your own toolbox for easy access by everyone. Accessing C, MI and system APIs is presented along with wrapping things in user-written subprocedures to help make them as easy to use as possible.

Using the IFS with RPG IV Free-Format

Why let those PC hacks have all the fun. Why not read PC-files in RPG and processing them all in one location--the most reliable place on Earth--your System i. In this session, Cozzi shows you how to set up a /COPY that allows you to open, reading, write, and close IFS files as easily as normal Database files. Oh yes, it can be done, and it can be very easy. Need to know how to list the files in an IFS directory, then open each one of those files and read their XML data into RPG IV and then write it to a database file? You will know how to do this after attending this session.

Embedded SQL in Free-Format

Cozzi never enjoyed using embedded SQL in fixed-format RPG. But embedded SQL in free-format RPG is, well... sexy. In this session, Cozzi shows you how cool it is to code embedded SQL in free-format, so much so that you may abandon regular File Specs forever.

Question and Answer Work Group

This is your time to ask Bob Cozzi questions about free-format RPG IV and related technologies. From a refresher on who to declare and use return values correctly, to using RDi over SEU, to that unique free-format embedded SQL syntax you're unsure about, or even an XML parsing question. This is your time to find out what you never knew you never knew.


Sign Up for Other System iNetwork Newsletters!
Enter Your E-mail Address:

System iNetwork Programming Tips Technical tips for System i software analysts and developers, which is sent the second and fourth Thursdays of each month.

System iNetwork Systems Management Technical tips, insight, and utilities for configuration, performance, security, and other operational topics, which is sent on alternating Wednesdays.

NEWS Daily System i-related news and announcements Monday–Thursday.

My i - .NET Monthly e-mail newsletter presenting technical articles, how-to guides, tips, and case studies on the integration of .NET applications.

Sign-up form doesn't work? Subscribe at System iNetwork.com

Thank you to our sponsor:
RJS Software Systems

sponsorArray[1].sponsorName

sponsorArray[2].sponsorName

From System iNetwork
e-Learning

Feb 24 -- Introduction to Microsoft .NET Programming for System i Applications
Learn about the Microsoft development environment with practical examples of how to use Microsoft .NET technologies to develop iSeries/System i applications.



Contact Unsubscribe Advertise Submit Press Release

You are subscribed as: #email# (not #email# ? Subscribe Now.)

To unsubscribe from this e–mail please click here.

For questions, comments, or reader feedback about an item covered in System iNetwork RPG Coder, or if you have a technical question, please e–mail Bob Cozzi. You can also post technical questions in the SystemiNetwork.com forums.

Copyright 2009 | System iNetwork | Penton Media | 221 E 29th St. | Loveland, CO 80538 | Privacy Policy

"System i" is a trademark of International Business Machines (IBM) Corporation and is used by Penton Media, Inc., under license. System iNEWS, SystemiNetwork.com, and the SystemiNetwork.com newsletters are published independently of IBM, which is not responsible in any way for the content. Penton Media, Inc., is solely responsible for the editorial content and control of System iNEWS, SystemiNetwork.com, and the SystemiNetwork.com newsletters.