SET DESCRIPTOR
Description
- Applies to the descriptor "header", which is independent of specific data.
- Assigns a value to specific data identified by a number.
Syntax
SET DESCRIPTOR descriptor_name descriptor_header_item = value [, ... ] SET DESCRIPTOR descriptor_name VALUE number descriptor_item = value [, ...]
Parameters
- descriptor_name
SQL descriptor name.
- descriptor_header_item
Identifies the header information item to be set. Currently, only COUNT that can be used to set the number of descriptor items is supported.
- number
Number of descriptor items to be set. The count starts at 1.
- descriptor_item
Identifies which descriptor item is to be set. Currently, only DATA, TYPE, and LENGTH are supported.
- value
Value to be stored in the descriptor item. The value can be an SQL constant or a host variable.
Examples
EXEC SQL SET DESCRIPTOR indesc COUNT = 1; EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = 2; EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = :val1; EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val1, DATA = 'some string'; EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val2null, DATA = :val2;
Helpful Links
ALLOCATE DESCRIPTOR, DEALLOCATE DESCRIPTOR, and GET DESCRIPTOR
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot