| Summary | OBJ2STR documentation shows incorrect output parameter | 
|---|---|
| Article Number | 17833 | 
| Environment | |
| Question/Problem Description | OBJ2STR documentation shows incorrect output parameter Orbix Mainframe PL/I Programmer's Guide states that the function OBJ2STR uses a char(*) as the output parameter Incorrect OBJ2STR documentation | 
| Clarifying Information | |
| Error Message | |
| Defect/Enhancement Number | |
| Cause | Orbix Mainframe PL/I Programmer's Guide incorrectly states that the function OBJ2STR uses a char(*) as the output parameter. | 
| Resolution | The function OBJ2STR passes a pointer as an output parameter, not a character array. OBJ2STR Synopsis OBJ2STR(in PTR object_reference, out PTR object_string) // Retrieves the object ID from an IOR. Usage Common to batch clients and servers. Not relevant to CICS or IMS. Description The OBJ2STR function creates an interoperable object reference (IOR) from a valid object reference. The object reference string that is passed to OBJ2STR must be terminated with a null character. You can use the STRSET function to create this string. Parameters The parameters for OBJ2STR can be described as follows: object_reference This is an in parameter that contains the object reference. object_string This is an out parameter that contains a pointer to the stringified representation of the object reference (that is, the IOR). Example The following example shows part of the server mainline code, generated in the idlmembernameSV member by the Orbix IDL compiler, with added comments for clarity: call objnew(server_name, Simple_SimpleObject_intf, Simple_SimpleObject_objid, Simple_SimpleObject_obj); if check_errors(’objnew’) ^= completion_status_yes then return; /* Write out the IOR for each interface */ open file(IORFILE); call obj2str(Simple_SimpleObject_obj, iorrec_ptr); if check_errors(’obj2str’) ^= completion_status_yes then return; call strget(iorrect_ptr,iorrec,iorrec_len); if check_errors(’strget’) ^= completion_status_yes then return; write file(IORFILE) FROM(iorrec); close file(IORFILE); | 
| Workaround | |
| Notes | Incorrect OBJ2STR Documentation: http://supportline.microfocus.com/productdoc.aspx | 
| Attachment | 
| Created date: | 06 September 2011 | 
|---|---|
| Last Modified: | 14 February 2013 | 
| Last Published: | 10 September 2011 | 
| First Published date: | 10 September 2011 | 
#KnowledgeDocs
#Orbix

