Mastering ESQL In One Day

Can someone master ESQL in just one day? YES, ESQL is not like any other programming language which has lot of statements and libraries to know. It is the most simplest language that I’ve ever seen.

The statements are limited, syntax is simple and learning is super easy. As an ACE/IIB developer, what do you do most of the time? Writing ESQL code ? Then, are you harvesting the real power of ESQL?

This one day training program is going to show you the real power of ESQL. It is going to explain you from the basics to advanced statements with examples

Here is what we’re going to cover in the course.

  1. Introduction
  2. Data Types
    1. Boolean
      1. TRUE
      2. FALSE
      3. UNKNOWN
    2. DateTime
    3. NULL
    4. Numeric
      1. DECIMAL
      2. FLOAT
      3. INTEGER
    5. Reference
    6. String
      1. BIT
      2. BLOB
      3. CHARACTER
  3. Correlation Names
    1. Root
    2. FirstChild
    3. LastChild
    4. FirstSibling
    5. NextSibling
    6. PreviousSibling
    7. LastSibling
  4. Message Components
    1. Properties
    2. Message Domain
    3. Environment
    4. Local Environment
    5. Exception List
  5. Variables
    1. Declaration
    2. Normal
    3. External
    4. Shared
    5. Scope
  6. Operators
    1. Simple Comparison 
      1. >, >=, <, <=, <> & =
    2. Complex Comparison
      1. BETWEEN
      2. EXISTS
      3. IN
      4. IS
      5. LIKE
      6. SINGULAR
    3. Logical
      1. AND
      2. OR
      3. NOT
    4. Numeric
    5. String
  7. Field References
  8. Field Types
    1. NAME
    2. TYPE
    3. NAMEVALUE
  9. Conditional Statements
    1. IF….ELSEIF…..ELSE
    2. CASE
      1. Simple
      2. Searched
  10. Looping Statements
    1. REPEAT UNTIL
    2. WHILE
    3. FOR
    4. LABELED LOOP
    5. ITERATE
    6. LEAVE
    7. RETURN
  11. Error Handling
    1. THROW
    2. DECLARE HANDLER
  12. Modules
    1. Procedures
    2. Functions
    3. CALL
    4. MOVE
    5. LASTMOVE
  13. Handling NULL values
  14. Propagating Multiple Messages
  15. List Functions
    1. CARDINALITY
    2. EXISTS
    3. SINGULAR
    4. THE
    5. ITEM
  16. Complex Functions
    1. CAST
    2. FORMAT
    3. SELECT
      1. Simple
      2. Complex
    4. ROW
    5. LIST
    6. ROW & LIST Combined
  17. Working with Database
    1. INSERT
    2. SELECT
    3. UPDATE
    4. DELETE
    5. PASSTHRU
    6. Stored Procedures
  18. Manipulating repeating fields
  19. Calling Java methods
  20. String Functions
    1. CONTAINS
    2. ENDSWITH
    3. LEFT
    4. LENGTH
    5. LOWER
    6. LTRIM
    7. OVERLAY
    8. POSITION
    9. REPLACE
    10. REPLICATE
    11. RIGHT
    12. RTRIM
    13. SPACE
    14. STARTSWITH
    15. SUBSTRING
    16. TRANSLATE
    17. TRIM
    18. UPPER
  21. Miscellaneous
    1. ATTACH
    2. DETACH
    3. PATH
    4. BROKER SCHEMA
    5. DECLARE
    6. CREATE FIELD
    7. DELETE FIELD
    8. COALESCE 
    9. SLEEP
    10. UUIDASCHAR
    11. ASBITSTREAM
    12. EXTRACT

As the trainer has more than 15+ years of experience in ESQL, you can ask him any questions related to ESQL. If you’ve complex requirement, ask him how to resolve it during the training. So, why wait ?

Enroll into the training program and become a Master in ESQL in One Day.

Event Timing: Nov 27, 2021 ( 10 AM EST to 5 PM EST )
Event Address: Online
Contact us at (612) 305-8684 or support@vaithu.com

Course Fee: USD : 75$/ INR 5000

For bulk booking (>= 5 students), we provide a discount of 35% ( register on or before Nov 23, 2021 )

Early Bird offer : 10% discount ( register on or before Nov 23, 2021 )

To register the training, click here : shorturl.at/bpuLO

