We are creating a STRING file to send to CICS and they are expecting HEX Characters... Is there a way to create HEX Character set using PB?
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- Can we create a .txt file in HEX Character set
- Sufyan Maghur
- PowerBuilder
- Wednesday, 8 November 2023 16:21 PM UTC
- Wednesday, 8 November 2023 16:29 PM UTC
- PowerBuilder
- # 1
Hi Sufyan,
What do you mean "hex characters"?
Hexadecimal is a way of representing numbers, so "Hex Characters" is a foreign concept to me.
Can you give an example of what CICS is expecting?
Regards,
Francisco
- Wednesday, 8 November 2023 16:33 PM UTC
- PowerBuilder
- # 2
Yes I mean Hexadecimal...
For Example our string starts with
ls_mq_module = "CIH 0002" This is first part of the string BUT they are expecting these values in Hexadecimal specifically x"0"
We create the STRING in PB and Pass the String to CICS Via IBM MQ (We are using RESTCLIENT)
- Wednesday, 8 November 2023 17:58 PM UTC
- PowerBuilder
- # 3
Hi Sufyan;
I would suggest looking at the Tilde command. For example ...
String ls_data
ls_data = "~h00"+ "~h43" + "~hFF" + ... // Build a Hex based string
HTH
Regards ... Chris
- Wednesday, 8 November 2023 20:45 PM UTC
- PowerBuilder
- # 4
What about the "HexEncode()" function?
https://docs.appeon.com/pb2021/powerscript_reference/HexEncode_func.html
- Chris Pollach @Appeon
- Wednesday, 8 November 2023 21:07 PM UTC
I don;t think that will work as Sufyan needs to have the data stream EBCDIC encoded for CICS (mainframe) to which the Blob() method does not support that encoding type.
Regards ... Chris
-
Helpful Loading... Helpful 0
- Miguel Leeuwe
- Thursday, 9 November 2023 05:16 AM UTC
Also, using the tilde method, IF having to encode to EBDIC, you'd still have to use a conversion table like this?
https://www.ibm.com/docs/en/iis/11.7?topic=tables-ascii-ebcdic
regards.
-
Helpful Loading... Helpful 0
- Page :
- 1
However, you are not allowed to reply to this question.