# Traffic Parrot for CA LISA / DevTest users

## What carries over

If your mainframe virtual services were built in DevTest (formerly CA LISA) on its IBM MQ transport protocol and its copybook data protocol, the parts that took the work carry over: the copybooks, the knowledge of which program answers which request, the fields you match on and the replies you shaped. Traffic Parrot stands in for the IBM® MQ CICS bridge the same way, decoding the COMMAREA with your copybooks and answering on the reply-to queue, and the [CICS over IBM® MQ](https://trafficparrot.com/documentation/5.65.x/cics.html) page describes every piece this page maps to.

The biggest difference is what runs where. Traffic Parrot is one standalone server for your [HTTP](https://trafficparrot.com/documentation/5.65.x/http.html), [JMS](https://trafficparrot.com/documentation/5.65.x/jms.html), [native IBM® MQ](https://trafficparrot.com/documentation/5.65.x/ibmmq.html), [file](https://trafficparrot.com/documentation/5.65.x/filemessage.html) and CICS bridge virtual services, with every virtual service a set of JSON mapping files you keep in version control and edit in a [web user interface](https://trafficparrot.com/documentation/5.65.x/ibmmq.html#edit-mq) or with a text editor. It records at the queue, between the application and the bridge, so there is no agent to install in the CICS region and no LPAR-side component to operate, and it is licensed by [concurrent (floating) instances](https://blog.trafficparrot.com/2020/04/what-is-concurrent-floating-license.html).

## DevTest concepts and their Traffic Parrot equivalents

| In DevTest | In Traffic Parrot |
| --- | --- |
| A virtual service model (VSM) with its virtual service image (VSI), the recorded or authored request and response pairs the service answers from. | A set of mapping files under `ibm-mq-mappings`, each a request matcher paired with a response, grouped into [scenarios](https://trafficparrot.com/documentation/5.65.x/virtual_services.html); recorded, imported or written by hand, and edited in the [mapping editor](https://trafficparrot.com/documentation/5.65.x/ibmmq.html#edit-mq) or in version control. |
| The IBM MQ transport protocol: the queue manager, the request and reply queues, and how a reply is correlated to its request. | A native IBM® MQ connection in [`ibm-mq-connections.json`](https://trafficparrot.com/documentation/5.65.x/ibmmq.html#define-connections) and a replay session on the bridge request queue. A bridge reply goes to the request's reply-to queue with its correlation id set to the request's message id, as the bridge itself does ([Replying as the bridge](https://trafficparrot.com/documentation/5.65.x/cics.html#replying)). |
| The copybook data protocol: the folder of copybook file definitions and the map that picks a definition for each request. | The `copybooks` directory and its `programs.json`, which names each program's request and reply copybook ([Copybooks](https://trafficparrot.com/documentation/5.65.x/cics.html#copybooks)). The request's program name picks the copybook, so no mapping from payload to definition is written. |
| The data protocol's code page for the EBCDIC payload. | `codePage` in the program's entry, `IBM037` unless set. |
| Separate request-side and response-side copybook definitions. | `requestCopybook` and `replyCopybook`, the same file when the program uses one layout both ways. |
| Request arguments parsed from the copybook fields, and the match style of each (exact, pattern, range) in the VSI. | The [JSON view of the request](https://trafficparrot.com/documentation/5.65.x/cics.html#request-view): the program name, every decoded field, the MQMD user and the `MQCIH` fields. Match them with [`matchesCicsField`](https://trafficparrot.com/documentation/5.65.x/cics.html#matches-cics-field) (`equalTo`, `matches`, `greaterThan` and the other comparisons) or with any JSON matcher, combined with `and`, `or` and `not`. |
| Response payloads that reference request arguments through property expressions, and magic strings and dates. | [Response templating](https://trafficparrot.com/documentation/5.65.x/dynamic.html) with the [`cicsField`](https://trafficparrot.com/documentation/5.65.x/cics.html#cics-field-helper) helper for request fields and the other helpers for dates, random values, arithmetic and lookups, inside the reply's JSON. |
| The reply's completion and abend information. | The `MQCIH` part of the reply: `ReturnCode`, `CompCode`, `Reason` and `AbendCode`. |
| Think time on a transaction. | A [fixed delay](https://trafficparrot.com/documentation/5.65.x/ibmmq.html#edit-mq-delay) on the response. |
| Recording a CICS program through the in-region agent, or recording the MQ traffic with the transport protocol. | [Recording at the queue](https://trafficparrot.com/documentation/5.65.x/cics.html#recording): Traffic Parrot sits between the application and the real bridge, forwards each request, and records the pair as a mapping with the decoded fields and the bridge's bytes. No agent. |
| A payload no copybook describes, such as an acknowledgement, bypasses copybook processing (`lisa.vse.copybook.unknown.passthrough`). | A program with no copybook is still matched, on its raw bytes; a request no mapping matches is listed on the IBM® MQ **Requests** page with the nearest mappings and the field each missed on, so the gap is visible. |

## One transaction, written for Traffic Parrot

Where a DevTest service would carry the program's copybook in its file definition folder, a request argument on the account number and a response payload with the balance, the same transaction in Traffic Parrot is the program's two copybooks, one index entry and one mapping file:

```json
{
  "ACCTBAL": {
    "requestCopybook": "ACCTBAL-REQ.cpy",
    "replyCopybook": "ACCTBAL-RPY.cpy"
  }
}
```

```json
{
  "request": {
    "destination": { "name": "CICS.BRIDGE.REQUEST", "type": "QUEUE" },
    "bodyMatcher": {
      "and": [
        { "matchesCicsField": { "field": "ProgramName", "equalTo": "ACCTBAL" } },
        { "matchesCicsField": { "field": "COMMAREA.ACCOUNT-NO", "matches": "[0-9]{10}" } }
      ]
    }
  },
  "response": {
    "destination": { "name": "CICS.BRIDGE.REPLY", "type": "QUEUE" },
    "text": "{\"MQCIH\": {\"ReturnCode\": 0, \"CompCode\": 0, \"Reason\": 0, \"AbendCode\": \"\"}, \"COMMAREA\": {\"ACCOUNT-NO\": \"{{cicsField request.body 'COMMAREA.ACCOUNT-NO'}}\", \"BALANCE\": 1500.25, \"STATUS-CODE\": \"OK\", \"RESERVED\": 0}}"
  }
}
```

The [walkthrough on the IBM® MQ developer container](https://trafficparrot.com/documentation/5.65.x/cics.html#try-it) runs exactly this transaction end to end, with the copybooks and a client that puts the request, so it is the quickest way to see the shape your migrated services will take.

## Where the scope differs

- **Recording inside the region.** DevTest can record a CICS program from inside CICS with its agent. Traffic Parrot records the MQ traffic between the application and the bridge, and installs nothing on the mainframe; a program that is only ever called from inside CICS, never over the bridge, is not seen.
- **CICS Transaction Gateway, IMS Connect and DRDA.** ECI calls through CTG, IMS Connect and DRDA are not virtualized.
- **The IMS bridge.** A request in the IMS format (`MQFMT_IMS`, with an `MQIIH` header) is not answered or recorded ([the IMS bridge](https://trafficparrot.com/documentation/5.65.x/cics.html#ims-bridge)).
- **z/OS Connect and CICS Web Services** are HTTP and SOAP, and are virtualized like any [HTTP](https://trafficparrot.com/documentation/5.65.x/http.html) or [SOAP](https://trafficparrot.com/documentation/5.65.x/http.html#soap) service, with no bridge or copybook involved.

## Where to go next

- [CICS over IBM® MQ](https://trafficparrot.com/documentation/5.65.x/cics.html): enabling the bridge, copybooks, matching, replying and recording.
- [Native IBM® MQ](https://trafficparrot.com/documentation/5.65.x/ibmmq.html): connections, recording and replaying queues, and the mapping editor.
- [Switching from another tool](https://trafficparrot.com/documentation/5.65.x/switching-from-another-tool.html): the other migration pages.
- [Contact us](https://trafficparrot.com/contact.html) about migrating a DevTest estate.
