Skip to content Skip to sidebar Skip to footer

Read File Line by Line and Push to Mq

  • Release Information

    • About...
    • Release Notes

      • New and Enhanced Features for InterSystems IRIS 2021.2
      • Full general Upgrade Data
      • Upgrade Compatibility Checklist for InterSystems IRIS 2021.2
      • Known Problems and Notes
      • Deprecated and Discontinued Features
      • Licensing and Utilize of InterSystems Web Server
    • Supported Platforms

      • Supported Technologies
      • Supported Languages
      • Discontinued Platforms and Technologies
      • Supported Version Interoperability
      • Cross-Product Applied science Matrix
    • Beginning Looks
    • Downloading Samples
  • Deployment

    • Almost...
    • Containers

      • Nigh...
      • First Look
      • Try a Customs Edition Container
      • Running in Containers
      • InterSystems Cloud Director

        • Virtually...
        • InterSystems Deject Manager
        • InterSystems Cloud Manager Guide

          • ICM Overview
          • Essential InterSystems Cloud Manager Elements
          • Using InterSystems Cloud Manager
          • ICM Reference
          • Containerless Deployment
          • Sharing ICM Deployments
          • Scripting with ICM
          • Using ICM with Custom and Third-Party Containers
          • Deploying on a Preexisting Cluster
      • InterSystems Kubernetes Operator

        • Near...
        • Using the InterSystems Kubernetes Operator
    • Installation Kit

      • About...
      • Installation Basics
      • Installation Guide

        • Preparing to Install InterSystems IRIS
        • Installing InterSystems IRIS on Microsoft Windows
        • Installing InterSystems IRIS on UNIX®, Linux, and macOS
        • Upgrading InterSystems IRIS
        • Creating and Using an Installation Manifest
        • Calculation UNIX® Installation Packages to an InterSystems IRIS Distribution
    • Configuration

      • About...
      • Automating Configuration
      • Configuration Parameters

        • Introduction to the Configuration Parameter File
        • [Actions]
        • [ComPorts]
        • [config]
        • [ConfigFile]
        • [Databases]
        • [Debug]
        • [Devices]
        • [DeviceSubTypes]
        • [ECP]
        • [ECPServers]
        • [Gateways]
        • [IO]
        • [Journal]
        • [LicenseServers]
        • [Map]
        • [MapMirrors]
        • [MirrorMember]
        • [Mirrors]
        • [Miscellaneous]
        • [Monitor]
        • [Namespaces]
        • [SQL]
        • [SqlSysDatatypes]
        • [SqlUserDatatypes]
        • [Startup]
        • [Telnet]
        • [WorkQueues]
    • Data Migration

      • Near...
      • Server Migration
      • ISQL Migration Guide

        • Overview
      • Transact-SQL (TSQL) Migration Guide

        • Planning and Performing TSQL Migration
        • InterSystems TSQL Constructs
        • InterSystems TSQL Language Elements
        • TSQL Commands
        • TSQL Settings
        • TSQL Functions
        • TSQL Variables
        • TSQL Arrangement Stored Procedures
      • DataMove
    • Adding Compiled Code
  • Administration

    • About...
    • System Administration

      • Using the Management Portal
      • Configuring InterSystems IRIS
      • Managing InterSystems IRIS
      • Managing InterSystems IRIS Licensing
      • Using InterSystems IRIS on Windows
      • Using InterSystems IRIS on UNIX®, Linux, and macOS
      • Connecting to Remote Servers
      • Using Multiple Instances of InterSystems IRIS
      • Configuring Third-Political party Software to Work in Conjunction with InterSystems Products
      • Feature Tracker Collects Usage Statistics
    • Monitoring

      • About...
      • Monitoring Guide

        • Monitoring InterSystems IRIS Using the Direction Portal
        • Using the InterSystems Diagnostic Study
        • Using Log Monitor
        • Using Arrangement Monitor
        • Gathering Global Activity Statistics Using ^GLOSTAT
        • Monitoring System Operation Using ^PERFMON
        • Monitoring Routine Operation Using ^PROFILE
        • Examining Routine Operation Using ^%SYS.MONLBL
        • Monitoring Block Collisions Using ^BLKCOL
        • Monitoring Performance Using ^SystemPerformance
        • Monitoring Performance Using ^mgstat
        • Monitoring Processes Using ^PERFSAMPLE
        • History Monitor
        • Monitoring InterSystems IRIS Using SNMP
        • Monitoring InterSystems IRIS Using Web Services
        • Monitoring InterSystems IRIS Using REST API
        • Monitoring InterSystems IRIS Using the irisstat Utility
      • Mistake Reference

        • General Mistake Messages
        • SQL Error Letters
        • TSQL Error Messages
        • Organisation Error Letters
        • Letters Related to Productions
      • System Alerting and Monitoring Application
    • Specialized Organization Tools and Utilities

      • Introduction
      • Using Arrangement Classes for National Language Back up
      • Customizing First and Stop Behavior with ^%ZSTART and ^%ZSTOP Routines
      • Extending Languages with ^%ZLANG Routines
      • Controlling InterSystems IRIS from a Windows Client
      • Using ^GBLOCKCOPY for Fast Global Copies
      • Using Switches
      • Notes on Managing InterSystems IRIS via Routines
      • Process Management
      • Using cvendian for Byte Order Conversion
  • Architecture

    • About...
    • Mirroring and High Availability

      • Virtually...
      • High Availability Solutions
      • High Availability Guide

        • Failover Strategies for Loftier Availability
        • Mirroring Overview
        • Mirroring Architecture and Planning
        • Configuring Mirroring
        • Managing Mirroring
        • Mirror Outage Procedures
    • Scalability

      • About...
      • Beginning Looks

        • Scaling for User Volume
        • Scaling for Data Volume
      • Scalability Guide

        • InterSystems IRIS Scalability Overview
        • Vertically Scaling InterSystems IRIS
        • Horizontally Scaling for User Volume with Distributed Caching
        • Horizontally Scaling for Data Volume with Sharding
    • Resiliency and Data Integrity

      • About...
      • Kickoff Expect
      • Data Integrity Guide

        • Introduction to Data Integrity
        • Write Image Journaling and Recovery
        • Backup and Restore
        • Journaling
        • Data Consistency on Multiple Systems
  • Security

    • Well-nigh...
    • About InterSystems Security
    • System Management & Security
    • Securing Your Instance

      • Security Strategy
      • Prepare for InterSystems Security
      • Tighten Security for an Instance
      • Security Counselor
      • Secure InterSystems Processes and Operating-System Resources
      • Checklist for Hardening Your Deployment
    • Security Tutorial

      • Authentication

        • Authentication Mechanisms
        • InterSystems Authentication Components and Procedure
        • Connection Tools and Access Modes
        • InterSystems Services
        • Specifying Hallmark Mechanisms
        • Two-Factor Hallmark
        • Users
        • Predefined Users
        • Cascading Authentication
        • Kerberos Authentication
        • Operating System Based Authentication
        • Instance Authentication
        • Example One: %Service_Console
        • Example 1: %Service_Console (cont.)
        • Example One: %Service_Console (cont.)
        • Example One: %Service_Console (cont.)
        • Example Two: Web
        • Example Two: Web (cont.)
        • Delegated Authentication
        • Delegated Authentication Setup
        • ZAuthenticate
        • LDAP Hallmark
        • LDAP Hallmark Configuration
        • Recap
      • Authority

        • Overview
        • Avails and Resources
        • Privileges
        • Public Privileges
        • Privileges, Roles, and Users
        • Database Resources
        • Namespaces
        • Example Setup
        • Instance One: %Developer and %Operator Roles
        • Example Two: %Development Resource
        • Case Three: %DB_USER Resources
        • Example Iv: $SYSTEM.Security.Check
        • Recap
      • Securing Applications

        • Overview
        • Three Types of Awarding Definitions
        • Properties of Application Definitions
        • Web Application Definitions
        • Example Setup
        • Example Setup (cont.)
        • Case One: Disabling an Application
        • Case Ii: Protecting an Application with a Resource
        • Example 3: Application Roles
        • Case Iv: Matching and Target Roles
        • Privileged Routine Applications
        • Example Setup
        • Example Setup (cont.)
        • Example: Creating a Privileged Routine Application Definition
        • Example: Adding a Routine
        • Example: Adding Awarding Roles
        • Case: Executing the Privileged Routine Application
        • Java, .NET, and Other Applications
        • Recap
      • Connection Tools, Access Modes, Services
      • Code for Authorization Case
      • Lawmaking for Authentication Example
      • Code for Privileged Routine Case
      • Creating a User
      • Creating a Resource
      • Creating a Role
      • Calculation a User to a Role
    • Security for Developers

      • Most...
      • SOAP Security

        • Introduction
        • Setup and Other Common Activities
        • Creating and Using Policies
        • WS-Policy Configuration Form Details
        • Adding Security Elements Manually
        • Adding Timestamps and Username Tokens
        • Encrypting the SOAP Body
        • Encrypting Security Header Elements
        • Calculation Digital Signatures
        • Using Derived Cardinal Tokens for Encryption and Signing
        • Combining Encryption and Signing
        • Validating and Decrypting Inbound Letters
        • Creating Secure Conversations
        • Using WS-ReliableMessaging
        • Creating and Adding SAML Tokens
        • Troubleshooting Security Issues
        • Details of the Security Elements
      • SQL Security
      • Command-Line Security Utilities
    • Authentication and Potency

      • Well-nigh...
      • Commencement Looks

        • Role-Based Admission Control
        • LDAP
      • Authentication Guide

        • Introduction
        • Kerberos Hallmark
        • Operating System–Based Authentication
        • Instance Authentication
        • Delegated Hallmark
        • Two-Factor Authentication
        • Services
        • Avant-garde Topics
      • Authorization Guide

        • Near InterSystems Say-so
        • Assets and Resources
        • Privileges and Permissions
        • Roles
        • User Accounts
        • Applications
        • Using Delegated Authorization
      • LDAP Guide

        • LDAP and InterSystems IRIS®
        • LDAP Authentication
        • LDAP Authorization
        • Other LDAP Topics
      • OAuth 2.0 & OpenID Connect

        • Overview of OAuth ii.0 and OpenID Connect
        • How InterSystems IRIS Supports OAuth two.0 and OpenID Connect
        • Using an InterSystems IRIS Web Application equally an OAuth ii.0 Client
        • Using an InterSystems IRIS Spider web Application equally an OAuth 2.0 Resource Server
        • Using InterSystems IRIS as an OAuth 2.0 Authorization Server
        • Creating Configuration Items Programmatically
        • Implementing DirectLogin()
        • Certificates and JWTs (JSON Spider web Tokens)
    • Encryption

      • About...
      • Kickoff Looks

        • Database Encryption
        • Public Key Infrastructure
      • Public Fundamental Infrastructure
      • Encryption Guide

        • Most Managed Key Encryption
        • Primal Management Tasks
        • Using Encrypted Databases
        • Using Data-Element Encryption
        • Protecting Against Data Loss
        • Handling Emergency Situations
        • Additional Encryption Data
        • FIPS 140–2 Compliance for Database Encryption
      • Cryptographic Standards
    • TLS Guide

      • About TLS
      • Near Configurations
      • Configuring the InterSystems IRIS Superserver to Use TLS
      • Configuring InterSystems IRIS Telnet to Use TLS
      • Configuring Coffee Clients to Apply TLS with InterSystems IRIS
      • Configuring .Net Clients to Utilize TLS with InterSystems IRIS
      • Configuring Studio to Utilize TLS with InterSystems IRIS
      • Connecting from a Windows Client Using a Settings File
      • Configuring InterSystems IRIS to Use TLS with Mirroring
      • Configuring InterSystems IRIS to Utilize TLS with TCP Devices
      • Configuring the Spider web Gateway to Connect to InterSystems IRIS Using TLS
      • Establishing the Required Certificate Chain
    • Auditing Guide
  • Embedded Language Development

    • About...
    • Data Model
    • Orientation Guide

      • Introduction to InterSystems IRIS Programming
      • A Closer Look at ObjectScript
      • Classes
      • Objects
      • Persistent Objects and InterSystems IRIS SQL
      • Namespaces and Databases
      • InterSystems IRIS Security
      • Localization Support
      • Server Configuration Options
      • What's That?
      • Rules and Guidelines for Identifiers
      • Full general System Limits
      • Numeric Calculating in InterSystems Applications
    • Globals

      • About...
      • First Look
      • Multidimensional Data Admission
      • Using Globals

        • Introduction
        • Global Structure
        • Using Multidimensional Storage (Globals)
        • SQL and Object Use of Multidimensional Storage
        • Managing Globals
        • Temporary Globals and the IRISTEMP Database
    • ObjectScript

      • About...
      • First Look
      • ObjectScript IDEs

        • Connecting an IDE
        • About Visual Studio Code
        • Using Studio

          • Introduction to Studio
          • Creating Course Definitions
          • Adding Properties to a Grade
          • Adding Methods to a Class
          • Adding Course Parameters to a Class
          • Adding Relationships to a Class
          • Adding Queries to a Class
          • Adding Indices to a Grade
          • Adding Projections to a Class
          • Adding XData Blocks to a Form
          • Calculation SQL Triggers and Foreign Keys to a Course
          • Adding Storage Definitions to a Class
          • Working with CSP Files
          • Working with Routines and Include Files
          • Using the Studio Debugger
          • Using Studio Templates
          • Studio Menu Reference
          • Setting Studio Options
          • Frequently Asked Questions Nearly Studio
        • Source Control Integration
      • Using Terminal

        • Introduction to the Terminal
        • Using the Terminal Interactively
        • Decision-making the Appearance and Behavior of the Terminal
        • Using Terminal Scripts
        • Script Command Reference
        • Connecting to Remote Hosts
        • Using the Final in Batch Mode
        • Advanced Topics
      • Using ObjectScript

        • Introducing ObjectScript
        • Syntax Rules
        • Data Types and Values
        • Variables
        • Operators and Expressions
        • Regular Expressions
        • Commands
        • Callable User-divers Code Modules
        • ObjectScript Macros and the Macro Preprocessor
        • Embedded SQL
        • Multidimensional Arrays
        • String Operations
        • Lock Management
        • Transaction Processing
        • Error Processing
        • Command-line Routine Debugging
      • ObjectScript Reference

        • Symbols and Abbreviations
        • ObjectScript Commands
        • Routine and Debugging Commands
        • ObjectScript Functions
        • ObjectScript Special Variables
        • Structured System Variables
      • ObjectScript Tutorial

        • The Basics

          • Introduction
          • Class Methods
          • Last
          • VS Code - ObjectScript
          • Do Command
          • Class Methods and Routines
          • Method Details
          • Passing Arguments by Reference
          • Return and Quit Commands
          • Write Command
          • Read Command
          • Gear up Command
          • Operator Precedence
          • Syntax
          • Mutual Errors
          • Write (again) and Kill Commands
          • If Construct
          • Simple Conditions
          • Complex Weather
          • Easily-On Exercise ane
          • Form Compilation
          • Controlling Execution Flow
          • $Case Function
          • For Construct
          • While and Do/While Constructs
          • Endeavor/Take hold of Construct, and Throw Command
          • Multiple Purpose Characters
          • Easily-On Exercise ii
          • Recap of Role ane
        • The Good Stuff

          • Strings
          • Storing a String
          • Concatenation Operator
          • Blueprint Matching and Regular Expressions
          • Pattern Matching Examples
          • String Functions
          • String Functions, continued
          • Lists
          • Compare Pieces and Lists
          • Setting Substrings, Pieces, and List Items
          • More List Functions
          • Bitstrings
          • Dates
          • Hands-On Exercise three
          • JavaScript Object Notation (JSON)
          • Arrays
          • Ordered Trees
          • Ordered Trees, continued
          • Value and Existence, and the $Data Part
          • Viewing and Killing Arrays
          • Globals
          • $Increment and $Sequence Functions
          • Storage Method
          • Storage Method, connected
          • Example of Globals
          • Hands-On Exercise 4
          • Recap of Function 2
        • Using Globals

          • $Gild Function
          • $Lodge Role, continued
          • Working With Indexes
          • $Order Loop
          • Nested $Society Loops
          • Starting Focused $Society Loops
          • Catastrophe Focused $Order Loops
          • Hands-On Exercise 5
          • Conversion Functions
          • $Get Function
          • Hands-On Exercise 6
          • Database Integrity
          • Lock Command
          • Lock Command, continued
          • Lock Command and $Test
          • Transaction Processing
          • Easily-On Practice 7
          • InterSystems IRIS Objects and SQL
          • Object Methods
          • Object Storage
          • SQL Queries
          • Recap Of Part 3
        • RightTriangle Example Form and Practise Solutions

          • Correct Triangle Case Class
          • Exercise 1: First Data Entry Class
          • Exercise 2: Second Data Entry Class
          • Practise 3: Third Data Entry Course
          • Exercise 4: Storage Method
          • Practise 5: Start Lookup Class
          • Do six: Second Lookup Form
          • Practise 7: 3rd Lookup Grade
      • Try-Catch
    • Embedded Python

      • Near...
      • Embedded Python Overview
      • Using Embedded Python
    • Class Programming

      • Defining & Using Classes

        • Basic Ideas in Form Programming
        • Defining and Compiling Classes
        • Package Options
        • Defining and Referring to Grade Parameters
        • Defining and Calling Methods
        • Working with Registered Objects
        • Introduction to Persistent Objects
        • Working with Persistent Objects
        • Defining Persistent Classes
        • Defining and Using Literal Properties
        • Working with Collections
        • Working with Streams
        • Defining and Using Object-Valued Backdrop
        • Defining and Using Relationships
        • Other Options for Persistent Classes
        • Defining Method and Trigger Generators
        • Defining and Using Class Queries
        • Defining and Using XData Blocks
        • Defining Course Projections
        • Defining Callback Methods
        • Using and Overriding Belongings Methods
        • Defining Information Type Classes
        • Implementing Dynamic Acceleration
        • Object-Specific ObjectScript Features
        • Using the Populate Utility
        • Using the %Dictionary Classes
        • Using the Object Synchronization Feature
      • Form Definition Reference

        • Class Definitions
        • Form Keywords
        • Foreign Key Keywords
        • Index Keywords
        • Method Keywords
        • Parameter Keywords
        • Project Keywords
        • Property Keywords
        • Query Keywords
        • Trigger Keywords
        • XData Keywords
        • Storage Keywords
      • Finding Form References
      • Object Information Access
      • %Condition Values
      • Classes Page
    • InterSystems API Manager (IAM)

      • Almost...
      • First Await
    • SQL

      • About...
      • Start Looks

        • InterSystems SQL
        • Optimizing SQL Performance
      • Using SQL

        • Introduction to InterSystems SQL
        • InterSystems SQL Nuts
        • Linguistic communication Elements
        • Identifiers
        • Defining Tables
        • Defining and Using Views
        • Relationships Between Tables
        • Modifying the Database
        • Querying the Database
        • Collation
        • Implicit Joins (Arrow Syntax)
        • Using Embedded SQL
        • Using Dynamic SQL
        • Using the SQL Beat out Interface
        • Using the Management Portal SQL Interface
        • Importing SQL Code
        • Using Triggers
        • Defining and Using Stored Procedures
        • Storing and Using Stream Data (BLOBs and CLOBs)
        • Users, Roles, and Privileges
        • Importing and Exporting SQL Information
      • Optimizing SQL

        • Introduction to SQL Operation Optimization
        • Defining and Building Indices
        • Optimizing Tables
        • Cached Queries
        • Optimizing Query Performance
        • SQL Functioning Analysis Toolkit
        • Interpreting an SQL Query Plan
        • SQL Statements
        • Frozen Plans
      • InterSystems SQL Reference

        • Symbols and Syntax Conventions
        • SQL Commands
        • SQL Commands for IntegratedML
        • SQL Predicate Conditions
        • SQL Aggregate Functions
        • SQL Window Functions
        • SQL Functions
        • SQL Unary Operators
        • SQL Reference Textile
      • Using the InterSystems SQL Gateway

        • SQL Gateway Overview
        • Accessing a Database with the SQL Gateway
        • Connecting the SQL Gateway via JDBC
        • Connecting the SQL Gateway via ODBC
        • Using the SQL Gateway Programmatically
    • Certificate Database

      • Introducing InterSystems IRIS Document Database (DocDB)
      • Managing Documents
      • Balance Client Methods
    • XML

      • Nearly...
      • XML Tools

        • Introduction to InterSystems XML Tools
        • Writing XML Output from Objects
        • Importing XML into Objects
        • Representing an XML Document every bit a DOM
        • Encrypting XML Documents
        • Signing XML Documents
        • Using %XML.TextReader
        • Evaluating XPath Expressions
        • Performing XSLT Transformations
        • Customizing How the InterSystems SAX Parser Is Used
        • Generating Classes from XML Schemas
        • Generating XML Schemas from Classes
        • Examining Namespaces and Classes
        • XML Background
      • XML Projections

        • Introduction to Object-XML Projections
        • Projecting Objects to XML
        • Decision-making Transformations of Values
        • Handling Empty Strings and Null Values
        • Controlling the XML Element and Aspect Names
        • Specifying Namespaces for Elements and Attributes
        • Decision-making the Projection to XML Schemas
        • Advanced Options for XML Schemas
        • Special Topics
        • Summary of XML Projection Parameters
    • Spider web Services

      • About...
      • Web Gateway Configuration Guide

        • Installing the Web Gateway
        • Spider web Application Architecture
        • Web Servers for Microsoft Windows
        • Web Servers for UNIX, Linux, and macOS
        • Web Gateway Performance and Configuration
        • Alternative Configurations for Microsoft Windows
        • Alternative Configurations for UNIX, Linux, and macOS
        • Apache Considerations UNIX, Linux, and macOS
        • Building Apache for IBM AIX®
        • IIS Technical Notes
        • Using Web Applications with a Remote Web Server
      • SOAP

        • About...
        • Creating Lather Web Services and Clients

          • Introduction to Web Services and Web Clients in InterSystems IRIS
          • Creating Lather Spider web Services
          • Lather Message Variations
          • Creating Spider web Clients
          • SOAP Error Handling
          • Using MTOM for Attachments
          • Using Soap with Attachments
          • Adding and Using Custom Header Elements
          • Adding and Using WS-Addressing Header Elements
          • SOAP Session Management
          • Using the InterSystems IRIS Binary Lather Format
          • Using Datasets in SOAP Messages
          • Fine-Tuning a Web Service in InterSystems IRIS
          • Fine-Tuning a Web Client in InterSystems IRIS
          • Troubleshooting SOAP Problems in InterSystems IRIS
          • Summary of Web Service URLs
          • Details of the Generated WSDLs
          • Details of the Generated Classes
      • REST and JSON

        • About...
        • First Await
        • Residue Services

          • Introduction to Creating Residual Services
          • Using the /api/mgmnt Service
          • Using the ^%Rest Routine to Create Remainder Services
          • Using the %Residuum.API Grade to Create REST Services
          • Modifying the Implementation Form
          • Modifying the Specification Class
          • Supporting CORS in Residue Services
          • Using Web Sessions with Residue
          • Securing REST Services
          • Discovering and Documenting REST APIs
          • Reference for the /api/mgmnt API
          • OpenAPI Properties in Employ
          • Creating a Residual Service Manually
        • REST API for Source Lawmaking

          • Introduction to the InterSystems IRIS Source Code File REST API
          • Source Code File Residue API Tutorial
          • Source Code File Residue API Reference
        • Using JSON

          • Introduction
          • Creating and Modifying Dynamic Entities
          • Iteration and Thin Arrays
          • Working with Datatypes
          • Using the JSON Adaptor
          • Quick Reference for Dynamic Entity Methods
      • Cyberspace Utilities

        • Introduction
        • Sending HTTP Requests
        • Sending and Receiving Email
        • Creating, Writing, and Reading MIME Messages
        • Using FTP
        • Electric current Page: Sending and Receiving IBM WebSphere MQ Messages
        • Using SSH
        • Other InterSystems %Net Tools
    • I/O Device Guide

      • Nearly I/O Devices
      • I/O Devices and Commands
      • Final I/O
      • Local Interprocess Communication
      • TCP Customer/Server Communication
      • UDP Client/Server Communication
      • Sequential File I/O
      • Spool Device
      • Printers
    • Avant-garde Concepts

      • Locking & Concurrency
      • Bits & Bitstrings
      • Structured Logging
      • Semaphores
      • Cord Localization
      • Process Memory
      • Piece of work Queue Managing director
      • Secure Logins
      • Using %Library.File
      • %UnitTest Tutorial

        • Unit Testing Overview

          • What is a Unit of measurement Test?
          • Why Unit of measurement Examination?
          • xUnit Testing Frameworks
          • Structure of %UnitTest and xUnit Frameworks
          • Test Automation
          • Exam Showtime Methodology
          • Red – Light-green – Refactor
          • Epitomize
        • Unit Testing with %UnitTest

          • What is %UnitTest?
          • Creating and Executing a Suite of Unit Tests
          • %UnitTest Classes
          • Assert Methods and Macros
          • Creating Classes to Use in the Examples
          • Example: Creating and Exporting a Examination Grade
          • Example: Executing a Examination
          • Case: UnitTest Portal
          • Example: Viewing the Written report in the Unit Exam Portal
          • Setup and Tear Downwards
          • Instance: Adding Setup and Tear Downwardly Methods to a Test
          • Example: Executing a Examination Using Setup and Tear Downward Methods
          • Options for Executing Tests: Examination Specs and Qualifiers
          • RunTest Examples
          • DebugRunTestCase
          • Exercises
          • Recap
    • API Index

      • Tools Alphabetize
    • Glossary

      • Complete Glossary of Terms
  • External Linguistic communication Evolution

    • About...
    • Native APIs
    • Using InterSystems External Servers

      • Introduction to InterSystems External Servers
      • Working with External Languages
      • Managing External Server Connections
      • Customizing External Server Definitions
      • InterSystems External Server Requirements
      • Quick Reference for the ObjectScript $organisation.external Interface
    • Java

      • Nearly...
      • First Looks

        • Native API for Java
        • Java Object Persistence with XEP
        • JDBC and InterSystems Databases
      • Using Java with InterSystems Software

        • Certificate Overview
        • InterSystems Java Connectivity Options
        • Using the JDBC Driver
        • Configuration and Requirements
        • JDBC for Occasional Users
        • JDBC Quick Reference
      • Using the Native SDK for Java

        • Document Overview
        • Introduction to the Coffee Native SDK
        • Calling ObjectScript Methods and Functions
        • Using Java Inverse Proxy Objects
        • Working with Global Arrays
        • Transactions and Locking
        • Coffee Native SDK Quick Reference
      • Persisting Coffee Objects with InterSystems XEP

        • Document Overview
        • Introduction
        • Using XEP Event Persistence
        • XEP Quick Reference
      • InterSystems Implementation Reference for Third Party Software

        • Introduction
        • JDBC Driver Support
        • Apache Spark Support
        • Hide Support
      • JDBC
    • .Cyberspace

      • About...
      • First Looks

        • Native API for .Internet
        • ADO.Internet and InterSystems Products
        • .Cyberspace Object Persistence with XEP
        • ODBC and InterSystems IRIS
      • Using .NET with InterSystems Software

        • Document Overview
        • Connecting to the InterSystems Database
        • Configuration and Requirements
        • ADO.Cyberspace Managed Provider for Occasional Users
        • Using the Entity Framework Provider
        • Quick Reference for the .NET Managed Provider
      • Using the Native SDK for .NET

        • Document Overview
        • Introduction to the .Cyberspace Native SDK
        • Calling ObjectScript Methods and Functions from .Net
        • Using .NET Inverse Proxy Objects
        • Working with Global Arrays
        • Transactions and Locking
        • Native SDK for .Net Quick Reference
      • Persisting .NET Objects with InterSystems XEP

        • Certificate Overview
        • Introduction
        • Using XEP Event Persistence
        • XEP Quick Reference
      • ODBC

        • About...
        • Using the InterSystems ODBC Driver

          • Overview
          • Defining an ODBC Data Source on Windows
          • Defining an ODBC Data Source on UNIX®
          • ODBC Installation and Validation on UNIX® Systems
          • ODBC Support for Python and Node.js
          • Logging and Surroundings Variables
    • Python

      • Near...
      • Showtime Look
      • Using the Native SDK for Python

        • Introduction to the Native SDK
        • Working with Global Arrays
        • Calling ObjectScript Methods and Functions
        • Native SDK Quick Reference for Python
    • Node.js

      • About...
      • First Wait
      • Using the Native SDK for Node.js

        • Introduction to the Native SDK
        • Working with Global Arrays
        • Calling ObjectScript Methods and Functions
        • Native SDK Quick Reference for Node.js
    • Callin

      • The Callin Interface
      • Using the Callin Functions
      • Callin Role Reference
    • Callout

      • Introduction
      • Running Programs or Arrangement Commands with $ZF(-100)
      • Creating an InterSystems Callout Library
      • Invoking Callout Library Functions
      • InterSystems Callout Quick Reference
  • Interoperability

    • Virtually...
    • First Expect
    • Introducing Interoperability Productions

      • Introduction to Interoperability Productions
      • Connectivity Options
      • Business concern Processes and Business Logic
      • Other Production Options
    • Preparing to Create Productions

      • Road Map to Using InterSystems IRIS Productions
      • Planning an InterSystems IRIS Server Deployment
    • Best Practices

      • All-time Practices for Production Development
      • Design Model for a Routing Production
      • Converting Interfaces to Product Elements
    • Developing Productions

      • About...
      • Developing Productions Using ObjectScript

        • Introduction
        • Programming Business Services, Processes and Operations
        • Defining Messages
        • Defining Business Services
        • Defining Business organisation Processes
        • Defining Business Operations
        • Defining an Alert Processor
        • Defining Information Transformations
        • Defining Business Metrics
        • Defining an Enterprise Bulletin Banking concern
        • Using the Tape Mapper
        • Using the Complex Tape Mapper
        • Handling Batches of Records Efficiently
        • Less Common Tasks
        • Testing and Debugging
        • Deploying a Production
        • Life Cycle of a Production and Its Parts
      • Developing Productions With External Languages

        • Introduction
        • Getting Started
        • About Business Hosts and Adapters
        • Messaging
        • Inbound Adapters
        • Outbound Adapters
        • Business Services
        • Business concern Processes
        • Business Operations
        • Running the External Server
        • PEX API Reference
      • BPL and DTL

        • Outset Wait
        • Developing BPL Processes

          • About BPL Processes
          • Using the Business Process Designer
          • Syntax Rules
          • Listing of BPL Elements
          • Handling Errors in BPL
        • Developing DTL Transformations

          • Introduction to DTL Tools
          • Creating Data Transformations
          • Syntax Rules
          • Calculation Assign Actions
          • Adding Other Actions
          • Testing Data Transformations
        • BPL and DTL Reference

          • BPL Elements
          • DTL Elements
      • Using a Production as an ESB

        • Enterprise Service Bus and Registry Overview
        • Intended Audiences
        • Accessing the Public Service Registry through the Public Residual API
        • Administering the Public Service and External Service Registries
        • Configuring an ESB
        • Configuring ESB Services and Operations
        • Configuring an InterSystems IRIS Organization and Creating a Namespace
        • Configuring a Web Awarding for a Pass-through Business Service
        • Pass-through Service and Operation Walkthrough
        • Service Registry Public API Reference
    • Configuring, Managing, and Monitoring Productions

      • About...
      • Configuring Productions

        • Introduction to Configuration Tasks
        • Creating a Production
        • Calculation Business organization Hosts
        • Configuring Settings
        • Configuring Alerts
        • Defining Reusable Items for Use in Settings
        • Defining Other Options for Productions
        • Configuring the Enterprise Message Bank
        • Identifying Enterprise Systems for Viewing and Monitoring
        • Creating Dashboards
        • Settings in All Productions
      • Managing Productions

        • Introduction to Managing Productions
        • Starting and Stopping Productions
        • Purging Product Information
        • Using the Archive Manager
        • Managing Workflow Roles, Users, and Tasks
        • Defining Publish and Subscribe Bulletin Routing
        • Controlling Data Storage for Productions
        • Controlling Access to Management Portal Functions
        • Finding Information on Menu Items
      • Monitoring Productions

        • Core Concepts
        • Monitoring All Namespaces
        • Monitoring a Production
        • Viewing, Searching, and Managing Messages
        • Viewing the Event Log
        • Enabling Tracing
        • Viewing the Business organisation Rule Log
        • Viewing Business organisation Process Instances
        • Viewing the I/O Archive for a Product
        • Viewing Messages from Multiple Productions
        • Using the Enterprise Message Viewer
        • Using the Enterprise Bulletin Banking company
        • Viewing Interface Maps
        • Finding Interface References
        • Monitoring Alerts
        • Monitoring Activity Book
        • Managing Port Usage
      • Button Notifications

        • Push Notifications Overview
        • Configuring and Using Push button Notifications
      • Defining Workflows

        • Overview of Workflow within Productions
        • Developing a Workflow
        • Including Custom Features in a Workflow
        • Testing a Workflow
        • Exploring the Workflow Sample
        • Available Workflow Metrics
      • Testing Productions

        • Testing Productions Tutorial
        • Testing Productions

          • TestControl
          • Callback Methods
          • Auxiliary Methods
          • Parameters and Properties
          • Creating a Test - Summary
          • Executing a Test
          • Example Overview
          • Example: Example Production
          • Case: Production Test
          • Example: OnAfterProductionStart
          • Case: CheckResults
          • Instance: CheckErrors
          • Example: Executing the Test
          • Recap
        • Creating Tutorial.ExampleOperation
    • Connecting Systems

      • Nigh...
      • Supported Formats
      • Cloud Storage Providers

        • Introduction to Deject Storage Providers
        • Inbound Adapter for Cloud Storage
        • Outbound Adapter for Cloud Storage
        • More About Cloud Storage Adapters
        • Cloud Storage APIs
      • CloudWatch Adapter
      • Email Adapters

        • Introduction
        • Using the E-mail Inbound Adapter
        • Using the Email Outbound Adapter
        • Reference for Settings
      • File Adapters

        • Introduction
        • Using the File Entering Adapter
        • Using the File Outbound Adapter
        • Using the File Passthrough Service and Operation Classes
        • Reference for Settings
      • FTP Adapters

        • Introduction
        • Using the FTP Inbound Adapter
        • Using the FTP Outbound Adapter
        • Reference for Settings
      • HTTP Adapters

        • Well-nigh the HTTP Adapters
        • Using the HTTP Inbound Adapter
        • Using the HTTP Outbound Adapter
        • Reference for Settings
      • Coffee Messaging Service (JMS)

        • JMS Overview
        • Configuring and Using JMS Business Services and Operations
        • Creating Custom JMS Services and Operations Using the Adapter
      • IBM WebSphere MQ Adapters

        • About the IBM WebSphere MQ Adapters
        • Using the IBM WebSphere MQ Entering Adapter
        • Using the IBM WebSphere MQ Outbound Adapter
        • Troubleshooting
        • Reference for Settings
      • MQTT Adapters

        • Introduction to Bulletin Queuing Telemetry Transport (MQTT)
        • Using the MQTT Adapters
        • Configuring and Using the MQTT Passthrough Business Service and Operation
        • Reference for Settings
      • REST Services and Adapters

        • Overview of Using REST in Productions
        • Creating REST Services in Productions
        • Creating REST Operations in Productions
      • SOAP Services and Web Clients

        • Most SOAP and Spider web Services
        • Creating a Web Service in a Product
        • Creating a Web Client in a Production
        • Configuring a Production for Soap Services
        • Using the Soap Inbound Adapter
        • Older Web Service Variation
        • Reference for Settings
      • SAP Coffee Connector

        • Overview
        • Setup Tasks
        • Using the SAP Java Connector
      • SNS Messaging

        • Amazon SNS
      • SQL Adapters

        • Introduction
        • Using an SQL Business Service
        • Using an SQL Business concern Functioning
        • More than Nearly Messages
        • More Most Procedures
        • Custom Business Services
        • Custom Business organization Operations
        • Creating Adapter Methods for SQL
        • Using Upshot Sets
        • Using Snapshots
      • TCP Adapters

        • Introduction
        • Using the Inbound TCP Adapters
        • Using the Outbound TCP Adapters
        • Special Topics
        • Reference for Settings
      • Managed File Transfer

        • First Look
        • MFT Services

          • Introduction
          • Prerequisites and Configuration
          • Enabling a Product to Use MFT Services
          • Using the MFT API for InterSystems IRIS
    • Routing EDIFACT, X12, and XML Documents

      • Nigh...
      • Using Virtual Documents in Productions

        • Virtual Documents
        • Schema Definitions
        • Virtual Property Paths
        • Using Virtual Documents in a Production
        • Defining Search Tables
        • Controlling Message Validation
        • Creating Custom Schema Categories
        • Portal Tools
        • Syntax Guide for Virtual Property Paths
        • Common Settings
      • EDIFACT

        • Introduction
        • Bachelor Tools
        • Configuring the Production
        • Boosted Steps
        • Reference for Settings
      • X12

        • Introduction
        • X12 Schemas and Available Tools
        • Configuring the Production
        • Creating an X12 Information Transformation
        • Handling X12 Interchanges
        • Reference for Settings
      • XML

        • Introduction
        • Available Tools
        • Configuration Steps
        • Overview of Property Paths in XML Virtual Documents
        • Specifying Schema-dependent Paths for XML Virtual Documents
        • Specifying DOM-way Paths for XML Virtual Documents
        • Defining Information Transformations for XML Virtual Documents
        • Defining Rule Sets for XML Virtual Documents
        • Defining Search Tables for XML Virtual Documents
        • XML-Enabled Objects Compared to XML Virtual Documents
        • Reference for Settings
    • Developing Business Rules

      • About Business organization Rules
      • Introduction to the Rule Editor
      • Creating and Editing Rule Sets
      • Debugging Routing Rules
      • Utility Functions for Use in Productions
  • Analytics and Data Science

    • Well-nigh...
    • InterSystems IRIS Adaptive Analytics
    • Business Intelligence

      • Nearly...
      • BI Introduction

        • Introduction to Concern Intelligence
        • Introduction to the Business organisation Intelligence User Interfaces
        • Introduction to the Other Business Intelligence Tools
        • Business Intelligence Glossary
      • BI Modeling

        • Introduction
        • Bones Concepts
        • Summary of Model Options
        • Principles and Recommendations
        • Defining Models for InterSystems Business concern Intelligence
        • Compiling and Building Cubes
        • Defining Dimensions, Hierarchies, and Levels
        • Details of Defining Levels
        • Defining Properties
        • Defining Measures
        • Defining Listings
        • Defining Listing Fields
        • Defining Calculated Members
        • Defining a Named Set
        • Defining Subject field Areas
        • Defining Listing Groups
        • Reference Information for Cube Classes
        • Reference Data for Subject Area Classes
        • Details for the Fact and Dimension Tables
      • BI Advanced Modeling

        • Defining Computed Dimensions
        • Defining Shared Dimensions and Chemical compound Cubes
        • Defining Cube-Cube Relationships
        • Using Text Analytics in Cubes
        • Defining Term Lists
        • Defining Worksheets
        • Defining Quality Measures
        • Defining Basic KPIs
        • Defining KPIs with Filters and Listings
        • Defining Avant-garde KPIs
        • Defining Plug-ins
        • Using Cube Inheritance
        • Defining Intermediate Expressions
        • Other Options
        • Reference Information for KPI and Plug-in Classes
        • Generating Secondary Cubes for Use with Text Analytics
      • Using Dashboards and the User Portal

        • Introduction to the User Portal
        • Using the Portal Features
        • Orientation to Dashboards
        • Using Dashboards
        • Using the Pivot Analysis Window
      • BI Dashboards

        • Introduction to Dashboards
        • Creating and Modifying Dashboards
        • Specifying Common Widget Options
        • Adding Pin Tabular array Widgets
        • Adding Chart Widgets
        • Customizing the Appearance of a Chart Widget
        • Adding Meter Widgets
        • Calculation Scorecard Widgets
        • Adding Other Widgets
        • Defining and Using Themes
        • Calculation Widget Controls
      • Implementing InterSystems IRIS Business Intelligence

        • Overview
        • Performing the Initial Setup
        • Configuring Settings
        • Defining Data Connectors
        • Performance Tips
        • Defining Custom Deportment
        • Accessing Dashboards from Your Application
        • Keeping the Cubes Current
        • Executing Business organisation Intelligence Queries Programmatically
        • Performing Localization
        • Packaging Business Intelligence Elements into Classes
        • Creating Portlets for Use in Dashboards
        • Other Evolution Work
        • Setting Upwards Security
        • Using Cube Versions
        • How the Analytics Engine Works
        • Using the MDX Performance Utility
        • Diagnostics for InterSystems Concern Intelligence
        • Other Export/Import Options
        • Business Intelligence and Disaster Recovery
      • BI Analyzer

        • Introduction to the Analyzer
        • Creating Pin Tables
        • Filtering Pivot Tables
        • Defining Calculated Elements
        • Defining and Using Pivot Variables
        • Customizing Pin Tables
        • Working with Pivot Tables
        • Performing Ad Hoc Analysis
        • Configuring InterSystems IRIS for PDF Output
      • Using MDX

        • Background
        • Introduction to MDX Queries
        • Working with Levels
        • Working with Dimensions and Hierarchies
        • Working with Sets
        • Tuples and Cubes
        • Filtering a Query
        • Adding Summaries
        • Creating Calculated Measures and Members
      • MDX Reference

        • Basic Rules
        • Expression Types
        • MDX Statements and Clauses
        • MDX Functions
        • Intrinsic Properties
        • NOW Fellow member for Time Levels
        • Quick Part Reference
      • Ability BI
      • BI Clients

        • Introduction
        • DeepSee.js
        • Business concern Intelligence REST API
      • BI Tutorial

        • Getting Started
        • Introduction to Cube Elements
        • Creating a Cube
        • Expanding the Cube Definition
        • Creating Discipline Areas
        • Creating and Packaging Pivot Tables and Dashboards
    • Apache Spark

      • About...
      • Using the InterSystems Spark Connector

        • Document Overview
        • Introduction
        • Spark Connector Data Source Options
        • Using Spark Connector Extension Methods
        • Spark Connector Best Practices
        • Spark Connector Internals
        • Spark Connector Quick Reference
    • Car Learning

      • About...
      • Using IntegratedML

        • Introduction to ML
        • IntegratedML Basics
        • Providers
        • ML Configurations
        • Model Maintenance
        • About AutoML
        • SQL Commands
        • SQL Functions
    • Text Analytics (Natural Language Processing)

      • About...
      • Text Analytics with InterSystems Products
      • Using NLP

        • Conceptual Overview
        • NLP Implementation
        • Domain Architect
        • Residuum Interface
        • Alternatives for Creating an NLP Environs
        • Loading Text Information Programmatically
        • Performance Considerations when Loading Texts
        • NLP Queries
        • Semantic Attributes
        • Stemming
        • Skiplists
        • Filtering Sources
        • Text Categorization
        • Dominance and Proximity
        • Custom Metrics
        • Smart Matching: Creating a Dictionary
        • Smart Matching: Using a Dictionary
        • User Interfaces
        • IRIS Natural Language Processing (NLP) Tools
        • iKnow Web Services
        • KPIs and Dashboards
        • Customizing NLP
        • Language Identification
        • Domain Parameters
    • SQL Search

      • About...
      • First Look
      • Using SQL Text Search

        • InterSystems SQL Search Tool
        • SQL Search Remainder Interface
    • Unstructured Information Direction Architecture

      • Near...
      • InterSystems IRIS and UIMA
      • Using UIMA

        • Overview
    • Predictive Modeling Markup Linguistic communication
    • InterSystems Reports

      • Introduction
      • InterSystems Reports Designer
      • InterSystems Reports Server with InterSystems IRIS

