Crob job to set all permissions for folder

*/1 * * * * /bin/chmod -R 777 /foldername/foldername/foldername

Connecting SQL with IIB(Message Broker)

  • Execute the following commands in command prompt to setup ODBC Path
  • ODBCINI=/app/mqsi/9.0.0.1/ODBC64/odbc.ini;export ODBCINI
  • ODBCSYSINI=/app/mqsi/9.0.0.1/ODBC64;export ODBCSYSINI
  • IE02_PATH=/opt/ibm/IE02/2.0.1;export IE02_PATH
  1. Go to the /var/mqsi/odbc/ directory in Linux
  2. Download the following files from above specified directory
    • odbc.ini
    • odbcinst.ini
  3. Open odbc.ini file in notepad ++ tool.
  4. Under [ODBC Data Sources] heading add the following line.
    • SQLSERVERDSN=DataDirect 7.0 ODBC SQL Server Wire Protocol
           Here SQLSERVERDSN is a data source name.

       5. Then add the following set of lines into the file.

       [SQLSERVERDSN ]

Driver=/opt/mqsi/iib9.0/ODBC64/V7.0/lib/UKmsss26.so

Description=DataDirect 7.0 ODBC SQL Server Wire Protocol

Address=DBSERVER\SQL_2016

;#Alternative way to locate server using a named instance

;#Address=<Your SQLServer Machine Name>\<Your SQLServer Instance Name>

AnsiNPW=Yes

Database=DB_NAME

QuotedId=No

ColumnSizeAsCharacter=1

LoginTimeout=0

         6.  From the above lines DBSERVER is a sql server machine name and SQL_2016 is a sql server instance name. DB_NAMEis a database name.

         7. Then give ctrl + s to save the file.

         8. After that open the odbcinst.ini file in notepad ++ editor.

         9. Under the [ODBC Drivers] heading add the below line.
          SQLSERVERDSN =Installed
         10. Then add the below code and save the file.

[SQLSERVERDSN ]

Driver=/opt/mqsi/iib9.0/ODBC64/V7.0/lib/UKmsss26.so

          11.  Upload the two updated file to linux broker installed location /var/mqsi/odbc/
          
          12.   Then go to linux terminal execute the following commands.
mqsisetdbparms brokername -n dsn::SQLSERVERDSN -u username -p password
mqsisetdbparms brokername -n odbc::SQLSERVERDSN -u username -p password
12.   To check whether the connection is correct with IIB. Execute the below command
mqsicvp broekrname -n SQLSERVERDSN 
13.   The result will be like successful command completion.




Convert blob to PDF using Java compute


                                                      //Java Code

                   Preconditions:
                        1.Need to use blob parser
                        2.Need to give pdf input
                        3.Need to use java compute node
                        MbElement outerblob = inRoot.getLastChild();
MbElement blob = outerblob.getLastChild();
byte[] mybytes=(byte[]) blob.getValue();

String objFileLocation= "D:\\out.pdf";

OutputStream ostream = new FileOutputStream(objFileLocation);
ostream.write(mybytes);
ostream.close();

Error XSLT Service

Description: Email Error Notification
XSL Style Sheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">

The following error has occurred on Business Process ID <xsl:value-of select="ProcessData/BPDATA/WORKFLOW_ID"/>: <xsl:value-of select="ProcessData/Prev_NotSuccess_Adv_Status"/>.

BP Details
==============================================================================
Error:            <xsl:value-of select="ProcessData/Prev_NotSuccess_Adv_Status"/>
Name:             <xsl:value-of select="ProcessData/BPDATA/WFD_NAME"/>
Description:      <xsl:value-of select="ProcessData/BPDATA/WFD_DESCRIPTION"/>
Workflow ID:      <xsl:value-of select="ProcessData/BPDATA/WORKFLOW_ID"/>
Workflow Version: <xsl:value-of select="ProcessData/BPDATA/WFD_VERSION"/>
State:            <xsl:value-of select="ProcessData/BPDATA/WFD_STATE"/>
Status:           <xsl:value-of select="ProcessData/BPDATA/WFD_STATUS"/>
Priority:         <xsl:value-of select="ProcessData/BPDATA/WFD_PRIORITY"/>
Persistence Level:<xsl:value-of select="ProcessData/BPDATA/WFD_PERSISTENCE_LEVEL"/>
Storage Type:     <xsl:value-of select="ProcessData/BPDATA/WFD_STORAGE_TYPE"/>
Recovery Level:   <xsl:value-of select="ProcessData/BPDATA/WFD_RECOVERY_LEVEL"/>
Doc Tracking Flag:<xsl:value-of select="ProcessData/BPDATA/WFD_DOC_TRACKING_FLAG"/>
BP Deadline:      <xsl:value-of select="ProcessData/BPDATA/WFD_DEADLINE_INTERVAL"/>
==============================================================================

Correlation BUSINESS PROCESS Details
==============================================================================
<xsl:for-each select="ProcessData/WF_CORRELATIONS/correlation">
  <xsl:if test="correlationType='BUSINESS PROCESS'">
Name = <xsl:value-of select="name"/> Value = <xsl:value-of select="value"/>
  </xsl:if>
</xsl:for-each>
==============================================================================
 
Correlation DOCUMENT Details
==============================================================================
<xsl:for-each select="ProcessData/WF_CORRELATIONS/correlation">
  <xsl:if test="correlationType='DOCUMENT'">
Name = <xsl:value-of select="name"/> Value = <xsl:value-of select="value"/>
Document = <xsl:value-of select="docId"/>
  </xsl:if>
</xsl:for-each>
==============================================================================
http://hostname:port/ws

</xsl:template>
</xsl:stylesheet>

Blob data to original content

Converting the blob data to original content in ESQL 

DECLARE objValue CHARACTER; 
Set objValue = CAST(InputRoot.BLOB.BLOB as char CCSID 1208 Encoding 815);