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

  MC Press Online eBookStore  

IBM System i APIs at Work
preview of book IBM System i APIs at Work
text of book IBM System i APIs at Work

IBM System i APIs at Work

Authors:
Publisher: MC Press Online
Publication Date: July 2007
Subject: Programming: RPG
Category: Programming
Number of Pages: 761

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: 9781583470695  
$57.34
 
 Reg.: $
89.95 per N pages
 You Save: 
$32.61 (36%)
 Online  Open CopyPrint    
all time
Printed Edition   see MC Press Online    
About this title
This is a monster of a book written by a giant of an expert. In this 700+ page book, API expert Bruce Vining puts the definitive API resource in your hands. While APIs are powerful tools used to solve business problems, the amount of detail needed to implement them is more than the business programmer usually knows. You may be familiar with the use of APIs, but are you taking full advantage of them in your application coding? This second edition of the previously bestselling first edition is your guide to making sense, and effectively mastering, the APIs available with System i.

Author Bruce Vining is a member of the Rochester Design Control Group in IBM, where he is responsible for the design and implementation of all System i APIs. Who better to explain a wide variety of APIs, including list APIs, APIs that work with user spaces, APIs to retrieve system values, job and job queue information APIs, APIs to work with data queues, APIs for error handling and message handling, spool file APIs, and many more? Each chapter is full of real business-world examples that you can modify and use in your own environment.

In recent years, the business world has realized the impact information systems have on business effectiveness. As a result, programmers like yourself are now expected to use high-level encryption to store sensitive information, to write interfaces between Microsoft Windows and System i RPG applications, and to integrate business applications with the Web. Let this book show you how you can use APIs to do all of this and more. You will come to realize that APIs are one of the most powerful tools in your programming toolbox. And with this book on your desk, you'll be able to make the most out of them.

New for this edition:
  • New chapters covering topics such as exit point concepts, Integrated File System, date and time, cryptographic services, TCP/IP, and more
  • Sorting, character data conversion, and user application information APIs are covered in depth
  • Fully updated code on previous APIs to bring them up to newer standards
  • Changes to the API itself since the previous edition have been completely updated
  • Modernized RPG code to demonstrate the current coding style
  • An Appendix with COBOL examples and implementation including API equivalents for RPG support of memory management, bit testing, edit words, and more
  • Check Your Knowledge tasks at the conclusion of each chapter with solutions provided in RPG and COBOL
About authors
Bruce Vining
Bruce Vining joined the IBM Rochester Design Control Group in 1993, where he currently is responsible for system APIs, globalization, and serviceability for the IBM System i. He has been intimately involved in the design and implementation of the i5/OS APIs since V2R3. Bruce received a bachelors degree in business and an MBA from the University of Illinois and has worked for IBM since 1979. Bruce joined IBM as a Systems Engineer in St. Louis, Missouri, working primarily with customer software development teams using the S/34 and S/38. In 1985, he transferred to Rochester, Minnesota, to work in the Rochester Briefing Center, where his focus was on the S/38 and the initial requirements for the AS/400.

Doug Pence
Doug Pence is founder and vice president of Computer Processing Unlimited, Inc. in San Diego, California. His association with writing began in 1983 with a small technical newsletter named DataNetwork. Doug's career in software dates back to the late 1970s. He has designed dozens of systems and has had the privilege of working on every IBM midrange system from the System/3 to the AS/400.

Doug has worked together with Ron Hawkins off and on since 1979, and they currently share the research and development duties at Computer Processing Unlimited, Inc. Doug and Ron have also written several books and a video for MC Press focused on advanced concepts, tips, and techniques.

Ron Hawkins
Ron Hawkins, a former technical editor for Midrange Computing magazine, is now head of Research & Development at Computer Processing Unlimited, Inc., in San Diego, California. His association with the magazine began in 1983, when the publication was a small technical newsletter named DataNetwork. My career in software dates back to the late 1970s. Together with Doug Pence, Ron has designed dozens of systems and has had the privilege of working on every IBM midrange system from the System/3 to the AS/400. The two have worked together off and on since 1979 and currently share the research and development duties at Computer Processing Unlimited, Inc.

Contents
Chapter 1: API Fundamentals
Begin with the Basics
About the Examples
Pass the Data, Please
Data Types
Data Values
Telling an API What to Return
Keyed Interface
Returning Data
Receiver Variables
APIs and User Spaces
Two Methods to Access Data from a User Space
Automatically Extendable User Spaces
A Handy User-Space Procedure
Exits
Continuation Handles
Domains
Offsets and Displacements
Error Handling
Common Errors to Avoid
Find an Error?
Summary
Check Your Knowledge

Chapter 2: Retrieve APIs
Static Receiver Variables
More on Error-Handling
Dynamic Receiver Variables
Summary
Check Your Knowledge

Chapter 3: List APIs
General Data Structure
Generic Header Data Structure
Header Section
Input Parameter Section
List Data Section
Program to Find Files with Deleted Records
Comparing Methods to Access the List Information
Open-List APIs
Using an Open List to Find Files with Deleted Records
Combining Fixed-Size QSYSINC Structures with
Variable-Length Fields
Initializing Input Structures
Processing Lists with Variable-Length Entries
Summary
Check your Knowledge

