The function SysCreateObject()

SysCreateObject does not support the object settings database DATABASE.DAT in the directory \OS2\INSTALL.

---------- * ----------

You cannot use the SysCreateObject parameter title to change the title of an existing object. You must use the setup string keyword TITLE to do this.

---------- * ----------

SysCreateObject does not replace an existing object when a caret is used in the object title to represent a new line character.
Example.:

 
/* Create an object and update it                                     */

  call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
  call SysLoadFuncs

  do 2
    call SysCreateObject "WPProgram" ,,
                         "Title^with Caret" ,,
                         "<WP_DESKTOP>" ,,
                         "EXENAME=C:\OS2\CMD.EXE;PROGTYPE=WINDOWABLEVIO;" ,,
                         "U"
  end /* do 2 */

This code should create an object on the desktop in the first round and update that object (with the same settings) in the second round. But instead of that, it creates two objects on the desktop.
To avoid this, either don't use a caret in the title of an object or. better yet, always create objects with an object ID.

(Source: APAR PJ17176)

---------- * ----------

Be aware that using the function SysCreateObject with the last parameter set to Replace will destroy the object and all shadows of the object before recreating it (without recreating the shadows)!


[Back: The function SysCopyObject()]
[Next: The function SysDestroyObject]