Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Chapter 7. Machine Interface Programming .................. 7-1
Machine Interface Instructions—Introduction .................... 7-1
Writing an MI Program—Example .......................... 7-2
Setting the Entry Point ............................... 7-2
Setting the Declare Statements .......................... 7-2
Starting the Instruction Stream .......................... 7-3
Compiling a Program ................................. 7-4
Using CLCRTPG to Create an MI Program ................... 7-5
Creating the MI Example Program ........................ 7-6
Debugging the MI Program ............................ 7-7
Setting Breakpoints in the MI Program ...................... 7-7
Handling Exceptions in the MI Program ..................... 7-9
Creating an MI Version of CLCRTPG ....................... 7-11
Source for the CL03 Program .......................... 7-13
Source for the CL04 Program .......................... 7-13
Source for the CL05 Program .......................... 7-14
Source for the MICRTPG Program ....................... 7-15
Understanding the MICRTPG Program (by Sections of Code) ....... 7-16
Enhanced Version of the MICRTPG Program .................. 7-18
Understanding the MICRTPG2 Program (by Sections of Code) ...... 7-18
Beginning the Instruction Stream ........................ 7-22
MICRTPG2 Complete Program—MI Code Example ............. 7-23
Creating the MICRTPG2 Program ......................... 7-27
Handling Exceptions in the MICRTPG2 Program ............... 7-27
MI Common Programming Techniques—Examples ............... 7-32
AS/400 Program Storage .............................. 7-36
Chapter 8. Use of OS/400 APIs .......................... 8-1
Backup and Recovery APIs ............................ 8-1
Client Support APIs ................................. 8-1
Communications APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Configuration APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-3
Debugger APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Dynamic Screen Manager APIs .......................... 8-4
Edit Function APIs ................................. 8-5
File APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5
Hardware Resource APIs ............................. 8-6
Hierarchical File System (HFS) APIs ....................... 8-6
High-Level Language APIs ............................. 8-6
Integrated Language Environment (ILE) CEE APIs ............... 8-7
Journal and Commit APIs ............................. 8-8
Message Handling APIs .............................. 8-8
National Language Support APIs ......................... 8-9
Network Management APIs ............................ 8-9
Object APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
Office APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15
Operational Assistant APIs ............................ 8-17
Performance Collector APIs ........................... 8-17
Print APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-17
Problem Management APIs ........................... 8-18
Program and CL Command APIs ........................ 8-19
Registration Facility APIs ............................. 8-19
Contents v