Alternative Link : https://docs.google.com/forms/d/e/1FAIpQLSd9GuiYIV7Kh18MwLUjqbwqFHL-n4RGl68Goaxm3LShMvV03A/viewform?entry.2109138769=Yes

Message Set to DFDL Automatic Conversion

Daffodils

Recently we’ve started working on migrating stuffs from WMBv7 to ACEv12. The biggest challenge we’ve encountered is so far is, converting the message sets to DFDLs. Please note I’m talking about Custom Wire Formats not Cobol copy books.

I’d say it is one of the most difficult task I’ve encountered so far because the messages sets are all EDIFACT ( IBM 500 ) messages with different initiators, separators and terminators along with various padding characters and justification configuration.

So, thought of finding some automatic solution in Google but no luck. There are 100+ models need to be converted in next couple of months. All I can do so far is, write a java program to read the MXSD files and clean up the unnecessary stuffs. Also, tried to have the group indicators/terminators and delimiters converted into DFDL annotations.

This is not a 100% working solution but definitely helping a lot to quickly have the DFDL created. If you’ve any better solution, please feel free to add in the comments.

import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileSystemView;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;


public class TDSCleaner {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());

        int returnValue = jfc.showOpenDialog(null);

        if (returnValue == JFileChooser.APPROVE_OPTION) {
            File selectedFile = jfc.getSelectedFile();
            System.out.println(selectedFile.getAbsolutePath());
            
            Path path = Paths.get(selectedFile.getAbsolutePath());
            
            List&lt;String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
            List&lt;String> newLine = new ArrayList&lt;>();
            /*String rootElm = JOptionPane.showInputDialog("Enter the root element name");
            
            
            if (rootElm != null) {
				rootElm = "       01  "+FilenameUtils.getBaseName(selectedFile.getAbsolutePath())+".";
				newLine.add(rootElm);
			}
            
            String rootElm =  "       01  "+FilenameUtils.getBaseName(selectedFile.getAbsolutePath())+".";
            newLine.add(rootElm);*/
            String delimiter,groupTerminator,groupIndicator;
            delimiter = null;
    		groupTerminator = null;
    		groupIndicator = null;
            
            for (String line : lines) {
				
            	if (!StringUtils.containsAny(line, "annotation","appinfo",
            			"MRMessage","MRMessage","MRComplexType","tdsElemRep"))  {
					
            		if (line.contains("tdsStructRep")) {
            			
            			line = StringUtils.replace(line, "&amp;lt;U+001D&amp;gt;", "%GS;");
            			line = StringUtils.replace(line, "&amp;lt;U+001C&amp;gt;", "%FS;");
            			
            			if (line.contains("groupIndicator")) {
							groupIndicator = "dfdl:initiator="+StringUtils.substringBetween(line, "groupIndicator=", " ");
						}
            			
            			if (line.contains("groupTerminator")) {
            				groupTerminator = "dfdl:terminator="+StringUtils.substringBetween(line, "groupTerminator=", " ");
						}
            			
            			if (line.contains("delimiter")) {
            				delimiter = "dfdl:separator="+StringUtils.substringBetween(line, "delimiter=", " ");
						}
            			
            			continue;
            			
					}
            		
            		if (line.contains("&lt;xsd:sequence")) {
            			
            			if (delimiter != null) {
            				line = StringUtils.replace(line, ">", " ")+delimiter+">";
						}
            			
            			if (groupIndicator != null) {
            				line = StringUtils.replace(line, ">", " ")+groupIndicator+">";
						}
            			
            			if (groupTerminator != null) {
            				line = StringUtils.replace(line, ">", " ")+groupTerminator+">";
						}
            			
            		}
            		
            		
            		delimiter = null;
            		groupTerminator = null;
            		groupIndicator = null;
            		
            		newLine.add(line);
            		System.out.println(line);
				}
            	
			}
            
            if (!lines.isEmpty()) {
            	
            	String cpyFileName = FilenameUtils.getFullPath(selectedFile.getAbsolutePath())
            			+"Modified_"+FilenameUtils.getBaseName(selectedFile.getName())+".xsd";
            	System.out.println(cpyFileName);
            	
            	FileUtils.writeLines(new File(cpyFileName), newLine);
            	
            	JOptionPane.showMessageDialog(null, "File created successfully");
				
			} else {
				JOptionPane.showMessageDialog(null, "Lines are empty check your source file");
			}
        }

	}

}

