ASCII to EBCDIC conversion in MQ series (For RPG programs) - Websphere

This is a discussion on ASCII to EBCDIC conversion in MQ series (For RPG programs) - Websphere ; i have a queue populated with data in ASCII format and i want to read it but in AS400 Queue it shows junk data because the data format in AS400 is EBCDIC. the CCSID is as per the format of ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ASCII to EBCDIC conversion in MQ series (For RPG programs)

  1. ASCII to EBCDIC conversion in MQ series (For RPG programs)

    i have a queue populated with data in ASCII format
    and i want to read it but in AS400 Queue it shows
    junk data because the data format in AS400 is EBCDIC.
    the CCSID is as per the format of the message and there is already GMCONV added to GMOPT is this not for data conversion. i tried to add MQGMO_CONVERT to the GMOPT also but it pops an error message at compile time saying that the identifier(MQGMO_CONVERT) is not defined. do i need to make some changes to the copy book CHQGMOG. if yes then can you elaborate on the changes that needs to be done to solve this problem.


  2. Re: ASCII to EBCDIC conversion in MQ series (For RPG programs)

    anish707_ece@yahoo.co.in wrote:
    > i have a queue populated with data in ASCII format
    > and i want to read it but in AS400 Queue it shows
    > junk data because the data format in AS400 is EBCDIC.
    > the CCSID is as per the format of the message and there is already GMCONV added to GMOPT is this not for data conversion. i tried to add MQGMO_CONVERT to the GMOPT also but it pops an error message at compile time saying that the identifier(MQGMO_CONVERT) is not defined. do i need to make some changes to the copy book CHQGMOG. if yes then can you elaborate on the changes that needs to be done to solve this problem.


    Sorry for the delay in replying.

    You need to make sure that the MQMD you pass to MQGET has the CCSID you
    want to receive in its CodedCharSetId field. If you are unsure what
    this is, try the special value MQCCSI_Q_MGR which represents the queue
    manager's CCSID.

    I'm not very familiar with the COBOL definitions of these constants, but
    from what I recall the COBOL constants are named the same as the C
    constants but with _ replaced by -. So, MQGMO_CONVERT becomes
    MQGMO-CONVERT and MQCCSI_Q_MGR becomes MQCCSI-Q-MGR.

    Hope this helps...

+ Reply to Thread