Thursday, February 10, 2011

Creating Queue manager using Command Prompt.

****************************************
* Command: crtmqm  -q Apple
****************************************
WebSphere MQ queue manager created.
Creating or replacing default objects for Apple.
Default objects statistics : 43 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.
exitvalue = 0
****************************************
* Command: amqmdain qmgr start Apple
****************************************
WebSphere MQ queue manager 'Apple' starting.
5 log records accessed on queue manager 'Apple' during the log replay phase.
Log replay for queue manager 'Apple' complete.
Transaction manager state recovered for queue manager 'Apple'.
WebSphere MQ queue manager 'Apple' started.
exitvalue = 0
****************************************
* Command: runmqsc Apple
* Input: DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(3414) CONTROL(QMGR)
****************************************
5724-H72 (C) Copyright IBM Corp. 1994, 2004.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager Apple.


     1 : DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(3414) CONTROL(QMGR)
AMQ8626: WebSphere MQ listener created.
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
exitvalue = 0
****************************************
* Command: runmqsc Apple
* Input: START LISTENER('LISTENER.TCP')
****************************************
5724-H72 (C) Copyright IBM Corp. 1994, 2004.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager Apple.


     1 : START LISTENER('LISTENER.TCP')
AMQ8021: Request to start WebSphere MQ Listener accepted.
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
exitvalue = 0
****************************************
* Command: amqmdain auto Apple
****************************************
5724-H72 (C) Copyright IBM Corp. 1994, 2004.  ALL RIGHTS RESERVED.
Queue Manager 'Apple' successfully set to 'Automatic' mode
exitvalue = 0

Tuesday, February 8, 2011

Emails Seperator from Text File


<!-- TWO STEPS TO INSTALL EXTRACT EMAIL ADDRESSES:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Ronnie T. Moore, Editor -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function findEmailAddresses(StrObj) {
var separateEmailsBy = ", ";
var email = "<none>"; // if no match, use this
var emailsArray = StrObj.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
if (emailsArray) {
email = "";
for (var i = 0; i < emailsArray.length; i++) {
if (i != 0) email += separateEmailsBy;
email += emailsArray[i];
      }
   }
return email;
}
//  End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

<center>
<form>
<textarea name=comments rows=10 cols=50 onBlur="this.form.email.value=findEmailAddresses(this.value);"></textarea>
<br>
Email:  <input type=text name=email>
</form>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

Monday, February 7, 2011

Persistence Through Mb Sample Code

Hi All:
CREATE COMPUTE MODULE selectDatabase_Compute
    CREATE FUNCTION Main() RETURNS BOOLEAN
    BEGIN
        -- CALL CopyMessageHeaders();
        -- CALL CopyEntireMessage();
        DECLARE a INTEGER;
        DECLARE Sname CHARACTER;
       
    --    SET a=InputRoot.XMLNSC.message.a;
        --SET Sname =
        SET OutputRoot.XMLNSC.message.
Result[]=PASSTHRU('SELECT SNAME,SNO FROM STUDENT   WHERE SNO= ? WITH UR',InputRoot.XMLNSC.message.a);
        SET Environment.Sname=OutputRoot.XMLNSC.message.Result[1].SNAME;
        SET OutputRoot.XMLNSC=null;
        SET OutputRoot.XMLNSC.Result=Environment.Sname;
        RETURN TRUE;
    END;
// the code above coloured is Mb generated code.





For insertion into the database:


CREATE COMPUTE MODULE selectDatabase_Compute
    CREATE FUNCTION Main() RETURNS BOOLEAN
    BEGIN
        -- CALL CopyMessageHeaders();
        -- CALL CopyEntireMessage();
       
    PASSTHRU('INSERT INTO STUDENT(SNO,SNAME) VALUES(?,?) ',InputRoot.XMLNSC.message.a,InputRoot.XMLNSC.message.b);
    RETURN TRUE;
    END;