How do I capture the messages on the fly in IIB?

IBM has provided lot of ways to capture the messages flowing through our message flows. In this post, we are going to discuss about one of them and it is also one of the most unnoticed.

IIB allows you to capture the messages by enabling monitoring profile or by writing custom subflows or using trace nodes.

The most frequently used one is subflows and now a days people use monitoring profile too a lot. There are companies which do not have logs at all ( don’t know how they survive).

Have you ever used Record & Replay? If not, just google to get some basic idea on how that works.

This post is also utilizing the same Record & Replay concept but it does on the fly. I do not have any database setup to store the messages permanently. Just going with built-in capacity of the Integration node.

Let me put here the sequence of steps to achieve this

  1. Enable recording
  2. Enable Injection
  3. Retrieve Recorded Message

Let me put here the Java APIs used here

public void enableRecording(ExecutionGroupProxy proxy, boolean status) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException {
		
		if (status) {
			proxy.setTestRecordMode(AttributeConstants.MODE_ENABLED);
		}else {
			// clear recorded data and reset server to turn off recording and injection
			proxy.clearRecordedTestData();
			proxy.setTestRecordMode(AttributeConstants.MODE_DISABLED);
		}
		
		enableInjection(proxy, status);
	}
	
	public void enableInjection(ExecutionGroupProxy proxy, boolean status) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException {
		
		if (status) {
			proxy.setInjectionMode(AttributeConstants.MODE_ENABLED);
		}else {
			// clear recorded data and reset server to turn off recording and injection
			proxy.setInjectionMode(AttributeConstants.MODE_DISABLED);
		}
	}
public List<RecordedTestData> retreiveRecordedMessage(MessageFlowProxy mf) throws ConfigManagerProxyPropertyNotInitializedException, ConfigManagerProxyLoggedException {
		
		Properties filterProps = new Properties();
		String name = getApplication(mf).getName();
//		System.out.println(name);
		if (name != null) {
			filterProps.setProperty(Checkpoint.PROPERTY_APPLICATION_NAME,name);
		}else {
			name = getLibraryProxy(mf).getName();
			if (name != null) {
				filterProps.setProperty(Checkpoint.PROPERTY_LIBRARY_NAME,name);
			}
		}
//		System.out.println(mf.getName());
		filterProps.setProperty(Checkpoint.PROPERTY_MESSAGE_FLOW_NAME,mf.getName());
		
//		ExecutionGroupProxy egProxy = mf.getExecutionGroup();
//		List<RecordedTestData> dataList = egProxy.getRecordedTestData(filterProps);
		
		return mf.getExecutionGroup().getRecordedTestData(filterProps);
	}

That’s it. Once you enable recording, the message flow automatically turns into like this

The recorded message is here (I’ve a UI to make this easier to read)

Here is the local environment message

<localEnvironment xmlns:iib="http://com.ibm.iib/lt/1.0" iib:parser="MQROOT" iib:injectable="true">
   <MQTT>
      <Input>
         <Retained iib:valueType="BOOLEAN">FALSE</Retained>
         <QualityOfService iib:valueType="INTEGER">0</QualityOfService>
         <Topic iib:valueType="CHARACTER">IBM/IntegrationBus/default/Monitoring/Hello</Topic>
         <Duplicate iib:valueType="BOOLEAN">FALSE</Duplicate>
      </Input>
   </MQTT>
</localEnvironment>

And here is the payload

<message xmlns:iib="http://com.ibm.iib/lt/1.0" iib:parser="GENERICROOT" iib:injectable="true">
   <Properties iib:parser="GENERICPROPERTYPARSER">
      <MessageSet iib:valueType="CHARACTER" iib:elementType="0x03000000"></MessageSet>
      <MessageType iib:valueType="CHARACTER" iib:elementType="0x03000000"></MessageType>
      <MessageFormat iib:valueType="CHARACTER" iib:elementType="0x03000000"></MessageFormat>
      <Encoding iib:valueType="INTEGER">546</Encoding>
      <CodedCharSetId iib:valueType="INTEGER">5348</CodedCharSetId>
      <Transactional iib:valueType="BOOLEAN">TRUE</Transactional>
      <Persistence iib:valueType="BOOLEAN">FALSE</Persistence>
      <CreationTime iib:valueType="GMTTIMESTAMP">2021-04-13 16:54:58.451</CreationTime>
      <ExpirationTime iib:valueType="INTEGER">-1</ExpirationTime>
      <Priority iib:valueType="INTEGER">0</Priority>
      <ReplyIdentifier iib:valueType="BLOB"></ReplyIdentifier>
      <ReplyProtocol iib:valueType="CHARACTER">UNKNOWN</ReplyProtocol>
      <Topic iib:elementType="0x03000000"/>
      <ContentType iib:valueType="CHARACTER" iib:elementType="0x03000000"></ContentType>
      <IdentitySourceType iib:valueType="CHARACTER" iib:elementType="0x03000000"></IdentitySourceType>
      <IdentitySourceToken iib:valueType="CHARACTER" iib:elementType="0x03000000"></IdentitySourceToken>
      <IdentitySourcePassword iib:valueType="CHARACTER" iib:elementType="0x03000000"></IdentitySourcePassword>
      <IdentitySourceIssuedBy iib:valueType="CHARACTER" iib:elementType="0x03000000"></IdentitySourceIssuedBy>
      <IdentityMappedType iib:valueType="CHARACTER" iib:elementType="0x03000000"></IdentityMappedType>
      <IdentityMappedToken iib:valueType="CHARACTER" iib:elementType="0x03000000"></IdentityMappedToken>
      <IdentityMappedPassword iib:valueType="CHARACTER" iib:elementType="0x03000000"></IdentityMappedPassword>
      <IdentityMappedIssuedBy iib:valueType="CHARACTER" iib:elementType="0x03000000"></IdentityMappedIssuedBy>
   </Properties>
   <XMLNSC iib:parser="xmlnsc">
      <wmb:event xmlns:wmb="http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event">
         <wmb:eventPointData>
            <wmb:eventData>
               <wmb:productVersion iib:valueType="CHARACTER" iib:elementType="0x03000100">100011</wmb:productVersion>
               <wmb:eventSchemaVersion iib:valueType="CHARACTER" iib:elementType="0x03000100">6.1.0.3</wmb:eventSchemaVersion>
               <wmb:eventSourceAddress iib:valueType="CHARACTER" iib:elementType="0x03000100">MQ Input.transaction.Start</wmb:eventSourceAddress>
               <wmb:eventIdentity>
                  <wmb:eventName iib:valueType="CHARACTER" iib:elementType="0x03000100">OrderReceived</wmb:eventName>
               </wmb:eventIdentity>
               <wmb:eventSequence>
                  <wmb:creationTime iib:valueType="CHARACTER" iib:elementType="0x03000100">2020-06-01T02:02:32.402892Z</wmb:creationTime>
                  <wmb:counter iib:valueType="CHARACTER" iib:elementType="0x03000100">1</wmb:counter>
               </wmb:eventSequence>
               <wmb:eventCorrelation>
                  <wmb:localTransactionId iib:valueType="CHARACTER" iib:elementType="0x03000100">f8a1af6d-013b-4420-9c1b-baf23d5e10a4-5</wmb:localTransactionId>
                  <wmb:parentTransactionId iib:valueType="CHARACTER" iib:elementType="0x03000100"></wmb:parentTransactionId>
                  <wmb:globalTransactionId iib:valueType="CHARACTER" iib:elementType="0x03000100"></wmb:globalTransactionId>
               </wmb:eventCorrelation>
            </wmb:eventData>
            <wmb:messageFlowData>
               <wmb:broker>
                  <wmb:name iib:valueType="CHARACTER" iib:elementType="0x03000100">IB10NODE</wmb:name>
                  <wmb:UUID iib:valueType="CHARACTER" iib:elementType="0x03000100">b7d2e6dd-0b36-4728-9015-818133dbeb14</wmb:UUID>
               </wmb:broker>
               <wmb:executionGroup>
                  <wmb:name iib:valueType="CHARACTER" iib:elementType="0x03000100">default</wmb:name>
                  <wmb:UUID iib:valueType="CHARACTER" iib:elementType="0x03000100">61704de3-b47c-4b23-b95f-0ffd934fdcb1</wmb:UUID>
               </wmb:executionGroup>
               <wmb:messageFlow>
                  <wmb:uniqueFlowName iib:valueType="CHARACTER" iib:elementType="0x03000100">IB10NODE.default.TestMon.TestMon</wmb:uniqueFlowName>
                  <wmb:name iib:valueType="CHARACTER" iib:elementType="0x03000100">TestMon</wmb:name>
                  <wmb:UUID iib:valueType="CHARACTER" iib:elementType="0x03000100">429ff9ef-1c8d-48c1-bf42-99ac3bd247fb</wmb:UUID>
                  <wmb:threadId iib:valueType="CHARACTER" iib:elementType="0x03000100">21980</wmb:threadId>
               </wmb:messageFlow>
               <wmb:node>
                  <wmb:nodeLabel iib:valueType="CHARACTER" iib:elementType="0x03000100">MQ Input</wmb:nodeLabel>
                  <wmb:nodeType iib:valueType="CHARACTER" iib:elementType="0x03000100">ComIbmMQInputNode</wmb:nodeType>
                  <wmb:detail iib:valueType="CHARACTER" iib:elementType="0x03000100">IN.Q</wmb:detail>
               </wmb:node>
            </wmb:messageFlowData>
         </wmb:eventPointData>
         <wmb:applicationData xmlns="">
            <wmb:complexContent>
               <wmb:elementName iib:valueType="CHARACTER" iib:elementType="0x03000100">MQMD</wmb:elementName>
               <MQMD>
                  <SourceQueue iib:valueType="CHARACTER">IN.Q</SourceQueue>
                  <Transactional iib:valueType="CHARACTER">true</Transactional>
                  <Encoding iib:valueType="CHARACTER">273</Encoding>
                  <CodedCharSetId iib:valueType="CHARACTER">1208</CodedCharSetId>
                  <Format iib:valueType="CHARACTER">MQSTR   </Format>
                  <Version iib:valueType="CHARACTER">2</Version>
                  <Report iib:valueType="CHARACTER">0</Report>
                  <MsgType iib:valueType="CHARACTER">8</MsgType>
                  <Expiry iib:valueType="CHARACTER">-1</Expiry>
                  <Feedback iib:valueType="CHARACTER">0</Feedback>
                  <Priority iib:valueType="CHARACTER">0</Priority>
                  <Persistence iib:valueType="CHARACTER">0</Persistence>
                  <MsgId iib:valueType="CHARACTER">414d5120494942763130514d475220204064d15e10000105</MsgId>
                  <CorrelId iib:valueType="CHARACTER">000000000000000000000000000000000000000000000000</CorrelId>
                  <BackoutCount iib:valueType="CHARACTER">0</BackoutCount>
                  <ReplyToQ iib:valueType="CHARACTER">                                                </ReplyToQ>
                  <ReplyToQMgr iib:valueType="CHARACTER">IIBv10QMGR                                      </ReplyToQMgr>
                  <UserIdentifier iib:valueType="CHARACTER">vaithu      </UserIdentifier>
                  <AccountingToken iib:valueType="CHARACTER">160105150000002d74cc5dfa721e73431607412b32030000000000000000000b</AccountingToken>
                  <ApplIdentityData iib:valueType="CHARACTER">                                </ApplIdentityData>
                  <PutApplType iib:valueType="CHARACTER">28</PutApplType>
                  <PutApplName iib:valueType="CHARACTER">vaithu</PutApplName>
                  <PutDate iib:valueType="CHARACTER">2020-06-01</PutDate>
                  <PutTime iib:valueType="CHARACTER">02:02:32.480</PutTime>
                  <ApplOriginData iib:valueType="CHARACTER">    </ApplOriginData>
                  <GroupId iib:valueType="CHARACTER">000000000000000000000000000000000000000000000000</GroupId>
                  <MsgSeqNumber iib:valueType="CHARACTER">1</MsgSeqNumber>
                  <Offset iib:valueType="CHARACTER">0</Offset>
                  <MsgFlags iib:valueType="CHARACTER">0</MsgFlags>
                  <OriginalLength iib:valueType="CHARACTER">-1</OriginalLength>
               </MQMD>
            </wmb:complexContent>
         </wmb:applicationData>
         <wmb:bitstreamData>
            <wmb:bitstream iib:valueType="CHARACTER">TUQgIAIAAAAAAAAACAAAAP////8AAAAAEQEAALgEAABNUVNUUiAgIAAAAAAAAAAAQU1RIElJQnYxMFFNR1IgIEBk0V4QAAEFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElJQnYxMFFNR1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN4cDI2NyAgICAgIBYBBRUAAAAtdMxd+nIec0MWB0ErMgMAAAAAAAAAAAALICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAcAAAAZ21haWwuc3Jpbml2YXNhLkFwcGxpY2F0aW9uIDIwMjAwNjAxMDIwMjMyNDggICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAA/////zxPcmRlcnM+CiAgIDxPcmRlcj4KICAgICAgPEN1c3RvbWVySUQ+R1JFQUw8L0N1c3RvbWVySUQ+CiAgICAgIDxFbXBsb3llZUlEPjY8L0VtcGxveWVlSUQ+CiAgICAgIDxPcmRlckRhdGU+MTk5Ny0wNS0wNlQwMDowMDowMDwvT3JkZXJEYXRlPgogICAgICA8UmVxdWlyZWREYXRlPjE5OTctMDUtMjBUMDA6MDA6MDA8L1JlcXVpcmVkRGF0ZT4KICAgICAgPFNoaXBJbmZvIFNoaXBwZWREYXRlPSIxOTk3LTA1LTA5VDAwOjAwOjAwIj4KICAgICAgICAgPFNoaXBWaWE+MjwvU2hpcFZpYT4KICAgICAgICAgPEZyZWlnaHQ+My4zNTwvRnJlaWdodD4KICAgICAgICAgPFNoaXBOYW1lPkdyZWF0IExha2VzIEZvb2QgTWFya2V0PC9TaGlwTmFtZT4KICAgICAgICAgPFNoaXBBZGRyZXNzPjI3MzIgQmFrZXIgQmx2ZC48L1NoaXBBZGRyZXNzPgogICAgICAgICA8U2hpcENpdHk+RXVnZW5lPC9TaGlwQ2l0eT4KICAgICAgICAgPFNoaXBSZWdpb24+T1I8L1NoaXBSZWdpb24+CiAgICAgICAgIDxTaGlwUG9zdGFsQ29kZT45NzQwMzwvU2hpcFBvc3RhbENvZGU+CiAgICAgICAgIDxTaGlwQ291bnRyeT5VU0E8L1NoaXBDb3VudHJ5PgogICAgICA8L1NoaXBJbmZvPgogICA8L09yZGVyPgo8L09yZGVycz4=<wmb:encoding iib:valueType="CHARACTER" iib:elementType="0x03000100">base64Binary</wmb:encoding>
            </wmb:bitstream>
         </wmb:bitstreamData>
      </wmb:event>
   </XMLNSC>
</message>

By this way, if you’ve a need to immediately see what is flowing through your messages, simply implement this solution and see the messages on the fly. Once done, clear up the recordings.

If you’re interested to know more about this solution, feel free to contact us at support@vaithu.com. WhatsApp +1 6123058684.

Setup IIB Logging in 10 minutes

Are you using log4j or any custom subflow to capture the IN and OUT messages but looking for a simple solution which

  • captures all messages, not just IN & OUT but also exception message
  • captures the header values, environment values etc
  • does not need you to add subflows or log4j node
  • works with simple configuration like enabling monitoring profile and that’s it
  • automatically creates the log based on Node/ServerName/FlowName

A simple flow like this does all the magic for you.

IIB Transaction Monitor Flow
MQTT properties
UDP to specify Log4j config file location
2021-04-11 19:05:14.889 [Thread-30] INFO  - ----------------------------------------Transaction Starts---------------------------------------------------------
2021-04-11 19:05:14.889 [Thread-30] INFO  - Event Number :1
2021-04-11 19:05:14.889 [Thread-30] INFO  - Data Element Name :MQMD
2021-04-11 19:05:14.889 [Thread-30] INFO  - ***********************************************************************
2021-04-11 19:05:14.889 [Thread-30] INFO  - SourceQueue : IN.Q
2021-04-11 19:05:14.889 [Thread-30] INFO  - Transactional : true
2021-04-11 19:05:14.889 [Thread-30] INFO  - Encoding : 273
2021-04-11 19:05:14.889 [Thread-30] INFO  - CodedCharSetId : 1208
2021-04-11 19:05:14.889 [Thread-30] INFO  - Format : MQSTR   
2021-04-11 19:05:14.889 [Thread-30] INFO  - Version : 2
2021-04-11 19:05:14.905 [Thread-30] INFO  - Report : 0
2021-04-11 19:05:14.905 [Thread-30] INFO  - MsgType : 8
2021-04-11 19:05:14.905 [Thread-30] INFO  - Expiry : -1
2021-04-11 19:05:14.905 [Thread-30] INFO  - Feedback : 0
2021-04-11 19:05:14.905 [Thread-30] INFO  - Priority : 0
2021-04-11 19:05:14.905 [Thread-30] INFO  - Persistence : 0
2021-04-11 19:05:14.905 [Thread-30] INFO  - MsgId : 414d5120494942763130514d475220204064d15e10000105
2021-04-11 19:05:14.905 [Thread-30] INFO  - CorrelId : 000000000000000000000000000000000000000000000000
2021-04-11 19:05:14.905 [Thread-30] INFO  - BackoutCount : 0
2021-04-11 19:05:14.905 [Thread-30] INFO  - ReplyToQ :                                                 
2021-04-11 19:05:14.905 [Thread-30] INFO  - ReplyToQMgr : IIBv10QMGR                                      
2021-04-11 19:05:14.905 [Thread-30] INFO  - UserIdentifier : vaithu      
2021-04-11 19:05:14.905 [Thread-30] INFO  - AccountingToken : 160105150000002d74cc5dfa721e73431607412b32030000000000000000000b
2021-04-11 19:05:14.905 [Thread-30] INFO  - ApplIdentityData :                                 
2021-04-11 19:05:14.905 [Thread-30] INFO  - PutApplType : 28
2021-04-11 19:05:14.905 [Thread-30] INFO  - PutApplName : vaithu
2021-04-11 19:05:14.905 [Thread-30] INFO  - PutDate : 2020-06-01
2021-04-11 19:05:14.905 [Thread-30] INFO  - PutTime : 02:02:32.480
2021-04-11 19:05:14.905 [Thread-30] INFO  - ApplOriginData :     
2021-04-11 19:05:14.905 [Thread-30] INFO  - GroupId : 000000000000000000000000000000000000000000000000
2021-04-11 19:05:14.905 [Thread-30] INFO  - MsgSeqNumber : 1
2021-04-11 19:05:14.905 [Thread-30] INFO  - Offset : 0
2021-04-11 19:05:14.905 [Thread-30] INFO  - MsgFlags : 0
2021-04-11 19:05:14.905 [Thread-30] INFO  - OriginalLength : -1
2021-04-11 19:05:14.905 [Thread-30] INFO  - ***********************************************************************
2021-04-11 19:05:14.905 [Thread-30] INFO  - OrderReceived Payload :
MD            ÿÿÿÿ      ¸  MQSTR           AMQ IIBv10QMGR  @dÑ^                                                                             IIBv10QMGR                                      sxp267         -tÌ]úrsCA+2                                            gmail.srinivasa.Application 2020060102023248                                       ÿÿÿÿ<Orders>
   <Order>
      <CustomerID>GREAL</CustomerID>
      <EmployeeID>6</EmployeeID>
      <OrderDate>1997-05-06T00:00:00</OrderDate>
      <RequiredDate>1997-05-20T00:00:00</RequiredDate>
      <ShipInfo ShippedDate="1997-05-09T00:00:00">
         <ShipVia>2</ShipVia>
         <Freight>3.35</Freight>
         <ShipName>Great Lakes Food Market</ShipName>
         <ShipAddress>2732 Baker Blvd.</ShipAddress>
         <ShipCity>Eugene</ShipCity>
         <ShipRegion>OR</ShipRegion>
         <ShipPostalCode>97403</ShipPostalCode>
         <ShipCountry>USA</ShipCountry>
      </ShipInfo>
   </Order>
</Orders>
2021-04-11 19:05:14.905 [Thread-30] INFO  - ----------------------------------------Transaction Ends---------------------------------------------------------

There is much more. Yes, there is a session planned for Apr 25, 2021 10 AM EST. The session fee is $15. If you’re interested to attend, contact us at support@vaithu.com/ WhatsApp +1 6123058684

We’ll show you how to setup this logging with complete demo and share you the (production tested) code too for free.

IIB Useful Commands

BASIC COMMANDS:

Command for listing out all the Brokers created in the current installation

  • mqsilist

 

Command for creating the broker

  • mqsicreatebroker {BROKERNAME} -q {QMGRNAME} -i {USERNAME} -p {Password}

 

Command for Excecution group creation

  • mqsicreateexecutiongroup  {BROKERNAME} -e {EGName}

 

Command to start Execution group

  • mqsistartmsgflow {BROKERNAME} -e {EGName}

 

Command to stop Execution Group

  • mqsistopmsgflow {BROKERNAME} -e {EGName}

 

Command for deleting Execution Group

  • mqsideleteexecutiongroup -n {BROKERNAME} -e {EGName}

 

Command to specify Debug Port for EG

  • mqsichangeproperties {BROKERNAME} -e default -o ComIbmJVMManager -n jvmDebugPort -v 8117

 

