Book description
Originally developed for mainframes but highly portable across platforms-from servers to desktops to handhelds-Rexx is an easy yet powerful scripting language that's widely used for rapid application development.
Covers Rexx interpreters for specialized functions-object-oriented, mainframe, and handheld.
There are 8 different free Rexx interpreters optimized for different platforms and uses. This book shows how to use them all.
Shows how to script for GUIs, databases, web servers, XML, and other interfaces.
Details how to make the best use of Rexx tools and interfaces, with examples for both Linux and Windows.
Includes a tutorial with lots of examples to help people get up and running.
Table of contents
- Copyright
- About the Author
- Credits
- Foreword
- Acknowledgments
- Introduction
-
I. Part I
-
1. Introduction to Scripting and Rexx
- 1.1. Overview
- 1.2. Why Scripting?
- 1.3. Why Rexx?
- 1.4. Power and Flexibility
- 1.5. Universality
- 1.6. Typical Rexx Applications
- 1.7. What Rexx Doesn't Do
- 1.8. Which Rexx?
- 1.9. Downloading Regina Rexx
- 1.10. Installing Regina under Windows
- 1.11. Installing Regina under Linux and Unix
- 1.12. Summary
- 1.13. Test Your Understanding
- 2. Language Basics
- 3. Control Structures
- 4. Arrays
- 5. Input and Output
- 6. String Manipulation
- 7. Numbers, Calculations, and Conversions
-
8. Subroutines, Functions, and Modularity
- 8.1. Overview
- 8.2. The Building Blocks
- 8.3. Internal Functions and Subroutines
- 8.4. Passing Parameters into a Script from the Command Line
- 8.5. Passing Parameters into Subroutines and Functions
- 8.6. A Sample Program
- 8.7. The Function Search Order
- 8.8. Recursion
- 8.9. More on Scoping
- 8.10. Another Sample Program
- 8.11. Summary
- 8.12. Test Your Understanding
- 9. Debugging and the Trace Facility
- 10. Errors and Condition Trapping
- 11. The External Data Queue, or "Stack"
-
12. Rexx with Style
- 12.1. Overview
- 12.2. Capitalize on Capitalization
- 12.3. Good Variable Naming
- 12.4. Use Spacing and Indentation
- 12.5. Limit Nesting
- 12.6. Comment Code
- 12.7. Write Modular Code
- 12.8. Write Structured Code
- 12.9. Handle Errors
- 12.10. Additional Suggestions
-
12.11. Avoid Common Coding Errors
- 12.11.1. Failing to end a comment
- 12.11.2. Failing to end a literal string or parenthetical expression
- 12.11.3. Improper coding of functions
- 12.11.4. Forgetting that functions return a string
- 12.11.5. Using parentheses on call
- 12.11.6. Failure to use commas on call or in parse arg
- 12.11.7. Confusing command-line arguments with internal routine arguments
- 12.11.8. Global variables
- 12.11.9. Forgetting return or exit
- 12.11.10. Forgetting about automatic uppercase conversion
- 12.11.11. Incorrectly continuing a statement
- 12.11.12. Failing to use strict comparisons
- 12.11.13. Incorrectly coding strict comparisons for numbers
- 12.12. Summary
- 12.13. Test Your Understanding
-
13. Writing Portable Rexx
- 13.1. Overview
- 13.2. Factors Affecting Portability
- 13.3. Rexx Standards
- 13.4. How a Script Learns about Its Environment
- 13.5. A Sample Program
- 13.6. Techniques for Command Portability
- 13.7. Issues in Code Portability
- 13.8. I/O and Code Portability
- 13.9. Interfaces for Portability — RexxUtil
- 13.10. Summary
- 13.11. Test Your Understanding
-
14. Issuing System Commands
- 14.1. Overview
- 14.2. Issuing Operating System Commands
- 14.3. Feedback from OS Commands
- 14.4. Controlling Command I/O
- 14.5. A Few Examples
- 14.6. Discovering Defaults — the address Function
- 14.7. Issuing Commands to Other Environments
- 14.8. A Sample Program
- 14.9. Using the Stack for Command I/O
- 14.10. Summary
- 14.11. Test Your Understanding
-
15. Interfacing to Relational Databases
- 15.1. Overview
- 15.2. Rexx/SQL Features
- 15.3. Downloading and Installing Rexx/SQL
- 15.4. The Basics
- 15.5. Example — Displaying Database Information
- 15.6. Example — Create and Load a Table
- 15.7. Example — Select All Results from a Table
- 15.8. Example — Select and Update Table Rows
- 15.9. Example — Cursor Processing
- 15.10. Bind Variables
- 15.11. Working with Other Databases
- 15.12. Other Database Interfaces
- 15.13. Summary
- 15.14. Test Your Understanding
- 16. Graphical User Interfaces
- 17. Web Programming with CGI and Apache
- 18. XML and Other Interfaces
-
1. Introduction to Scripting and Rexx
-
II. Part II
-
19. Evolution and Implementations
- 19.1. Overview
- 19.2. The Evolution of Rexx
- 19.3. Free Rexx Implementations
- 19.4. Which Rexx?
- 19.5. Rexx Intepreters
- 19.6. Object-Oriented Rexx
- 19.7. NetRexx
- 19.8. Mainframe Rexx
- 19.9. Other IBM Rexxes
- 19.10. Rexx for Handhelds and Embedded Programming
- 19.11. Commercial Rexxes
- 19.12. Rexx Compilers and Tokenizers
- 19.13. Running Rexx in the Shell
- 19.14. Rexx As an API
- 19.15. Rexx As a Macro Language
- 19.16. Multiple Rexx Interpreters on One Computer
- 19.17. The Future of Rexx
- 19.18. Summary
- 19.19. Test Your Understanding
- 20. Regina
- 21. Rexx/imc
-
22. BRexx
- 22.1. Overview
- 22.2. Advantages
- 22.3. Downloading and Installation
- 22.4. Extra Built-in Functions
- 22.5. Input/Output
- 22.6. The External Function Libraries
- 22.7. Windows CE
- 22.8. Issuing Operating System Commands
- 22.9. Example — C-like I/O
- 22.10. Example — ANSI Screen I/O with Random Data Access
- 22.11. Example — Direct Data Access
- 22.12. Example — DOS Functions
- 22.13. Summary
- 22.14. Test Your Understanding
-
23. Reginald
- 23.1. Overview
- 23.2. Advantages
- 23.3. Download and Installation
- 23.4. Tools
- 23.5. Windows GUI
- 23.6. GUI Development Aids
- 23.7. Input/output
- 23.8. Documentation and Tutorials
-
23.9. Other Features and Functions
- 23.9.1. Operating system commands
- 23.9.2. Options
- 23.9.3. Windows Registry
- 23.9.4. GUI trace panel
- 23.9.5. Error conditions
- 23.9.6. Windows DLLs
- 23.9.7. Sorting
- 23.9.8. Multiple stacks
- 23.9.9. Parameter passing
- 23.9.10. do over loop
- 23.9.11. Array indexing
- 23.9.12. Improved interpret instruction
- 23.9.13. Other functions
- 23.10. Leveraging Reginald
- 23.11. Sample Scripts — File, Directory, and Drive Management
- 23.12. Sample Scripts — GUIs
- 23.13. Let My Computer Speak!
- 23.14. Accessing the Windows Registry
- 23.15. Summary
- 23.16. Test Your Understanding
- 24. Handhelds and Embedded Programming
- 25. Rexx for Palm OS
- 26. r4 and Object-Oriented roo!
- 27. Open Object Rexx
- 28. Open Object Rexx Tutorial
-
29. IBM Mainframe Rexx
- 29.1. Overview
- 29.2. VM Rexx Differences
- 29.3. OS/TSO Rexx Differences
- 29.4. Mainframe Rexx and the Language Standards
- 29.5. Sample Scripts
- 29.6. Migrating Mainframe Scripts to Other Platforms
- 29.7. Applying Your Rexx Skills to Other Platforms
- 29.8. Further Information
- 29.9. Summary
- 29.10. Test Your Understanding
- 30. NetRexx
-
19. Evolution and Implementations
-
III. Part III
- A. Resources
- B. Instructions
-
C. Functions
- C.1. ABBREV
- C.2. ABS
- C.3. ADDRESS
- C.4. ARG
- C.5. BITAND
- C.6. BITOR
- C.7. BITXOR
- C.8. B2X
- C.9. CENTER or CENTRE
- C.10. CHANGESTR
- C.11. CHARIN
- C.12. CHAROUT
- C.13. CHARS
- C.14. COMPARE
- C.15. CONDITION
- C.16. COPIES
- C.17. COUNTSTR
- C.18. C2D
- C.19. C2X
- C.20. DATATYPE
- C.21. DATE
- C.22. DELSTR
- C.23. DELWORD
- C.24. DIGITS
- C.25. D2C
- C.26. D2X
- C.27. ERRORTEXT
- C.28. FORM
- C.29. FORMAT
- C.30. FORMAT
- C.31. FUZZ
- C.32. INSERT
- C.33. LASTPOS
- C.34. LEFT
- C.35. LENGTH
- C.36. LINEIN
- C.37. LINEOUT
- C.38. LINES
- C.39. MAX
- C.40. MIN
- C.41. OVERLAY
- C.42. POS
- C.43. QUALIFY
- C.44. QUEUED
- C.45. RANDOM
- C.46. REVERSE
- C.47. RIGHT
- C.48. SIGN
- C.49. SOURCELINE
- C.50. SPACE
- C.51. STREAM
- C.52. STRIP
- C.53. SUBSTR
- C.54. SUBWORD
- C.55. SYMBOL
- C.56. TIME
- C.57. TRACE
- C.58. TRANSLATE
- C.59. TRUNC
- C.60. VALUE
- C.61. VERIFY
- C.62. WORD
- C.63. WORD
- C.64. WORDLENGTH
- C.65. WORDPOS
- C.66. WORDS
- C.67. XRANGE
- C.68. X2B
- C.69. X2C
- C.70. X2D
-
D. Regina Extended Functions
- D.1. B2C
- D.2. BEEP
- D.3. BITCHG
- D.4. BITCLR
- D.5. BITCOMP
- D.6. BITSET
- D.7. BITTST
- D.8. BUFTYPE
- D.9. C2B
- D.10. CD or CHDIR
- D.11. CLOSE
- D.12. COMPRESS
- D.13. CRYPT
- D.14. DESBUF
- D.15. DIRECTORY
- D.16. DROPBUF
- D.17. EOF
- D.18. EXISTS
- D.19. EXPORT
- D.20. FIND
- D.21. FORK
- D.22. FREESPACE
- D.23. GETENV
- D.24. GETPID
- D.25. GETSPACE
- D.26. GETTID
- D.27. HASH
- D.28. IMPORT
- D.29. INDEX
- D.30. JUSTIFY
- D.31. MAKEBUF
- D.32. OPEN
- D.33. POOLID
- D.34. POPEN
- D.35. RANDU
- D.36. READCH
- D.37. READLN
- D.38. RXFUNCADD
- D.39. RXFUNCDROP
- D.40. RXFUNCERRMSG
- D.41. RXFUNCQUERY
- D.42. RXQUEUE
- D.43. SEEK
- D.44. SHOW
- D.45. SLEEP
- D.46. STATE
- D.47. STORAGE
- D.48. STREAM
- D.49. TRIM
- D.50. UNAME
- D.51. UNIXERROR
- D.52. UPPER
- D.53. USERID
- D.54. WRITECH
- D.55. WRITELN
- E. Mainframe Extended Functions
- F. Rexx/SQL Functions
- G. Rexx/Tk Functions
- H. Tools, Interfaces, and Packages
- I. Open Object Rexx: Classes and Methods
- J. Mod_Rexx: Functions and Special Variables
-
K. NetRexx: Quick Reference
- K.1. NetRexx Special Names
- K.2. Special Methods
- K.3. Instruction Syntax
- K.4. CLASS
- K.5. DO
- K.6. EXIT
- K.7. IF
- K.8. IMPORT
- K.9. ITERATE
- K.10. LEAVE
- K.11. LOOP
- K.12. METHOD
- K.13. NOP
- K.14. NUMERIC
- K.15. OPTIONS
- K.16. PACKAGE
- K.17. PARSE
- K.18. PROPERTIES
- K.19. RETURN
- K.20. SAY
- K.21. SELECT
- K.22. SIGNAL
- K.23. TRACE
- L. Interpreter System Information
-
M. Answers to "Test Your Understanding" Questions
- M.1. Chapter 1
- M.2. Chapter 2
- M.3. Chapter 3
- M.4. Chapter 4
- M.5. Chapter 5
- M.6. Chapter 6
- M.7. Chapter 7
- M.8. Chapter 8
- M.9. Chapter 9
- M.10. Chapter 10
- M.11. Chapter 11
- M.12. Chapter 12
- M.13. Chapter 13
- M.14. Chapter 14
- M.15. Chapter 15
- M.16. Chapter 16
- M.17. Chapter 17
- M.18. Chapter 18
- M.19. Chapter 19
- M.20. Chapter 20
- M.21. Chapter 21
- M.22. Chapter 22
- M.23. Chapter 23
- M.24. Chapter 24
- M.25. Chapter 25
- M.26. Chapter 26
- M.27. Chapter 27
- M.28. Chapter 28
- M.29. Chapter 29
- M.30. Chapter 30
Product information
- Title: Rexx Programmer's Reference
- Author(s):
- Release date: March 2005
- Publisher(s): Wrox
- ISBN: 9780764579967
You might also like
book
ISPF Programmer’s Guide
This book is intended to support ISPF application programmers to become professional in the smart programming …
book
Algorithms in C, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching, Third Edition
“This is an eminently readable book which an ordinary programmer, unskilled in mathematical analysis and wary …
book
Fluent C
Expert advice on C programming is hard to find. While much help is available for object-oriented …
book
Beginning COBOL for Programmers
Beginning COBOL for Programmers is a comprehensive, sophisticated tutorial and modular skills reference on the COBOL …