MC Press Online
Welcome to the MC Press Online!
Need help with our eBooks?
Contact PublishersRow.com
Click here, to go to our main store

  MC Press Online eBookStore  

Free-Format RPG IV, 3rd Edition
preview of book Free-Format RPG IV, 3rd Edition
text of book Free-Format RPG IV, 3rd Edition

Free-Format RPG IV, 3rd Edition

Author:
Publisher: MC Press Online
Publication Date: 2015
Subject: Programming: RPG
Category: Programming
Number of Pages: 233

Free Preview    Email to Friend   Add to wish list
 Available as: (for format`s description click on its name)
Individual E-Version (PDF) Individual E-Version (PDF) ISBN: 9781583474167  
$42.36
 
 Reg.: $
59.95 per N pages
 You Save: 
$17.59 (29%)
 Online  Open CopyPrint    
all time
Library Edition Library Edition ISBN: 9781583474136  
$59.95
 
 Reg.: $
59.95 per N pages
 
hosting service 15% annual fee 55% one-time payment    
Printed Edition   see MC Press Online    
About this title
Traditional fixed-format RPG programmers everywhere are embracing the increased productivity, better readability, and easier program maintenance that comes with the free-format style of programming in RPG IV. This book--both learning tool and handy reference guide--provides the information you need to learn this powerful way of coding.

Although free-format information is available in IBM manuals, it is mixed in with everything else, requiring hours of tedious research to track down the information you need. With this book, your search is over. Free-Format RPG IV is the "one-stop" resource that will save you time and frustration. You'll find everything you need to know to write RPG IV in the free-format style. Jim Martin not only teaches rules and syntax but also explains how this modern style of coding can improve overall programmer productivity--from initial development through maintenance. He methodically covers the "how to" involved in free-format RPG IV, including many style issues, such as named indicators and built-in functions. He also addresses input and output, program flow, data manipulation, and math operations--plus prototyping and APIs.

Free-format RPG now encompasses nearly all functional aspects of the language, and this Third Edition of Free-Format RPG IV brings you up-to-date on all the latest features. You'll find a chapter devoted to the new free-format H (Control), F (File definition), D (Definition), and P (Subprocedure) specifications. And throughout the book, the programming examples have been updated so you can see the new specifications in action.

Free format is the future of the RPG language, and knowing this method is quickly becoming a "must" for all RPG programmers. This book gives you the guidance you need to upgrade your programming skills and bring your RPG programs into the 21st century.

Upon completion of this book, you will be able to:
  • Understand how to code free-format RPG IV
  • Learn the new free-format H, F, D, and P specs
  • Master critical style issues
  • Learn free-format best practices
About author
Jim Martin
Jim Martin holds a BS degree in mathematics and an MS in computer science. For 26 years, he was employed by IBM, where he wrote RPG applications for customers and worked in the programming laboratory as a programmer on portions of CPF and the OS/400 operating system. After leaving IBM, Jim took post-graduate work in computer science and performed RPG training. He is an IBM-certified RPG IV developer and author of the bestselling first and second editions of Free-Format RPG IV, which, since the book's initial publication in 2005, have taught thousands of RPG IV programmers how to be successful with the free-format coding style.

Contents
CONTENTS

Preface to the Third Edition
A Note About Source Entry

Chapter 1: Pre–Free-Format RPG IV
RPG IV
   Extended Factor
   Built-in Functions
   Subprocedures
Other Changes
Some “Baggage” That Came Along
The Future

Chapter 2: The Case for Free-Format RPG
Easier to Read and Maintain
   Good Field Naming
   Indenting
   Use of Comments
   No Goto Operations
   Conclusions
A “Modern” Programming Style
   Free-Format RPG IV and C
   Free-Format RPG IV and Java
   Conclusions
Being “Current”
   The Programmer's Perspective
   Management's Perspective
   Conclusions
Check It Out

Chapter 3: Free-Format H, F, D, and P Specifications
The H (Control) Specification
The F (File) Specifications
The D (Definition) Specifications
The P (Procedure) Specification
Conclusions

Chapter 4: Introducing Free-Format RPG IV
Coding Free-Format Calculations
   Naming Variables
   Programming Style
   A Note About Case
Free-Format Operation Codes
   Evaluate
   If
   Controlled Looping
   Mathematics
   Character Strings
Programming Style Issues
   Mixing Formats
   Keyed Access
   Named Indicators
   Naming File Indicators
Summing Up

Chapter 5: Input/Output Using Free Format
Database Input
   %Eof
   %Found
   %Error
   %Equal
   Data Area Input
Database Output
   Write
   Update
   Delete
   Except
Workstation I/O
   Write/Read
   Write
   Read
   ICF I/O
   Dsply
Printer Output
   Overflow Indicator
   Write
   Except

Chapter 6: Program Flow Using Free Format
The If Group
   If
   Else
   Elseif
   Endif
The Do Operations
   Do While
   Do Until
   Dow and Dou Differences
   For
Loop Interrupt
   Leave
   Iter
The Select Group
   Select
Operations Absent in Free Format

Chapter 7: Embedded SQL Operations Using Free Format
Database and Embedded SQL
   Fixed-Format Method
   Free-Format Method

Chapter 8: Data-Manipulation Operations Using Free Format
Assignment Statements
   Eval Operation: Numeric
   Eval Operation: Character
   Evaluate Right (EvalR) Operation
   Eval Operation: IS,OC
   Evaluate vs Move
Built-in Functions
   Converting Decimal to Character
   Converting Character to Packed Decimal
   Substringing
   Replace
   Scan and Replace
   Concatenation and Trim
   Converting Character to Integer
   Extracting Size, Length, and Decimal Positions
   Number of Elements
   Looking for Something?
   String Translation
   Combining Built-in Functions
Date and Time Operations
   Converting Numbers to Date and Time
   Converting Date and Time to Character or Decimal
   Date and Time Arithmetic

Chapter 9: Math Operations in Free Format
   Expressions in Assignment Statements and Elsewhere
   Four-Function Math
   Short-Form Math
   Exponentiation
   Precedence
   Mathematical Expressions Elsewhere
Eval Differences in Fixed and Free Format
   Naming Variables
   Semicolon
Free-Format Math in RPG IV
   Numeric Data Types
   Changing Data Type

Chapter 10: Call and Return in Free Format
   Call Prototyped (CallP) Operation
   Dynamic Call
   Bound Call
Parameter-Passing Options
   Value
   Const
   Options(*NoPass)
   Options(*Omit)
   Options(*Varsize)
   Options(*String)
   Options(*RightAdj)
   Options(*Trim)
The Return Operation
   Subprocedures
Accessing APIs
   API Examples

Chapter 11: Solutions for Problem Situations
Solution for the Fixed-Format MoveA Operation
   History
   The Free-Format Solution
   The %Subarr Built-in Function
Solution for the Fixed-Format Move Operation
   Breaking It Down
   When Both Fields Are Character
   Data Type Differences
Solution for the Fixed-Format MoveL Operation
   Breaking It Down
   When Both Fields Are Character
Solution for the Case Operation
Solution for the Do Operation
   The Do Syntax
   The Free-Format Solution
Error-Handling Techniques
   The Monitor Solution
   ILE Exception Handler

Chapter 12: Sample Programs
An Investment and Loan Utility Program
A Customer Inquiry Program
A Customer Data Entry Program
A Sales Report Program

Appendix A: Free-Format Operations
Expression Operators
Operation Extenders
Free-Format Operations

Appendix B: Example Screens, DDS, and Programs
Investment and Loan Utility Program
Customer Inquiry Program
Customer Data Entry Program
Sales Report Program

Appendix C: Free-Format Alternatives for Fixed-Format Operations
Index
Related titles
Advanced, Integrated RPGAdvanced, Integrated RPG
Evolve Your RPG CodingEvolve Your RPG Coding
Flexible Input, Dazzling Output with IBM iFlexible Input, Dazzling Output with IBM i
Functions in Free-Format RPG IVFunctions in Free-Format RPG IV
Functions in Free-Format RPG IVFunctions in Free-Format RPG IV
Programming in ILE RPGProgramming in ILE RPG
Programming in RPG IVProgramming in RPG IV
RPG TnTRPG TnT
Subfiles in Free-Format RPGSubfiles in Free-Format RPG
 
  Special Offer Code  
Enter your Special Offer Code here:
  Search for  

  Our Products  
Browse all »»
Big Data Governance
Big Data Analytics
WDSC: Step by Step

If download option is selected, Adobe Acrobat 5.0 or later is required to read our e-books*


Windows PC, Mac OS9/OSX, and Linux