Command for  Listing out all the deployed objects under Execution Group

  • mqsilist {BROKERNAME} -e default -k myApplication

 

Command for listing out all the deployed objects that are configured Library

  • mqsilist {BROKERNAME} -e default -k myApplication -y {myEGLibraryName}

 

Command to return detailed information about Application

  • mqsilist {BROKERNAME} -e default -k myApplication -d2

 

Command for listing all deployed objects that are configured in  myApplication

  • mqsilist {BROKERNAME} -e default -k myApplication -r

 

Command to list out a summary of the EG that are defined on a  broker

  • mqsilist {BROKERNAME}

 

Command for displaying detailed info about all resources for brokers on Local System

  • mqsilist -a -r -d2

 

NORMAL COMMANDS:

Command to start the Application

  • mqsistartmsgflow {BROKERNAME} -e {EGName} -k {ApplicationName}

 

Command to stop the Application

  • mqsistoptmsgflow {BROKERNAME} -e {EGName} -k {ApplicationName}

 

Command to delete the Application

  • mqsideploy {BROKERNAME} -e {EGName} -d {ApplicationName}

 

Command to know the Deployment Status

  • mqsilist {BROKERNAME} -e {EGName} -d 2

 

Command to deploy the BAR

  • mqsideploy {BROKERNAME} -e {EGName} -a {BARFileName}

 

