Hi Pat
If the problem is with the 'Message VAR' not having been initialized, the
TRAP error 2 should have been thrown the first time i use *STRING_RESIZE_VBI
* right? I have analysed further and found that the problem may not be with
STRING_RESIZE_VBI. Am facing the error after the MQ function MQGET has been
called. I face the same error if i am using some other JBASE functions apart
from *STRING_RESIZE_VBI* like *STORE_VBS(Message (STRING *)"")* also.
The following is the part of code in the C function.
MQS_API INT32 MQGet (DP_MPTR INT32 QMgr, INT32 QNum, INT32 MsgMax, INT32
WaitPeriod, VAR * Message)
...
STRING_RESIZE_VBI(Message, MsgMax);
...
MQGET(QManagers[QMgr].QMHeader.HQMcon ,
QManagers[QMgr].Queues[QNum].QHandle ,
&MDescriptor ,
&GetOptions ,
MsgMax ,
Message ,
(PMQLONG)&MsgLen ,
&QManagers[QMgr].Queues[QNum].CompletionCode ,
&QManagers[QMgr].Queues[QNum].ReasonCode
);
SetMQFail(DP_MPRM 0);
*STRING_RESIZE_VBI(Message, MsgLen);*
return MsgLen;
In the above code part '...' signifies coding have been done related to
MQGET, but not of VAR Message.
Bensly
On Wed, May 18, 2011 at 6:22 AM, pat <[email protected]> wrote:
> My guess is the the 'Message VAR' has not been initialised, or has
> been 'overwritten', prior to 'RESIZING'
>
> The 'Fatal error at trap location 2' occurs when attempting to
> ( incorrectly ) 'manipulate' a 'File VARiable'
>
> Can you post the C code for the function in which you are using the
> 'STRING_RESIZE_VBI(Message, MsgMax);' ?
>
> Pat.
>
> On May 12, 6:49 am, Bensly <[email protected]> wrote:
> > T24 Error faced:
> >
> > JDIAG OUTPUT:
> > jdiag - jBASE diagnostic '$Revision: 1.15 $'
> >
> > System Information
> > ==================
> >
> > System : AIX che-aix3 1.6 00CEB51C4C00
> > OS Release : 6.1.0.0
> > UNIX User : jdavidar (uid 205, euid 205)
> > Tty name : /dev/pts/15
> > Time : Wed May 12 11:04:35 2010
> >
> > Environment
> > ===========
> >
> > JBCPORTNO : Not Set
> > JBCRELEASEDIR : '/opt/jbc503'
> > JBCGLOBALDIR : '/opt/jbc503'
> > JEDIFILENAME_SYSTEM : '/opt/jbc503/src/SYSTEM'
> > SYSTEM File is (DICT) : '/opt/jbc503/src/SYSTEM]D'
> > RELEASE Information : Major 5.0 , Minor 3 , Patch 0081 (Change
> > 49612)
> > Spooler dir (JBCSPOOLERDIR) : '/opt/jbc503/jspooler'
> > JBCEMULATE : 'prime'
> > Object path (JBCOBJECTLIST) : '/usr/mqm/lib64:/env/sem/bnk/bnk.run/
> > globuspatchlib:/env/sem/bnk/bnk.run/lib:/env/sem/bnk/bnk.run/
> > globuslib:/env/sem/bnk/bnk.run/lib:/env/sem/bnk/bnk.run/vinlib:/env/
> > sem/bnk/bnk.run/semlib'
> > jBASE Compiler Run-time : '/opt/jbc503/config/system.properties'
> > Program dir (JBCDEV_BIN) : '/env/sem/bnk/bnk.run/sembin'
> > Subroutine dir (JBCDEV_LIB) : '/env/sem/bnk/bnk.run/semlib'
> > Max open files : 65534
> >
> > I have the following code part in a C code and have created shared
> > libraries for this code and calling this C from a basic routine. The
> > code is to get message from a MQ Server.
> >
> > STRING_RESIZE_VBI(Message, MsgMax); //
> > Allocate memory to the maximum size defined. have MsgMax as 1000.
> >
> > The above line will be called multiple times as the "MsgMax" varies
> > each time. The first time the code part gets executed it was
> > successful but the next time it is called the following error is
> > thrown.
> >
> > ** Error [ FATAL ] **
> > Fatal error at trap location 2
> >
> > Also the value in the variable "Message" is lost. Does anyone know how
> > to overcome the above error.
> >
> > Any help will be appreciated and thanks in advance.
>
> --
> Please read the posting guidelines at:
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
>
> IMPORTANT: Type T24: at the start of the subject line for questions
> specific to Globus/T24
>
> To post, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>
--
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines
IMPORTANT: Type T24: at the start of the subject line for questions specific to
Globus/T24
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en