You can obtain additional information about the program devices associated with your application by using OS/400 system feedback areas.
Example:
The following example uses the _Riofbk() function.
CRTDSPF FILE(MYLIB/T1520DDF) SRCFILE(QCPPLE/QADDSSRC) MAXDEV(2)
Figure 145. T1520DDF -- DDS Source for a Feedback Display
|
OVRPRTF FILE(STDOUT) TOFILE(QPRINT)
CRTBNDC PGM(MYLIB/T1520FBK) SRCFILE(QCPPLE/QACSRC)
Figure 146. T1520FBK -- ILE C Source to Use Feedback Information
|
This program uses two typedefs _XXIOFB_T for common I/O feedback, and _XXIOFB_DSP_ICF_T for display file specific I/O feedback. A pointer to the I/O feedback is returned by _Riofbk (fp).
CALL PGM(MYLIB/T1520FBK)
The output is as follows:
+--------------------------------------------------------------------------------+ | | | | | | | OUTPUT: Hello | | | | INPUT: | | | | | | | | | | | | | | | | | | | | | +--------------------------------------------------------------------------------+
The signal() function is called before an error to establish a signal handler. If an exception occurs during the acquire operation, the signal handler is called to write the major/minor return code to stdout.
+--------------------------------------------------------------------------------+ |Acquire failed | |Major code: 82 Minor code: AA | +--------------------------------------------------------------------------------+
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.