The BITSTREAM function is retained only for backward compatibility.
ASBITSTREAM returns a value of type BLOB containing a bitstream representation of the field pointed to by FieldReference and its children
In this way, the algorithm for determining these properties is essentially the same as that used for the BITSTREAM function.
Some parsers also support another mode, FolderBitStream, which generates a meaningful bit stream for any subtree, provided that the field pointed to represents a folder.
In all cases, the bit stream obtained can be given to a CREATE statement with a PARSE clause, using the same DOMAIN and OPTIONS to reproduce the original subtree.
When the function is called, any clause expressions are evaluated. An exception is thrown if any of the expressions do not result in a value of the appropriate type.
If any parameter is NULL the result is NULL.
Clause | Type | Default value |
---|---|---|
Options | integer | RootBitStream & ValidateNone |
Encoding | integer | 0 |
Ccsid | integer | 0 |
Message set | character | Zero length string |
Message type | character | Zero length string |
Message format | character | Zero length string |
Although the OPTIONS clause accepts any expression that returns a value of type integer, it is only meaningful to generate option values from the list of supplied constants, using the BITOR function if more than one option is required.
Validate master options... ValidateContentAndValue ValidateValue -- Can be used with ValidateContent ValidateContent -- Can be used with ValidateValue ValidateNone Validate failure action options... ValidateException ValidateExceptionList ValidateLocalError ValidateUserTrace Validate value constraints options... ValidateFullConstraints ValidateBasicConstraints Validate fix up options... ValidateFullFixUp ValidateNoFixUp
C and Java equivalent APIs
Only one option from each group can be specified, with the exception of ValidateValue and ValidateContent, which can be used together to obtain the content and value validation. If you do not specify an option within a group, the option in bold is used.
0 MQENC_INTEGER_NORMAL MQENC_INTEGER_REVERSED MQENC_DECIMAL_NORMAL MQENC_DECIMAL_REVERSED MQENC_FLOAT_IEEE_NORMAL MQENC_FLOAT_IEEE_REVERSED MQENC_FLOAT_S3900 uses the queue manager's encoding.
The values used for the CCSID clause follow the normal numbering system. For example, 1200 = UCS-2, 1208 = UTF-8.
0 -10 uses the queue manager's CCSID and -1 uses the CCSID's as determined by the parser itself. This value is reserved.
For absent clauses, the given default values are used. Use the CCSID and encoding default values, because they take their values from the queue manager's encoding and CCSID settings.
Similarly, use the default values for each of the message set, type, and format options, because many parsers do not require message set, type, or format information; any valid value is sufficient.
ENCODING -> CCSID -> SET -> TYPE -> FORMAT -> OPTIONS
The list can be truncated at any point and you can use an empty expression for any clauses for which you do not supply a value.
DECLARE options INTEGER BITOR(FolderBitStream, ValidateContent, ValidateValue); SET result = ASBITSTREAM(cursor OPTIONS options CCSID 1208); SET Result = ASBITSTREAM(Environment.Variables.MQRFH2.Data,,1208 ,,,,options);
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ak05510_ |