Chapter 4: Command-Processing APIs
Defining the QCMDEXC API
Using QCMDEXC to Run RGZPFM
Using QCMDEXC to Run OPNQRYF
Using QCMDEXC to Override Printer Parameters
Using QCMDEXC to Submit a Job to a Job Queue
Using the System Function Instead of Calling QCMDEXC
The QCMDCHK API
A Complete Command-Processing API
The IBM Command-Line API
The Command-Analyzer Retrieve Exit Program
Summary
Check Your Knowledge

Chapter 5: Object APIs
To Exist or Not to Exist, That Is the Question
An Alternative to DSPLIBD and DSPLIB
Summary
Check Your Knowledge

Chapter 6: Data-Queue APIs
Queuing Your Data
Using Data Queues for Job-Related Information
Using the Receive Data Queue API (QRCVDTAQ)
Using the Send Data Queue API (QSNDDTAQ)
Using the Retrieve Data Queue Description API (QMHQRDQD)
Summary
Check Your Knowledge

Chapter 7: Database File APIs
Triggers
Get a List of File Members
Get a List of Fields in a File
Retrieve File Description
Summary
Check Your Knowledge

Chapter 8: Date and Time APIs
Using the Convert Date and Time Format API (QWCCVTDT)
Converting a System Timestamp Using the QWCCVTDT API
Converting Time Values from One Time Zone to Another Using QWCCVTDT
Adjusting the System Time
ILE CEE Date and Time APIs
Adding 30 Days to a Date
ILE CEE Feedback Error Handling
Summary
Check Your Knowledge

Chapter 9: Character Conversion APIs
Monocasing Character Data Using the Convert Case API
Converting Character Data Using ICONV
Summary
Check Your Knowledge

Chapter 10: Message APIs
Watch Exit Programs
Starting a Watch
Sending Program Messages
The sleep API
Sending Program Messages with Replacement Data
Using Retrieve Message to Read Message Descriptions
Summary
Check Your Knowledge

Chapter 11: Cryptographic Services APIs
Encrypting Data
Creating a Key Context
Generating a Pseudorandom Number
Decrypting Data
Using Key-Management APIs
Loading a Master Key
Setting a Master Key
Creating a Key Store File
Generating a Key Record
Encrypting Data Using a Key Store
Decrypting Data Using a Key Store
Summary
Check Your Knowledge

Chapter 12: Security APIs
Swapping the Active User Profile
Retrieving Encrypted Passwords
Knowing When a User Profile Is Changed
Retrieving User Information
Summary
Check Your Knowledge

Chapter 13: Work-Management APIs
Getting a List of Jobs and Selected Job Attributes
The Change Job API, QWTCHGJB
Retrieve System Status (QWCRSSTS)
Summary
Check Your Knowledge

Chapter 14: Integrated File System APIs
Opening an Integrated File System Stream File
Accessing Errno
Writing to an Integrated File System Stream File
Closing an Integrated File System Stream File
Opening an Integrated File System Stream File for Reading
Reading from an Integrated File System Stream File
Opening, Writing, Reading, and Closing an Integrated File
System Stream File
Working with Directories
Opening a Directory
Reading a Directory Entry
Closing a Directory
Opening, Reading, and Closing a Directory
Opening, Reading, and Closing a Directory Using the QLG APIs
Using Qlgopen to Create the Π File
Summary
Check Your Knowledge

Chapter 15: Socket APIs
Using the SOCKET API
Using the BIND API
Using the LISTEN API
Using the ACCEPT API
Using the RECV API
Using the SEND API
Using the close API
Putting All of the APIs Together with a File Server
A Few Words of Warning
Putting All of the APIs Together with a File Server Client
Using the GETHOSTBYNAME API
Running the File Transfer Programs
Putting All of the APIs Together with a Distributed Processing Server
Building a Better Server
Using the Getservbyname API
Create a Routing Server
Using the GIVEDESCRIPTOR API
Using the TAKEDESCRIPTOR API
Communicating Internal Job IDs
Using the SETSOCKOPT API
Defining a TCP Server
A Simple Telnet Server
Receiving Data without Waiting
Summary
Check Your Knowledge

Chapter 16: Odds and Ends
The Sort API, QLGSORT
User Application Information APIs
The Update User Application Information API, QsyUpdateUserApplicationInfo
The Retrieve User Application Information API, QsyRetrieveUserApplicationInfo
Determining the System Release with the Retrieve Product Information API, QSZRTVPR
The List Save File API, QSRLSAVF, and Continuation Handles
Using a Subfile to Display List API Entries
Summary
Check Your Knowledge

Appendix A: The Examples
Appendix B: Fixed Form ILE RPG Examples
Appendix C: ILE COBOL Examples
Appendix D: Answers
Appendix E: About the Code
Related titles
Advanced, Integrated RPGAdvanced, Integrated RPG
Functions in Free-Format RPG IVFunctions in Free-Format RPG IV
IBM i Security Administration and ComplianceIBM i Security Administration and Compliance
Programming in ILE RPGProgramming in ILE RPG
 
  Special Offer Code  
Enter your Special Offer Code here:
  Search for  

  Our Products  
Browse all »»
IT Virtualization Best Practices
DB2 10 for z/OS Database Administration (Exam 612), Chapter 03: Access and Security
IBM InfoSphere

If download option is selected, Adobe Acrobat 5.0 or lateris requiredto read our e-books*


*Windows PC, Mac OS9/OSX, and Linux