CBL_CTF_EMITTER_PROPERTY_SET

Sets a named property value for an emitter.

Syntax:
call "CBL_CTF_EMITTER_PROPERTY_SET" using by value     flags
                                          by reference emitter-name
                                          by reference property-name
                                          by reference property-value
                                             returning 
Parameters:
Using call prototype (see Library Routines - Key) Picture (32-bit systems)
flags cblt-x4-comp5 pic x(4) comp-5
emitter-name pic x(n) pic x(n)
property-name pic x(n) pic x(n)
property-value pic x(n) pic x(n)
status-code See Library Routines - Key
On Entry:
flags Control flags:
Bit Value Meaning
0 0 String value. Use bit 1 to determine the string terminator.
1 Integer value. Ignore bit 1.
1 0 String value is space-terminated.
1 String value is null-terminated.
2-27 Reserved for future use. Must be 0.
28 0 emitter-name is space-terminated.
1 emitter-name is null-terminated.
29 0 property-name is space-terminated.
1 property-name is null-terminated.
30-31 Reserved for future use. Must be 0.
emitter-name Space- or null-terminated (depending on the setting of bit 28) case-insensitive emitter name.
property-name Space- or null- terminated (depending on the setting of bit 29) case-insensitive property name.
property-value Buffer containing the property value to be set. This is either a pic x(n) field for a value being specified as a string, or a pic x(4) comp-5 field for a value being set as an integer.
On Exit:
status-code One of:
  • 78-CTF-RET-EMITTER-NOT-FOUND
  • 78-CTF-RET-INVALID-EMITTER-NAME
  • 78-CTF-RET-INVALID-PROPERTY-NAME
  • 78-CTF-RET-NOT-ENOUGH-MEMORY
  • 78-CTF-RET-SUCCESS
Comments:

If a property with the same name already exists for the specified emitter, its value is replaced by the new value.

Example:

To set two property values associated with the "myemitter" emitter; one a null-terminated string value, one an integer value:

copy "cbltypes.cpy". 
copy "mfctf.cpy". 
01 emitter-name pic x(10) value "myemitter". 
01 flags        pic x(4) comp-5. 
01 prop-integer pic x(4) comp-5. 
01 prop-string  pic x(100). 
... 
compute flags = 78-CTF-FLAG-PROP-STRING-VALUE b-or 
                78-CTF-FLAG-PROP-NULL-TERM 
move "xxx" & x"00" to prop-string 
call "CBL_CTF_EMITTER_PROPERTY_SET" using by value flags 
                                          by reference emitter-name 
                                          by reference "prop1 " 
                                          by reference prop-string 
... 
compute prop-flags = 78-CTF-FLAG-PROP-INT-VALUE 
move 100 to prop-integer 
call "CBL_CTF_EMITTER_PROPERTY_GET" using by value flags 
                                          by reference emitter-name 
                                          by reference "prop2 " 
                                          by reference prop-integer 
... 

Related Topics: