RETURNCODE CHANGES NEED TO BE MADE The ReturnCode data structure for COBOL and RPG provided by the sample code is incorrect. The copy books that are incorrect are in library QVI, as files QVICBLCPY (for COBOL) and QVIRPGCPY (for RPG), member RETURNCODE. The copy books result in a structure that is 16 bytes too short. When this is passed to the API, which initializes it, 16 bytes of memory in the calling program get erased. The following updates to the structure correct this problem. You will need to either replace these books in QVIRPGCPY and QVICBLCPY (but your copybook update could be undone by any PTF application), copy the code directly into your code, replacing the copy statement, or create another source file from which you can copy these structures; then recreate your program(s). You should re-visit each of your API programs with this update, as this will impact any program that uses this structure. We are trying to get a PTF to correct this, but since these copy books are considered "Sample Code", there is some discussion on this. It WILL be corrected in future versions of CM/400. Update to be made to QVICBLCPY: * Return Code Information Structure (RCSTRUCT) 01 RETURN-CODE-STRUCT. 05 STRUCT PIC 9(09) BINARY. 05 RC PIC 9(09) BINARY. 05 RESERVED-1 PIC 9(04) BINARY. 05 PARAM PIC 9(04) BINARY. 05 PARAM1 PIC 9(09) BINARY. 05 PARAM2 PIC 9(09) BINARY. 05 FILLER-FOR-PTR-ALIGNMENT1 PIC X(12). 05 PARAM1-PTR USAGE POINTER. 05 PARAM2-PTR USAGE POINTER. 05 EXT-RC PIC 9(09) BINARY. 05 EXT-REASON PIC 9(09) BINARY. 05 FILLER-FOR-PTR-ALIGNMENT2 PIC X(08). 05 APPL-DATA-PTR USAGE POINTER. 05 APPL-DATA PIC 9(09) BINARY. 05 RESERVED-2 PIC 9(09) BINARY. 05 FILLER-FOR-PTR-ALIGNMENT3 PIC X(08). 05 ERR-LOG-HANDLE USAGE POINTER. Update to be made to QRPGCPY: * Return Code Information Structure (RCSTRUCT) DRETCODE DS DRcStruct 9B 0 DRC 9B 0 DReserved1 4B 0 DParam 4B 0 DParam1 9B 0 DParam2 9B 0 DRcPtrAlign1 12A DParam1PTR * DParam2PTR * DExtRC 9B 0 DExtReason 9B 0 DRcPtrAlign2 8A DApplDataPtr * DApplData 9B 0 DReserved2 9B 0 DRcPtrAlign3 8A DErrLog *