Originally posted by: markboonie
I have a structure that includes a union; I'm trying to use the union to refer both to a set of fields used for sorting and to the fields individually. The structure looks like this:
Dcl 01 cm_ss_data Based(cm_ssd_ptr(cm_ss_index)),
03 cm_ssd_alloc Unsigned Fixed Bin (32),
03 cm_ssd_inuse Unsigned Fixed Bin (32),
03 cm_ssd_entry(cm_ssd_entries Refer (cm_ss_data.cm_ssd_alloc)),
05 * Union,
07 sort_data,
09 entry_valid Bit (1),
09 fun_type Char (FDES_MAX_FUN_TYPE_LEN+1),
09 key Char (FDES_MAX_KEY_LEN+1),
09 version_name Char (FDES_MAX_VERSION_NAME_LEN+1),
07 key_text Char (Size(cm_ssd_entry.sort_data));
The last definition, for key_text, is giving me problems. I get the compiler message "IBM1569I S SIZE argument must be a CONNECTED reference." The description of the CONNECTED and NONCONNECTED attributes says "[e]lements, arrays, and major structure or unions are always allocated in connected storage." So, I'm not sure why sort_data is being treated as nonconnected. Thanks for any help.
- mb