HPCIPUTVAR and HPCIGETVAR return a 32bit signed integer status. But to interpret it you have to access it as two 16bit integers. One 16bit integer is the error code and the other is the subsystem identifier.
Question 1:
How do I interpret the 32bit integer as two 16bit integers in COBOL.
Question2:
Where can I find what the error integers mean once I successfully get them in COBOL. The Intrinsic Manual says to look at the Error Message Manual but the Error Message Manual doesn't have info for subsysytem 166 (HCIGETVAR & HCIPUTVAR).