Author |
Message
|
Tikam |
Posted: Wed Dec 19, 2007 7:50 am Post subject: Get Message Type from a Message Set |
|
|
 Newbie
Joined: 15 Oct 2007 Posts: 4
|
Hi All,
I m using
chr_FieldType = 'dataType1';
blb_Msg =ASBITSTREAM(fieldref,int_Encoding, int_CCSId, chr_MsgSetID, chr_FieldType, chr_MsgFrmt)
to get MRM data as bitstream. But the problem is that if i provide chr_FieldType as one which doen't exist under "Messages" Structure in the .mxsd file (although it is present as "Types"), it doen't throws any exception rather just returns me a empty blob.
But i want the user to get Exception in this case.
Is there any way to find out Message Types in a message set, as i want to ensure that the chr_FieldType provided is among Message type provided. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Dec 19, 2007 7:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Just check for an empty blob... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Tikam |
Posted: Wed Dec 19, 2007 8:06 am Post subject: |
|
|
 Newbie
Joined: 15 Oct 2007 Posts: 4
|
Hi jefflowrey,
I m using this line of code in a fucntion (to be used by large team).if the function throws an error at the Testing time and the messageSet would updated accordingly.
The problem is that what if the field didn't come in data, i mean the testing is caried out with this field missing,the blob would be empty in this case too....So i can't throw User defined exception only on the basis of Empty blob... |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Dec 19, 2007 8:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Tikam wrote: |
Hi jefflowrey,
I m using this line of code in a fucntion (to be used by large team).if the function throws an error at the Testing time and the messageSet would updated accordingly.
The problem is that what if the field didn't come in data, i mean the testing is caried out with this field missing,the blob would be empty in this case too....So i can't throw User defined exception only on the basis of Empty blob... |
So you have to check to see if the input field is not empty and the output blob is empty... AND THEN throw a user exception.
You don't need to do what you want to, which you can't do anyway. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Tikam |
Posted: Mon Jan 07, 2008 11:58 pm Post subject: Is There any other wat out |
|
|
 Newbie
Joined: 15 Oct 2007 Posts: 4
|
Thanks Jeff,
But as per the coding standards this is not the Full-Proof way to handle this scenario. You should throw a Exception only in worst cases.
Guys do we have some way of getting the array of Messages defined in the MessageSet???
Regards,
Tikam |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jan 08, 2008 1:18 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
No. The contents of the message set are not accessible from the message flow. |
|
Back to top |
|
 |
|