Sending and Receiving IBM WebSphere MQ Letters

InterSystems IRIS provides an interface to IBM WebSphere MQ, which you can utilise to exchange messages between InterSystems IRIS and the message queues of IBM WebSphere MQ. To use this interface, you must have access to an IBM WebSphere MQ server, and the IBM WebSphere MQ customer must be running on the same machine as InterSystems IRIS.

The interface consists of the %Net.MQSend and %Net.MQRecv classes, which are both subclasses of %Cyberspace.abstractMQ . These classes utilize a dynamic-link library that is automatically installed by InterSystems IRIS on all suitable platforms. (This is MQInterface.dll on Windows; the file extension is dissimilar for other platforms.) In turn, the InterSystems IRIS dynamic-link library requires IBM WebSphere MQ dynamic-link libraries.

The interface supports sending and receiving merely text information, non binary information.

To use IBM WebSphere MQ, you lot will need the formal documentation for this product. Also, for boosted information on the InterSystems IRIS interface to IBM WebSphere MQ, see the class reference for %Cyberspace.abstractMQ .

Using the InterSystems IRIS Interface to IBM WebSphere MQ

In general, to use the InterSystems IRIS interface to IBM WebSphere MQ, you lot do the following:

  1. Make certain that you lot take access to IBM WebSphere MQ v7.x or college. Specifically:

    • The IBM WebSphere MQ client must exist installed on the same machine as InterSystems IRIS. Annotation that the installer updates the PATH environment variable and adds other organization variables equally needed.

    • Make certain that yous take rebooted the machine after installing the client, so that InterSystems IRIS is aware of the client.

    • The client must have admission to an IBM WebSphere MQ server.

    • The username under which y'all will access the server must take permission to use the queue managers and the queues that you plan to employ.

  2. Create a new instance of %Net.MQSend or %Net.MQRecv , depending on whether you are going to send or receive messages.

  3. Connect to an IBM WebSphere MQ server. When you lot practise so, you provide the following information:

    • The name of a queue manager.

    • The name of a queue to use.

    • The channel by which to communicate with that queue. Y'all specify a aqueduct name, a ship mechanism, and the IP address and port of the IBM WebSphere MQ server.

    You tin can as well provide a name and countersign if you are using the authentication feature of IBM WebSphere MQ.

  4. Invoke the appropriate methods of %Internet.MQSend or %Net.MQRecv to send or receive messages.

