Skip to main content
Summary How are empty, unbounded, Orbix sequences and strings managed in PL/I?
Article Number 16207
Environment Orbix Mainframe All supported platforms The "UNEXPECTED_NULL" exception indicates a null pointer was passed to the Orbix function.
Question/Problem Description How are empty, unbounded, Orbix sequences and strings managed in PL/I?
How to avoid "IT_Core:UNEXPECTED_NULL" exceptions.
How to avoid "IDL:omg.org/CORBA/BAD_PARAM:1.0: minor = 0x49540100" errors.
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution All in and inout parameters passed to Orbix functions must be initialized. That is, all unbounded sequences must be allocated with SeqAloc, regardless of their initial length. Similarly, all bounded sequences must be initialized with SeqInit and all unbounded strings must be initialized with StrSet.
Workaround
Notes

For example, empty, unbounded sequences should be allocated as follows:
call seqaloc(<Sequence Pointer>, 0, <Sequence Typecode>, <Length of Sequence Typecode>);
For more information on the Orbix functions, please see the "Memory Handling" section of our Orbix Mainframe Programmers' Guides.
Orbix Mainframe PL/I Programmer's Guide: http://supportline.microfocus.com/Documentation/books/Orbix/63/Mainframe/pli_guide_and_ref.pdf
Orbix Mainframe COBOL Programmer's Guide: http://supportline.microfocus.com/Documentation/books/Orbix/63/Mainframe/cobol_guide_and_ref.pdf

Similarly, an empty, unbounded string should be set as follows:
call StrSet(<String Pointer>, "", 0);
The CORBA IDL specification does not allow for Null values. As such, null values cannot be passed in IDL operation calls between CORBA clients and servers.
The pointers generated for sequences and unbounded strings point to control data (For example maximum length, current length, typecode). This information is also required for empty sequences.

Attachment

Created date: 06 September 2011
Last Modified: 21 May 2013
Last Published: 23 June 2012
First Published date: 10 September 2011


#Orbix
#KnowledgeDocs