| Title: | DECmcc user notes file. Does not replace IPMT. |
| Notice: | Use IPMT for problems. Newsletter location in note 6187 |
| Moderator: | TAEC::BEROUD |
| Created: | Mon Aug 21 1989 |
| Last Modified: | Wed Jun 04 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 6497 |
| Total number of notes: | 27359 |
Hello,
My customer is facing problem in MCC_ILV_GET routine.
He formulate a call "SHOW DOMAIN XXX MEMEBER * ALL CHAR" using the
mcc_call_function routine. The call returns OKAY and when he dump the
ILV structure returned it is the same as that produced by running the
FCL with its ILV dump flag set, and entering the command by hand.
He successfully locate the attribute and can use mcc_ilv_list_get_datatype
to extract the data type (55) for the Memeber Entity (id=20). However
when he try to use the mcc_ilv_get routine to extract this attribute he
get an MCC-E-INV_ENTITY error.
Please provide information where this code is wrong.
Thanks,
George.
The following code segment shows how the ILV call is made:
if (status == MCC_S_NORMAL) /* create AES struct*/
status = mcc_aes_create(&a_aes_struct,
&MCC_K_CLASS_KNOWN,
/* He don't know the class, but what to use?*/
a_aes_struct,
&MCC_K_AES_NOT_WILD);
if (status == MCC_S_NORMAL) /* create AES struct*/
status = mcc_desframe_create_descriptor (
&(*p_context)->alloc_mem_list, /* Memory Allocation */
&ilv_buffer, /* Descriptor Pointer */
&128, /* Don't know length so
go for a large value */
&MCC_K_DT_FULL_ENTITY, /* Data type */
&a_aes_struct, /* Initial Value */
&MCC_K_MEMBERENTITY, /* ID */
&DSC_K_DTYPE_Z); /* Initial Value */
if (status == MCC_S_NORMAL) /* create AES struct*/
status = mcc_ilv_list_get_datatype(&req_ilv_ctx, &data_type);
/* Data_type = 55 */
if (status == MCC_S_NORMAL) /* create AES struct*/
status = mcc_ilv_get(&req_ilv_ctx, ilv_buffer, &reason_code);
/* status returned is
MCC-E-INV_ENTITY */
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 6101.1 | A few hints | TAEC::LAVILLAT | Tue Aug 30 1994 02:53 | 73 | |
George,
Yes I am afraid the code is wrong, but your customer cannot guess !
ilv_get on an AES datatype require the descriptor to be set to a null
buffer : mcc_a_pointer set to MCC_K_NULL_PTR, curlen and maxstrlen set to 0
Please make them replace
>
> The following code segment shows how the ILV call is made:
>
>
> if (status == MCC_S_NORMAL) /* create AES struct*/
> status = mcc_aes_create(&a_aes_struct,
> &MCC_K_CLASS_KNOWN,
> /* He don't know the class, but what to use?*/
> a_aes_struct,
> &MCC_K_AES_NOT_WILD);
>
>
> if (status == MCC_S_NORMAL) /* create AES struct*/
> status = mcc_desframe_create_descriptor (
> &(*p_context)->alloc_mem_list, /* Memory Allocation */
> &ilv_buffer, /* Descriptor Pointer */
> &128, /* Don't know length so
> go for a large value */
> &MCC_K_DT_FULL_ENTITY, /* Data type */
> &a_aes_struct, /* Initial Value */
> &MCC_K_MEMBERENTITY, /* ID */
> &DSC_K_DTYPE_Z); /* Initial Value */
>
> if (status == MCC_S_NORMAL) /* create AES struct*/
> status = mcc_ilv_list_get_datatype(&req_ilv_ctx, &data_type);
> /* Data_type = 55 */
>
> if (status == MCC_S_NORMAL) /* create AES struct*/
> status = mcc_ilv_get(&req_ilv_ctx, ilv_buffer, &reason_code);
> /* status returned is
> MCC-E-INV_ENTITY */
>
by (simpler)
> if (status == MCC_S_NORMAL)
> status = mcc_desframe_create_descriptor (
> &(*p_context)->alloc_mem_list, /* Memory Allocation */
> &ilv_buffer, /* Descriptor Pointer */
> &0, /* Don't know length so
> go for a large value */
> &MCC_K_DT_FULL_ENTITY, /* Data type */
> &MCC_K_NULL_PTR, /* Initial Value */
> &MCC_K_MEMBERENTITY, /* ID */
> &DSC_K_DTYPE_Z); /* Initial Value */
>
> if (status == MCC_S_NORMAL) /* create AES struct*/
> status = mcc_ilv_list_get_datatype(&req_ilv_ctx, &data_type);
> /* Data_type = 55 */
>
> if (status == MCC_S_NORMAL) /* create AES struct*/
> status = mcc_ilv_get(&req_ilv_ctx, ilv_buffer, &reason_code);
but then need after that to delete the AES allocated by mcc_ilv_get, via
status = mcc_aes_delete( (MCC_A_AES *) &ilv_buffer->mcc_a_pointer);
Hope this helps.
Regards.
Pierre.
| |||||
| 6101.2 | tried but failed | ZPOVC::GEORGEKOH | Fri Sep 02 1994 00:01 | 58 | |
Hi Pierre,
Thank you for prompt response and suggestion.
Customer followed your example but status returned was invalid argument.
He tried to set the length to 128, it got thru but stop at mcc_ilv_get
with status returned MCC-E-INV_ENTITY.
Any comment/suggestions?
Thanks and regards,
George.
Result 1
========
if (status == MCC_S_NORMAL)
status = mcc_desframe_create_descriptor (
&(*p_context)->alloc_mem_list, /* Memory Allocation */
&ilv_buffer, /* Descriptor Pointer */
&0, /* Don't know length so
go for a large value */
&MCC_K_DT_FULL_ENTITY, /* Data type */
&MCC_K_NULL_PTR, /* Initial Value */
&MCC_K_MEMBERENTITY, /* ID */
&DSC_K_DTYPE_Z); /* Initial Value */
/* status returned is
Invalid argument */
Result 2
========
if (status == MCC_S_NORMAL)
status = mcc_desframe_create_descriptor (
&(*p_context)->alloc_mem_list, /* Memory Allocation */
&ilv_buffer, /* Descriptor Pointer */
&128, /* Don't know length so
go for a large value */
&MCC_K_DT_FULL_ENTITY, /* Data type */
&MCC_K_NULL_PTR, /* Initial Value */
&MCC_K_MEMBERENTITY, /* ID */
&DSC_K_DTYPE_Z); /* Initial Value */
/* it pass thru */
if (status == MCC_S_NORMAL) /* create AES struct*/
status = mcc_ilv_list_get_datatype(&req_ilv_ctx, &data_type);
/* Data_type = 55 */
if (status == MCC_S_NORMAL) /* create AES struct*/
status = mcc_ilv_get(&req_ilv_ctx, ilv_buffer, &reason_code);
/* status returned is
MCC-E-INV_ENTITY */
| |||||
| 6101.3 | was a mistake ! | TAEC::LAVILLAT | Mon Sep 05 1994 05:16 | 43 | |
George.
I am afraid I made a mistake in my example : the create_descriptor
call I proposed was wrong :
>
> if (status == MCC_S_NORMAL)
> status = mcc_desframe_create_descriptor (
> &(*p_context)->alloc_mem_list, /* Memory Allocation */
> &ilv_buffer, /* Descriptor Pointer */
> &0, /* Don't know length so
> go for a large value */
> &MCC_K_DT_FULL_ENTITY, /* Data type */
> &MCC_K_NULL_PTR, /* Initial Value */
> &MCC_K_MEMBERENTITY, /* ID */
> &DSC_K_DTYPE_Z); /* Initial Value */
> /* status returned is
> Invalid argument */
has to be replaced by :
if (status == MCC_S_NORMAL)
status = mcc_desframe_create_descriptor (
&(*p_context)->alloc_mem_list, /* Memory Allocation */
&ilv_buffer, /* Descriptor Pointer */
&0, /* Don't know length so
go for a large value */
&MCC_K_DT_FULL_ENTITY, /* Data type */
--> MCC_K_NULL_PTR, /* Initial Value */
&MCC_K_MEMBERENTITY, /* ID */
&DSC_K_DTYPE_Z); /* Initial Value */
/* status returned is
Invalid argument */
The descriptor has to have a mcc_a_pointer value equal to 0
along with mcc_w_curlen and mcc_w_maxstrlen.
Hope it is correct now !
Regards.
Pierre.
| |||||