Note:

To use IBM Websphere MQ on 64–fleck Linux platforms, you must ready the LD_LIBRARY_PATH to include the location of the MQ libraries. Because the path must be prepare for any InterSystems IRIS process that uses the MQ interface, it must be ready prior to starting InterSystems IRIS if running background processes, and prepare in whatever UNIX® terminal prior to running iris terminal.

Getting Error Codes

The methods of %Net.MQSend and %Net.MQRecv render either 1 if successful or 0 if unsuccessful. In the case of an error, call the %GetLastError() method, which returns the last reason code given past IBM WebSphere MQ. For data on the reason codes, see the formal IBM documentation.

Creating a Connectedness Object

Before you can ship or receive messages via IBM WebSphere MQ, you must create a connection object, an object that establishes a connection to a queue manager, opens a channel, and opens a queue for use. There are two ways you can do this:

  • You tin use the %Init method, which takes arguments that specify all the needed information.

  • You lot tin use the %Connect method later on first setting properties that specify all the needed information.

Using the %Init() Method

To use the %Init() method to create a connection object:

  1. Create an instance of %Net.MQSend (if you are going to send messages) or %Net.MQRecv (if yous are going to receive messages). This topic refers to this example every bit the connectedness object.

    Note:

    If yous receive the <DYNAMIC LIBRARY LOAD> mistake, a dynamic-link library is missing, and the messages.log file (in the system manager's directory) has more details.

  2. Call the %Init() method of the connection object. This method takes the following arguments, in order.

    1. (Required) A string that specifies the queue proper noun; this should exist a valid queue for the specified queue director.

    2. A string that specifies the queue director; this should exist a valid queue director on the IBM WebSphere MQ server.

      If you omit this argument, the system uses the default queue manager, as configured in IBM WebSphere MQ. Or, if IBM WebSphere MQ has been the configured so that the queue managing director is adamant by the queue name, the organization uses the queue managing director that is advisable for the given queue proper noun.

    3. A string that specifies the specification for the channel, in the post-obit form:

      "channel_name/transport/host_name(port)"

      Here channel_name is the name of the channel to utilize, transport is the ship used by the aqueduct, host_name is the server proper noun (or IP address) that is running the IBM WebSphere MQ server, and port is the port that this channel should apply.

      Send can be 1 of the post-obit: TCP, LU62, NETBIOS, SPX

      For example:

      "CHAN_1/TCP/127.0.0.1(1401)"

      If you omit this argument, the organisation uses the default channel specification, as configured in IBM WebSphere MQ. Or, if the arrangement has been the configured so that the channel is determined by the queue name, the organisation uses the aqueduct that is appropriate for the given queue name.

    4. An optional string that specifies the log file to write error messages to. The default is that no logging occurs.

  3. Check the value returned by the %Init() method. If the method returns 1, the connectedness was established successfully, and you tin employ the connection object to either send or receive letters (depending on the class you are using). Encounter "Getting Error Codes."

Using the %Connect() Method

In some cases, you might prefer to specify all the details of the connection individually. To exercise so, you use the %Connect() method, as follows:

  1. Create an instance of %Net.MQSend (if you lot are going to send messages) or %Net.MQRecv (if you are going to receive messages). Equally noted previously, this topic refers to this instance as the connection object.

    Notation:

    If you receive the <DYNAMIC LIBRARY LOAD> error, a dynamic-link library is missing, and the messages.log file (in the arrangement manager'southward directory) has more details.

  2. Gear up the following properties of the connection object:

    • QName — (Required) Specifies the queue name; this should exist a valid queue for the specified queue manager.

    • QMgr — Specifies the queue managing director to use; this should be a valid queue director on the IBM WebSphere MQ server.

      If you omit this argument, the system uses the default queue manager, as configured in IBM WebSphere MQ. Or, if IBM WebSphere MQ has been the configured so that the queue director is determined past the queue proper noun, the system uses the queue manager that is appropriate for the given queue proper noun.

  3. Optionally specify the channel to use by setting the following properties of the connexion object:

    • Connection — Specifies the host and port of the IBM WebSphere MQ server. For example: "127.0.0.1:1401".

    • Channel — Specifies the name of the channel to use. This must be a valid channel on the IBM WebSphere MQ server.

    • Transport — Specifies the transport used by the channel. This property tin be one of the post-obit: "TCP", "LU62", "NETBIOS", "SPX"

    If you omit these arguments, the system uses the default channel specification, as configured in IBM WebSphere MQ. Or, if the system has been the configured so that the aqueduct is determined by the queue name, the system uses the channel that is advisable for the given queue name.

  4. Call the %ErrLog() method of the connection object. This method takes one statement, the name of the log file to use for this connection object.

  5. Check the value returned by the %ErrLog() method. See "Getting Fault Codes."

  6. Call the %Connect() method of the connection object.

  7. Check the value returned by the %Connect() method. If the method returns ane, the connection was established successfully, and y'all tin can utilize the connection object to either send or receive letters (depending on the class you lot are using). See "Getting Fault Codes."

Specifying the Character Ready (CCSID)

To set the graphic symbol ready used for message conversions, call the %SetCharSet() method of your connection object. Specify an integer Coded Character Fix ID (CCSID) as used in IBM WebSphere MQ.

  • If you are sending messages, this should be the grapheme set of those letters. If you do non specify a grapheme set, the MQ arrangement assumes the messages use the default grapheme set specified for the MQ client.

  • If you lot are retrieving messages, this is the grapheme set to which those messages will be translated.

To become the CCSID that is currently being used, call the %CharSet() method. This method returns the CCSID by reference and information technology returns 1 or 0 to indicate whether it was successful; come across "Getting Mistake Codes."

For information on the CCSID that corresponds to a given grapheme set, see the formal IBM documentation.

Specifying Other Message Options

To specify message descriptor options, optionally set the following properties of your connection object:

  • ApplIdentityData specifies the Application Identity bulletin descriptor option.

  • PutApplType specifies the Put Application Type bulletin descriptor choice.

Sending Messages

To transport messages, do the following:

  1. Create a connection object equally described in "Creating a Connection Object." In this case, create an case of %Net.MQSend . The connection object has a bulletin queue to which y'all tin can send letters.

  2. Telephone call the following methods, as needed:

    • %Put() — Given a string, this method writes that string to the message queue.

    • %PutStream() — Given an initialized file character stream, this method writes that cord to the message queue. Notation that you must set the Filename property of the stream in order to initialize it. Binary streams are not supported.

    • %SetMsgId() — Given a cord, this method uses that cord as the message ID for the adjacent message that is sent.

  3. Check the value returned by the method you called. Meet "Getting Error Codes."

  4. When you are done retrieving messages, call the %Close() method of the connection object to release the handle to the dynamic-link library.

Instance 1: SendString()

The following class method sends a elementary string message to the queue mqtest, using queue managing director QM_antigua, and a queue aqueduct named S_antigua. The channel uses TCP send, and the IBM WebSphere MQ server is running on a car called antigua and is listening on port 1401.

                ///                Method returns reason code from IBM WebSphere MQ                ClassMethod                                                SendString                ()                                                As                                                %Integer                {                                                Ready                                                ship                =                ##form                (                %Net                .                MQSend                )                .                %New                (                )                                                Set up                                                queue                =                "mqtest"                                                Set                                                qm                =                "QM_antigua"                                                Fix                                                chan                =                "S_antigua/TCP/antigua(1414)"                                                Set                                                logfile                =                "c:\mq-send-log.txt"                                                Ready                                                check                =                ship                .                %Init                (                queue                ,                qm                ,                chan                ,                logfile                )                                                If                                                '                check                                                Quit                                                transport                .                %GetLastError                (                )                                                                                //send a unique message                                                Set                                                check                =                transport                .                %Put                (                "This is a test message "                _                $h                )                                                If                                                '                check                                                Quit                                                transport                .                %GetLastError                (                )                                                Quit                                                check                }              

Example 2: SendCharacterStream()

The post-obit class method sends the contents of a file character stream. It uses the same queue used in the previous case:

                ///                Method returns reason code from IBM WebSphere MQ                ClassMethod                                                SendCharacterStream                ()                                                Every bit                                                %Integer                {                                                Set                                                send                =                ##class                (                %Cyberspace                .                MQSend                )                .                %New                (                )                                                Fix                                                queue                =                "mqtest"                                                Set                                                qm                =                "QM_antigua"                                                Set                                                chan                =                "S_antigua/TCP/antigua(1414)"                                                Prepare                                                logfile                =                "c:\mq-send-log.txt"                                                Set                                                bank check                =                send                .                %Init                (                queue                ,                qm                ,                chan                ,                logfile                )                                                If                                                '                bank check                                                Quit                                                send                .                %GetLastError                (                )                                                                                //initialize the stream and tell it what file to use                                                Ready                                                longmsg                =                ##class                (                %FileCharacterStream                )                .                %New                (                )                                                Set                                                longmsg                .                Filename                =                "c:\input-sample.txt"                                                                                Fix                                                cheque                =                send                .                %PutStream                (                longmsg                )                                                If                                                '                check                                                Quit                                                ship                .                %GetLastError                (                )                                                Quit                                                check                }              

Case three: Sending a Message from the Terminal

The following example shows a Terminal session that sends a message to an IBM WebSphere MQ queue. This works just on a automobile that has been configured with the IBM WebSphere MQ client.

Set MySendQ = ##class(%Internet.MQSend).%New()  Do MySendQ.%Init("Q_1", "QM_1","QC_1/TCP/127.0.0.1(1401)","C:\mq.log")  Do MySendQ.%Put("How-do-you-do from tester")  Set MyRecvQ =##form(%Net.MQRecv).%New()  Exercise MyRecvQ.%Init("Q_1", "QM_1","QC_1","C:\mq.log")  Do MyRecvQ.%Go(.msg, 10000)  Write msg,!              

Also see the preceding sections for other examples.

Retrieving Messages

To recall letters, do the post-obit:

  1. Create a connection object as described in "Creating a Connection Object." In this case, create an instance of %Net.MQRecv . The connection object has a message queue from which you lot tin retrieve messages.

  2. Phone call the following methods, equally needed:

    • %Go() — Returns a string message by reference as the starting time statement.

    • %GetStream() — Given an initialized file character stream, this method retrieves a message from the queue and places it into the file associated with that stream. Note that you must set the Filename property of the stream in order to initialize it. Binary streams are not supported.

    For both methods, the second argument is the timeout, in milliseconds; this controls the time used to contact the server. The default timeout is 0.

  3. Check the value returned by the method you called. See "Getting Error Codes." Remember that IBM WebSphere MQ returns 2033 when the queue is empty.

  4. When you are done retrieving messages, telephone call the %Close() method of the connection object to release the handle to the dynamic-link library.

Case 1: ReceiveString()

The following class method retrieves a message from the mqtest queue.

                ///                Method returns cord or cypher or error message                ClassMethod                                                ReceiveString                ()                                                Equally                                                %Cord                {                                                Set                                                recv                =                ##class                (                %Net                .                MQRecv                )                .                %New                (                )                                                Set                                                queue                =                "mqtest"                                                Set                                                qm                =                "QM_antigua"                                                Set                                                chan                =                "S_antigua/TCP/antigua(1414)"                                                Ready                                                logfile                =                "c:\mq-recv-log.txt"                                                                                Set                                                check                =                recv                .                %Init                (                queue                ,                qm                ,                chan                ,                logfile                )                                                If                                                '                check                                                Quit                                                recv                .                %GetLastError                (                )                                                Ready                                                bank check                =                recv                .                %Get                (                .                msg                )                                                If                                                '                check                                                {                                                Set                                                reasoncode                =                recv                .                %GetLastError                (                )                                                If                                                reasoncode                =                2033                                                Quit                                                ""                                                Quit                                                "ERROR: "                _                reasoncode                                                }                                                                                Quit                                                msg                }              

Example ii: ReceiveCharacterStream()

The following method tin can think a longer message considering information technology uses %GetStream():

                ///                                                Method returns reason lawmaking from IBM WebSphere MQ                ClassMethod                                                ReceiveCharacterStream                ()                                                Equally                                                %Integer                {                                                Set                                                recv                =                ##class                (                %Net                .                MQRecv                )                .                %New                (                )                                                Set                                                queue                =                "mqtest"                                                Fix                                                qm                =                "QM_antigua"                                                Gear up                                                chan                =                "S_antigua/TCP/antigua(1414)"                                                Set                                                logfile                =                "c:\mq-recv-log.txt"                                                Ready                                                check                =                recv                .                %Init                (                queue                ,                qm                ,                chan                ,                logfile                )                                                If                                                '                cheque                                                Quit                                                recv                .                %GetLastError                (                )                                                                                //initialize the stream and tell information technology what file to use                                                //make sure filename is unique we tin tell what nosotros received                                                Set                                                longmsg                =                ##class                (                %FileCharacterStream                )                .                %New                (                )                                                Fix                                                longmsg                .                Filename                =                "c:\mq-received"                _                $h                _                ".txt"                                                Set                                                check                =                recv                .                %GetStream                (                longmsg                )                                                If                                                '                check                                                Quit                                                recv                .                %GetLastError                (                )                                                Quit                                                check                }              

Updating Message Information

The %Net.MQSend and %Net.MQRecv classes as well provide the post-obit methods:

%CorId()

Updates (by reference) the Correlation Id for the concluding message read.

%ReplyQMgrName()

Updates (by reference) the respond queue manager name for the concluding message read.

%ReplyQName()

Updates (by reference) the reply queue proper name for the last bulletin read.

Troubleshooting

If you see problems when using the InterSystems IRIS interface to IBM WebSphere MQ, y'all should first make up one's mind whether the client is correctly installed and can communicate with the server. To perform such a test, you can use sample programs that are provided by IBM WebSphere MQ. The executables are in the bin directory of the IBM WebSphere MQ client.

The post-obit steps describe how to use these sample programs on Windows. The details may be different on other operating systems; consult the IBM documentation and check the names of the files present in your client.

  1. Create an environment variable called MQSERVER. Its value should exist of the form channel_name / transport / server, where channel_name is the proper noun of the channel to use, send is a string that indicates the ship to use, and server is the name of the server. For case: S_antigua/TCP/antigua

  2. At the command line, enter the following command:

    amqsputc queue_name queue_manager_name

    where queue_name is the name of the queue to utilize and queue_manager_name is the proper name of the queue director. For example:

    amqsputc mqtest QM_antigua

    If the amqsputc control is unrecognized, brand sure that the PATH environment variable has been updated to include the bin directory of the IBM WebSphere MQ client.

    In instance of other errors, consult the IBM documentation.

  3. Yous should see a couple of lines like the following:

    Sample AMQSPUT0 first target queue is mqtest
  4. At present y'all can send messages. Simply blazon each message and press Enter after each message. For example:

    sample message 1 sample message 2
  5. When yous are done sending messages, press Enter twice. You lot will then run across a line like the following:

  6. To complete this test, we volition retrieve the letters you sent to the queue. Type the following command at the command line:

    amqsgetc queue_name queue_manager_name

    where queue_name is the proper name of the queue to employ and queue_manager_name is the proper name of the queue director. For example:

  7. You should and so see a start line, followed past the messages that y'all sent previously, equally follows:

    Sample AMQSGET0 start message <sample message 1> message <sample message ii>
  8. This sample programme waits briefly to receive any other letters and and so displays the post-obit:

    no more letters Sample AMQSGET0 end                

If the test fails, consult the IBM documentation. Possible causes of problems include the post-obit:

  • Security issues

  • Queue is non defined correctly

  • Queue manager is non started

curtiswiten1995.blogspot.com

Source: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GNET_MQ

Post a Comment for "Read File Line by Line and Push to Mq"