In IIB, How to change the values of Encoding and CCSID in the input message properties - ibm-mq

In IIB,we have a Message flow, which has MQ Input node listening to receive input message.
We have to change the Input MQMD/Message properties like Encoding and CCSID to the values which I needed.
I have used 'Convert' property in the MQ Input node properties and set the properties of 'Convert encoding' and 'Convert coded character set ID', but it is not changing the values of Input request MQMD Encoding and CCSID.
Please suggest how I can change these values.
The reason behind is I need to use these properties in my Error handling message flow.
We connect the error handling to Input MQ Node catch terminal, from that we send a mail to our support group with the error details. In Error handling in one of the compute node it is using InputRoot.Properties.Encoding, InputRoot.Properties.CodeCharacterSetID, which are receiving as Encoding - 273, CCSID - 37. We are seeing Error emails with Junk characters instead of proper text. We are assuming because of these properties it is causing issue. And for other parameters Encoding - 536, CCSID - 1208 or Encoding - 536, CCSID - 437 it is working with no issues.

IIB uses UTF8 internally, and converts the input and output message automatically, when parsing and serializing, based on the CCSID value in the message headers and/or Properties. You need to be careful on output as CCSID defined in message headers can overwrite the one in the Properties.
If you see invalid characters after the conversion done by IIB, than the most likely cause is that the incoming MQ message has an incorrect CCSID, one that doesn't match the actual codepage used for the data.
The CCSID in the MQMD header is just for information, there is nothing in MQ or IIB ensuring that the source application actually used the codepage, it put in the MQMD, on the data it sent.

Related

ISO 8583 Message Giving Timeout Error in JMeter

I'm scripting for ISO Messages using JMeter to do Load Testing. I have used the ISO 8583 Sampler and connection configuration. All the data field by field is mapped correctly including the MTI (Field 0). But the issue is that the request is not being sent to the server from the JMeter. It just keep on giving the timeout issue and I'm getting no response against it. I've seen the request and validated it format from the implementer himself and he says that the format is correct. Can anyone help to trouble shoot this issue?
Check out Why am I getting timeouts? documentation section,
Why am I getting timeouts?
The three common reasons for response timeouts are:
The sampler does not receive any response.
The sampler does receive a response but fails to unpack it.
The sampler does receive a response and unpacks it but no request can be matched.
The debug log should contain Channel output similar to the following:
2022-02-22 12:34:56,789 DEBUG n.c.b.j.i.Q2: (channel/HOSTNAME:POST) [send] Out: 0800 000001
2022-02-22 12:34:56,987 DEBUG n.c.b.j.i.Q2: (channel/HOSTNAME:POST) [receive] In: 0810 000001
If only the first log line is present, no response was received (case 1 above). It is likely that the request is incorrectly formed and the remote system discarded it, so checking its logs/traces may be helpful. Double-check the Packager Configuration file! This defines how a request is packed (or response is unpacked) before (after) it goes over the wire.
If both lines are present, a response was in fact received (cases 2 and 3 above).
If the second log line instead contains an error like the following, then the response failed to unpack (case 2 above). Double-check the Packager Configuration file!
2022-02-22 12:34:56,987 ERROR n.c.b.j.i.Q2: (channel/HOSTNAME:POST) [receive] org.jpos.iso.SOMECLASSNAMEHERE: Problem unpacking field ...
If the second log line contains no error then it is likely that the plugin did not find a matching request (case 3 above). Double-check the Mux Settings! These define MTI values and message fields that are used for matching, and the default settings may not work.
In order to increase JMeter's logging verbosity for the ISO 8583 sampler add the next line to log4j2.xml file:
<Logger name="nz.co.breakpoint.jmeter.iso8583" level="debug" />
JMeter restart will be required to pick up the change.
Also make sure that you can reach the target server host/port from the machine where JMeter is running using a telnet client or equivalent.

How to send two files into a single MQ message with different MsgSeqNumber

Good Afternoon,
I'm working from a unix machine.
I've two XML files and I need to load them into a queue. The two files should be 'considered' a single MQ message.
First, I tried to concatenate the files together and to upload them on a queue with
ma01_q -o QueueName -m ManagerQueue -F Filename;
However, the receiver of the message didn't succeed to make the distinction between the two files.
He provided me some part of what was expected in the hexadecimal message:
...
A GRP 000...
A MSQ 1
...
A MSF 8
...
The content of the first file in hexadecimal
...
A GRP 000...
A MSQ 2
...
A MSF 24
...
The content of the second file in hexadecimal
So according to him, I should use the parameters GroupId and MsgSeqNumber.
For the first file:
Put 'MQMF_MSG_IN_GROUP' in field MsgFlags of the message descriptor.
Use 'MQPMO_LOGICAL_ORDER' on the MQPUT.
Perform the MQPUT.
For the second file:
Put 'MQMF_LAST_MSG_IN_GROUP' in field MsgFlags of the message descriptor.
Use option 'MQPMO_LOGICAL_ORDER' on the MQPUT.
Perform the MQPUT.
This will automatically generate a 'GroupID' and 'MsgSeqNumber' for each file. Using the flag 'MQMF_LAST_MSG_IN_GROUP' will ensure that the message group is 'closed'.
The two files are one message each but grouped together using MQ "Message Grouping".
Is it possible to do that on unix with ma01_q or qload?
Neither ma01 nor the qload supports creating message groups.
You could use the mqput2 program from support pack ih03. The mqput2 program can use the MQMD header provided in the file. So you would need to add the MQMD to your files, with the desired message group and sequence number details, then use mqput2 to put your files on the queue.
But I think it would be better to write your own program to do this.

