List of Figures
Chapter 5: Operation Codes
-
Example 5.1: Using the program status data structure to detect a divide-by-zero error.
-
Example 5.2: Detecting a record lock/time-out condition.
-
Example 5.3: Graphic illustration of RPG nesting.
-
Example 5.3: Graphic illustration of RPG nesting in free format.
-
Example 5.4: Acquiring a workstation device.
-
Example 5.5: Adding
variables
and constants.
-
Example 5.6: Using ADDDUR to add 30 days to a date variable.
-
Example 5.7: Allocating 500 bytes of memory.
-
Example 5.8: Using ANDLE to extend the DOWxx operation.
-
Example 5.9: Performing a subroutine.
-
Example 5.10: Converting the contents of an array to lowercase
letters
.
-
Example 5.11: Converting the contents of an array to uppercase letters.
-
Example 5.12: More examples of bit manipulation.
-
Example 5.13: Branching to certain labels based on the contents of various fields.
-
Example 5.14: Calling a program and passing two parameters.
-
Example 5.15: Calling a program and passing a data structure
name
as the parameter.
-
Example 5.16: Calling a bound procedure.
-
Example 5.17: Calling a procedure or program that has been prototyped.
-
Example 5.18: Testing for less than, equal, and a catch-all situation.
-
Example 5.19: Concatenating two values.
-
Example 5.20: Using CAT to build an address line.
-
Example 5.21: Accessing an externally described file using a key list.
-
Example 5.22: Reading a
program-described
file into a data structure.
-
Example 5.23: Verifying factor 2 against a list of
characters
.
-
Example 5.24: Using CHECK to find first nonblank character in a field.
-
Example 5.25: Using CHECK to build a proper salutation.
-
Example 5.26: Finding the length of data for a variable-length field.
-
Example 5.27: Clearing a data structure.
-
Example 5.28: Closing a data file by naming the file.
-
Example 5.29: Committing with a boundary identifier.
-
Example 5.30: Comparing fields to constants.
-
Example 5.31: Using DEALLOC to return memory to the system.
-
Example 5.32: Defining three derived fields.
-
Example 5.33: Defining an external data area and assigning the data area to the field named.
-
Example 5.34: Deleting a record by specifying a key list in factor 1.
-
Example 5.35: Deleting a record using CHAIN/DELETE combination.
-
Example 5.36: Long and short forms of division.
-
Example 5.37: Long form division with remainder.
-
Example 5.38: Division with rounding (half-adjust).
-
Example 5.39: Structure of a DO/ENDDO loop.
-
Example 5.40: Performing a DO
group
multiple times.
-
Example 5.41: Nested DO...END groups.
-
Example 5.42: DOUxx with ANDxx extension.
-
Example 5.43: DOU with OR extension to fill a subfile with 20 records.
-
Example 5.44: DOU with extended factor 2 to condition a DO UNTIL loop.
-
Example 5.45: DOWxx with ORxx extension.
-
Example 5.46: DOWxx with ANDxx extension to fill a subfile with 20 records.
-
Example 5.47: DOW with extended factor 2 to condition a DO WHILE loop.
-
Example 5.48: Display a message at the workstation.
-
Example 5.49: Producing a dump when divide by zero occurs.
-
Example 5.50: Using ELSE for conditioning.
-
Example 5.51: Using elseif for conditioning.
-
Example 5.52: Ending a DOU loop and an IF.
-
Example 5.53: Ending subroutine with a label.
-
Example 5.54: Exception/error subroutine with program cancel.
-
Example 5.55: Using an expression on the EVAL operation.
-
Example 5.56: Using an expression on the EVAL operation.
-
Example 5.57: Exception output to a program-defined printer file.
-
Example 5.58: Exception output with an EXCEPT label to a program-described file.
-
Example 5.59: Exception output to an externally described database file format.
-
Example 5.60: Exception output to release a locked record.
-
Example 5.61: Retrieving and displaying a data file record.
-
Example 5.62: Performing a subroutine to compute profit.
-
Example 5.63: Using EXTRCT to retrieve the day of the month.
-
Example 5.64: Forcing the end of data of a data file.
-
Example 5.65: An example of the FOR/ENDFOR operation.
-
Example 5.66: Forcing input from a secondary file.
-
Example 5.67: GOTO controlled looping.
-
Example 5.68: Conditioning a group of operations on a single comparison.
-
Example 5.69: Using the IFxx and the ORxx to test for a list of values.
-
Example 5.70: Using the IF and the AND to test for a range.
-
Example 5.71: Using the compound form of IFxx to control entry into a subroutine.
-
Example 5.72: Using alternate IF to control entry into a subroutine.
-
Example 5.73: Defining then retrieving a data area.
-
Example 5.74: Using ITER to bypass unnecessary code.
-
Example 5.75: Using a key field for access by warehouse and part number.
-
Example 5.76: Accessing a part master file via a key list.
-
Example 5.77: Using LEAVE to exit a DOUEQ loop.
-
Example 5.78: Using LEAVESR to exit a subroutine.
-
Example 5.79: Searching an array for a valid code.
-
Example 5.80: Monitor Group.
-
Example 5.81: Various MOVE operations.
-
Example 5.82: Moving with length of factor 2 greater than the result field.
-
Example 5.83: Moving with length of factor 2 shorter than the result field.
-
Example 5.84: Moving a field to an array—no indexing.
-
Example 5.85: Moving a field to an array with indexing in the result field.
-
Example 5.86: Moving an array to a field with indexing in factor 2.
-
Example 5.87: Moving an array to an array with indexing in factor 2 and the result field.
-
Example 5.88: Moving a value repeatedly to an array.
-
Example 5.89: Moving a 10-digit phone number to an area-code field.
-
Example 5.90: Moving left with factor 2 longer than the result field.
-
Example 5.91: Moving left with factor 2 shorter than the result field.
-
Example 5.92: Moving left with factor 2 shorter than the result field with pad.
-
Example 5.93: Using MOVE and MOVEL with date fields.
-
Example 5.94: Long and short forms of multiply.
-
Example 5.95: Multiplication with rounding.
-
Example 5.96: Integer division with remainder.
-
Example 5.97: Controlling input sequence with the
NEXT
operation.
-
Example 5.98: Illustrating the use of the OCCUR operation.
-
Example 5.99: A multiple occurrence data structure.
-
Example 5.100: Monitor Group.
-
Example 5.101: Opening a file, printing it, then closing the file.
-
Example 5.102: Using OREQ to extend the DOUxx operation.
-
Example 5.103: Testing input and performing a routine.
-
Example 5.104: Using a data area to store a control number.
-
Example 5.105: Passing parameters to a called program.
-
Example 5.106: Defining a parameter list.
-
Example 5.107: Specifying parameters without a parameter list.
-
Example 5.108: Defining a program-entry parameter list.
-
Example 5.109: Defining a parameter list for a program call.
-
Example 5.110: Additional parameters of a SPECIAL device file.
-
Example 5.111: POST status information to an information data structure.
-
Example 5.112: Reading a file until end of file is
detected
.
-
Example 5.113: Reading a workstation file with timeout support.
-
Example 5.114: Displaying a subfile then reading all changed records.
-
Example 5.115: Adding up the quantity on hand for a specific part number.
-
Example 5.116: Reading a data file
backwards
and filling a subfile with the data.
-
Example 5.117: Reading a data file backwards and filling a subfile one page at a time.
-
Example 5.118: Adding the quantity on hand for a specific item number.
-
Example 5.119: Reallocating memory based on a calculated value.
-
Example 5.120: Releasing an
acquired
workstation device.
-
Example 5.121: Resetting a data structure.
-
Example 5.122: Returning to caller from a dynamically called program.
-
Example 5.123: Returning a value to the caller with a procedure interface.
-
Example 5.124: Rolling back a file under commitment control.
-
Example 5.125: Finding a search argument in a character variable.
-
Example 5.126: Using a SELECT statement to
delimit
an in-line case group.
-
Example 5.127: Positioning a file with SETGT.
-
Example 5.128: Positioning a file with SETLL.
-
Example 5.129: Setting off various indicators.
-
Example 5.130: Setting on various indicators.
-
Example 5.131: Testing for a session shutdown request.
-
Example 5.132: Sorting the array ALPHA in
ascending
order.
-
Example 5.133: Calculating the square root of a value.
-
Example 5.134: Subtracting factor 2 from factor 1 and then
decrementing
the result.
-
Example 5.135: Illustrating array handling with the SUB operation.
-
Example 5.136: Using SUBDUR to calculate past-due invoices.
-
Example 5.137: Using SUBDUR to calculate various durations and new dates.
-
Example 5.138: Using SUBST with SCAN to split a name into first and last
names
.
-
Example 5.139: Branching to a label when end of file is detected.
-
Example 5.140: Testing for various date values.
-
Example 5.141: Testing various field bit values.
-
Example 5.142: Illustrating the TESTN operation.
-
Example 5.143: Illustrating the TESTZ operation.
-
Example 5.144: Retrieving the system time and the system time and date.
-
Example 5.145: Releasing all data area locks for a program.
-
Example 5.146: Unlocking a record previously locked.
-
Example 5.147: Updating a master data file and a subfile.
-
Example 5.148: In-line case group with SELECT/WHENxx/OTHER statements.
-
Example 5.149: Writing to a master data file and a subfile.
-
Example 5.150: Illustrating XFOOT with a numeric array.
-
Example 5.151: Translating lowercase characters to uppercase characters.
-
Example 5.152: Translating blanks to periods.
-
Example 5.153: Translating with starting position.
-
Example 5.154: Illustrating the Z-ADD operation.
-
Example 5.155: Illustrating the Z-SUB operation.
Chapter 8: Structured Programming
-
Example 8.1: A simple relationship test.
-
Example 8.2: A relationship test, with branching to an ELSE operation.
-
Example 8.3: Testing for a list of values.
-
Example 8.4: Compound relationship test with nesting.
-
Example 8.5: Perform operations between ENDIF statements.
-
Example 8.6: In-line CASE using SELECT/WHENxx/OTHER.
-
Example 8.7: The SELECT-WHEN-EXSR-CALLP form of case.
-
Example 8.8: The subroutine CASxx operation.
-
Example 8.9: A basic CASE structure.
{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}
Chapter 10: Procedures
-
Figure 10.3: Calling a subprocedure with CALLP.
-
Figure 10.4: Calling a subprocedure within an expression.
Chapter 11: File Processing
-
Example 11.1: Random access of a subfile record.
-
Example 11.2: Open and close a workstation file.
-
Example 11.3: Retrieve and display a database record.
-
Example 11.4: POST status information to the INFDS.
-
Example 11.5: READ a workstation device file.
-
Example 11.6: Read next changed subfile record.
-
Example 11.7: Update subfile record.
-
Example 11.8: Write a workstation subfile record.