Command to delete the BAR

  • mqsideploy {BROKERNAME} -e {EGName} -d {BARFileName}

 

Command to read the BAR

  • mqsireadbar -b {BARFileName} -r

 

BAR Override Command

  • mqsiapplybaroverride -b {BARFileName} -k {ApplicationName} -m {MessageFlowName}#{Property to change}

 

SECURITY IDENTITY COMMANDS:

Command to start the Broker

  • mqsistart {BROKERNAME};

 

Command to stop the Broker

  • mqsistop {BROKERNAME};

 

Command to register DSN with IIB

  • mqsisetdbparms {BROKERNAME} -n {DSName} -u {SchemaName} -p {Password};

 

Command to know whether Broker is associated with DSN or Not

  • mqsicvp {BROKERNAME} -n {DSName}

 

Command to give security for FTP

  • mqsisetdbparms {BROKERNAME} -n ftp::{SeuID} -u {SchemaName} -p {Password};

 

Command to give security for SMTP(Email Receiving)

  • mqsisetdbparms {BROKERNAME} -n smtp::{SeuID} -u {emailid} -p {Password};

 

Command to give security for Email Sending

  • mqsisetdbparms {BROKERNAME} -n email::{SeuID} -u {emailid} -p {Password};

 

Command to give security for JDBC Configurable Service

  • mqsisetdbparms {BROKERNAME} -n jdbc::{SeuID} -u {SchemaName} -p {Password};

 

 MONITORING COMMANDS:

Command to activate the Monitoring

  • mqsichangeflowmonitoring {BROKERNAME} -e default -k {ApplicationName} -f {FlowName} -c active

 

Command to report the Monitoring

  • mqsireportflowmonitoring {BROKERNAME} -e default -k {ApplicationName} -f {FlowName} -a

 

MQSICHANGE PROPERTY COMMANDS:

Command to report the HTTP Listener Property at Broker Level

  • mqsireportproperties {BROKERNAME} -b httplistener -o HTTPConnector -a

 

Command to report the HTTP Listener Property at EG Level

  • mqsireportproperties {BROKERNAME} -e default -o HTTPConnector -a

 

Command to Change the HTTP Listener Port Number(Broker Level)

  • mqsichangeproperties {BROKERNAME} -b httplistener -o HTTPConnector -n port -v 7800

 

Command to change the HTTP Listener Port Number at EG Level

  • mqsichangeproperties {BROKERNAME} -e default -o HTTPConnector -n port -v 7800

 

Command to Trace the HTTPListener

 

  • mqsireportbroker {BROKERNAME}