• Complain

Mark McCall - The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer

Here you can read online Mark McCall - The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2016, publisher: MC Press, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Mark McCall The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer
  • Book:
    The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer
  • Author:
  • Publisher:
    MC Press
  • Genre:
  • Year:
    2016
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Both a programming tool and a source for development assistance, this book and companion CD contain more than 70 prototypical techniques and coding examples that can be used and adapted for hundreds of applications and offers a thorough line-by-line explanation of each of the techniques employed. From system APIs to SQL, the material presented encompasses the most useful and powerful features of the AS/400. Designed to work as a functional programming tool, each example is presented as a self-contained instrument, allowing programmers to access information quickly and easily.

Mark McCall: author's other books


Who wrote The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer? Find out the surname, the name of the author of the book and a list of all author's works by series.

The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make

First Edition First PrintingApril 2000 Every attempt has been made to provide - photo 1

First Edition First PrintingApril 2000 Every attempt has been made to provide - photo 2

First Edition First

PrintingApril 2000

Every attempt has been made to provide correct information. However, the publisher and the author do not guarantee the accuracy of the book and do not assume responsibility for information included in or omitted from it.

IBM is a registered trademark, and AS/400, OS/400, and 400 are trademarks of International Business Machines Corporation. All other product names are trademarked or copyrighted by their respective manufacturers.

Printed in the United States of America. All rights reserved. No part of this publication may be reproduced in any form without prior permission of the copyright owner.

2000 Midrange Computing
ISBN: 1-58347-012-3

Midrange Computing
5650 El Camino Real, Suite 225
Carlsbad, CA 920089711 USA
www.midrangecomputing.com

For information on translations or book distributors outside the USA or to arrange bulk-purchase discounts for sales promotions, premiums, or fund-raisers, please contact Midrange Computing at the above address.

To DAnna, Andrew, and Kevin McCall.
Thank you for all your support and encouragement.

A CKNOWLEDGMENTS

I would like to express my most sincere appreciation to the following people for their assistance in the creation of this book:

  • DAnna McCall
  • Chris Peters
  • David Morris
  • Jim Utsler
  • Merrikay Lee
  • Steven Bolt
C ONTENTS
I NTRODUCTION

W hile collecting material for the first AS/400 Programmers Handbook, I quickly realized that the sheer volume of information was far more than I could present within a single text. As time passed, I found myself thinking, I wish I could have included database examples like SQL and trigger programs and I wish I had put in more API examples. I finally came to the realization that a sequel was in order.

When developing applications, I find myself drawing from a collection of coding examples as a starting point or template. Rarely will I begin writing a new application from scratch without having a previously written source member from which to draw on. This book is a collection of more than 70 prototypical techniques and coding examples that you can use and adapt for hundreds of potential applications. The material presented here encompasses the most useful and powerful features of the AS/400, and each example is backed by a thorough explanation of the techniques employed.

Each example begins with a quick synopsis that is followed by the supporting source code. This structure allows you to quickly get in, find what you need, and use the example code. If you need more information, detailed explanations of the employed technique are included.

Every effort has been made to make each example stand on its own. This makes some of the information redundant, but the last thing you want to do when you need an example is to have to read other chapters to build an understanding of the topic. Whenever possible, every example is designed to work as a standalone instrument to allow you get in, get what you need, and get back to work.

I hope you will find this book to be a useful and valuable programming tool.

Part 1
RPG Programming Examples

T he vast majority of AS/400 application software continues to be written in RPG. However, the RPG of today is barely recognizable from that used several years ago. RPG has evolved from a language encumbered by its rigid structure to a far more dynamic and flexible tool. The advent of ILE RPG, sometimes called RPG IV, has breathed new life into a tired language.

ILE RPG allows you to do things you simply cant do with RPG/400. For this reason, all of the RPG examples presented here use ILE RPG. The contents of this section include:

1
M ODULAR C ODING T ECHNIQUES

I n programming, much of what is done is redundant, a fact that seasoned programmers who have been in the trenches for many years are well aware of. By the time a programmer has been on the job for more than a couple of years, he or she probably does more copying and adapting of code that already exists than writing new code from scratch. It is simply more efficient to leverage work that has already been done than to start from scratch every time. This technique of reusing and reapplying work that has already been done can lead to tremendous gains in productivity.

Another major benefit of reusing software components is reliability. Modular components are easier to test more thoroughly than full applications. Once tested and verified to work correctly, a component can be reused without being fully retested.

When thinking about designing code that can be used and reused throughout an application, one must maintain a balance between achieving modularity and maintaining acceptable performance levels.

C OMMON M ODULAR RPG C ODING T ECHNIQUES

The introduction of the Integrated Language Environment (ILE) for RPG empowered the language with the tools necessary for building reusable component-based software. ILE allows you to call on services from external providers without suffering from the poor performance that plagues dynamic program calls. Prior to ILE, the ability to build component-based software relied strictly on dynamic program calls or methods of sharing source code.

This chapter presents examples based on a variety of modular or component-based design techniques. The following is a list of todays most commonly used techniques to reuse software in RPG on the AS/400:

  • /C OPY compiler directives
  • Internal subroutines
  • External subprograms
  • ILE subprocedures
  • ILE service programs
E XAMPLE
Using the /C OPY Compiler Directive

This example employs the /COPY compiler directive to copy source code from a central repository, often called a copybook, into a desired program. This technique of reusing source code is one of the oldest available to AS/400 programmers. While this technique has become outdated for many applications, copybooks remain an effective tool for storing ILE Procedure Interface definitions. The example takes a common generic programming task, determining the day of week for a given date, and deposits the code into a copybook, where it can be used by multiple programmers in multiple programs.

W HAT THE E XAMPLE D OES

The example consists of three source members. Members MOD002R and MOD003R contain copybook source that determines the day of week for a given date. Member MOD001R employs the copybooks using the /COPY directive. The mainline program logic in MOD001R accepts a date as an input parameter, then uses the copied source to determine the dates show the copybook source members.

Listing 1.1: ILE RPG member MOD001R uses /COPY compiler directives.

Listing 12 ILE RPG member MOD002R D-spec copybook Listing 13 ILE - photo 3

Listing 1.2: ILE RPG member MOD002R D-spec copybook.

Listing 13 ILE RPG member MOD003R C-spec copybook H OW THE E XAMPLE W - photo 4

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer»

Look at similar books to The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer»

Discussion, reviews of the book The AS/400 Programmers Handbook, Volume II: More Toolbox Examples for Every AS/400 Programmer and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.