HPlogo SNA IMF Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 2 Using SNA IMF Intrinsics

Understanding Intrinsic Result Codes

» 

Technical documentation

» Feedback

 » Table of Contents

 » Glossary

 » Index

All the SNA IMF intrinsics except VERS3270 return a code in the result parameter. Your program should always check the result parameter after it calls an intrinsic. A result parameter value of zero indicates that the intrinsic executed successfully.

You might want to check for specific non-zero result values after certain intrinsic calls. The result values that each intrinsic can return are listed in the intrinsic descriptions in Chapter 3 “Intrinsics Used with Standard MPE I/O” and Chapter 4 “Intrinsics Used with No-Wait I/O” If any non-zero result values are important to your program, check for them after the result parameter is returned.

For example, the RECV3270 intrinsic returns result = 24 if the receive timer expires before the host sends data. If your program calls RECV3270 and receives result = 24, it knows that the internal screen image has not been updated, and there is no new data from the host. Your program should specifically check whether result = 24 after a call to RECV3270 before it calls any intrinsics that read data from the internal screen image.

If the result parameter returns a value that has no meaning at the current point in your program, regard it as an error and branch to your error handling routine.

See Appendix F “Sample Programs” for examples of error checking and error handling using the result parameter.

Feedback to webmaster