Max payload size for post request and Get response for SpringBoot Rest

Is there any max size for send post payload ?
Actually, I have a service which send a json payload to another micro-service, In side of JSON payload, there is a filed which hold encoded String (basically i have converted file into encoded String and set it into that payload field value).
File size is not fixed, So i am curious about it, is there any max size support for Post json payload ?
I know spring-boot have following properties for set max size for file upload.
spring.http.multipart.max-file-size
spring.http.multipart.max-request-size
But as i mentioned i am not upload file, i am convert file into encoded string and send this string with json payload.
So how can i set the max size support for post request.
Also In another scenario I am hitting a Get request to micro-service and then this micro service return a large payload,is there any limitation of receive payload size?
It depends, not only in spring configuration as you've pointed, but also in server configuration.
Most servers have a post request loadout limit. For example in tomcat you can configure it with the "maxPostSize" property. Quoting from the documentation:
The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing.
The limit can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).

IRS AIR 1095B Manifest Schema -- OriginalReceiptID

I'm attempting to upload AIR test 2C via the IRS UI web portal and received the following submission error: "The manifest file does not match our current schema. In particular, our system has detected a potential issue with the following element(s)" OriginalReceiptID
Here's our manifest file:
top portion of our manifest file
Can anyone find the errors of my ways?
You need to provide the OriginalReceiptId (on the Manifest) only when sending a Replacement record type for a previously "Rejected" Transmission.
The OriginalUniqueSubmissionId (on the 1094-C) should be provided only when sending a Replacement record type for a previously "Rejected" Submission.
Note: You will receive Transmission-level error if you include both the OriginalReceiptId and OriginalUniqueSubmissionId. The type of rejection dictates which one is needed to be used. The Type of Rejection is caused by either the Transmission or Submission, and is defined by the reason for the rejection and the structure of the Error Data File received from the status response.
CorrectedUniqueSubmissionId on the 1094-C is used when sending a
Correction record type for a previously "Accepted" or "Accepted with Errors" 1094-C record.
CorrectedUniqueRecordId on the 1095-C is used when sending a
Correction record type for a previously "Accepted" or "Accepted with Errors" 1095-C record.
I don't think you need original receipt id for the correction files, it is for rejected files. refer to IRS air composition referece guide at https://www.irs.gov/pub/irs-pdf/p5165.pdf

ZPL ^HS command gives incorrect value for number of formats in receive buffer

I am trying to get the number of label formats remaining in the print buffer of a Zebra printer. The printer is being accessed using the Zatar cloud service. To achieve this I am:
putting the printer in a paused state
calling the ^HS command
looking at the 5th field in string 1 of the response
According to the ZPL documentation this field is the
number of formats in receive buffer
However, this value does not appear to be correct. Each subsequent time we call it whilst the printer is paused the value in the field increases. No other jobs are being sent to the printer.
Here is same output of the response:
DEVICE_COMPLETED_SUCCESSFULLY - 030,0,1,0834,003,0,0,0,000,0,0,0
000,0,0,0,0,2,6,0,00000001,1,001
1234,0
Then this after a short interval:
DEVICE_COMPLETED_SUCCESSFULLY - 030,0,1,0834,026,0,0,0,000,0,0,0
000,0,0,0,0,2,6,0,00000001,1,001
1234,0
And so on:
DEVICE_COMPLETED_SUCCESSFULLY - 030,0,1,0834,028,0,0,0,000,0,0,0
000,0,0,0,0,2,6,0,00000001,1,001
1234,0
The initial response of 003 is correct. However I do not understand why it is then incrementing to 26 and then to 28.
Why is the response not providing the correct value for the formats remaining in the receive buffer?
The reason for the discrepancy in the number of formats in the receive buffer was due to how the printer was being accessed. The Zatar cloud service was used rather than any direct method such as USB.
The Zatar cloud service uses a device called an Edgebox to communicate with the printer. The Edgebox was periodically sending commands to the printer and it was these commands that were accumulating in the receive buffer.

Resources