Thread: MQMD - MQLONG - need urgent help

  1. #1
    Registered User
    Join Date
    Nov 2016
    Posts
    84

    MQMD - MQLONG - need urgent help

    Hi,

    I have a question regarding the MQ data type MQLONG.
    Is this possible?If not how can this be done?

    Code:
    struct myStruct{
    char parm[8];
    };
    
    memcpy(myStruct.parm, msgDescriptor.Expiry, sizeof(myStruct.parm));
    Thanks in advance.

    P.S. It is just the related Sektion of my Code.
    Last edited by Joe1903; 11-05-2019 at 08:27 AM.

  2. #2
    Registered User
    Join Date
    Nov 2016
    Posts
    84
    I think I need this step,but I am not sure.
    Code:
    char myMQparm[8];
    itoa (msgDescriptor.Expory, myMQparm,10);
    memcpy(myStruct.parm, myMQparm, sizeof(myStruct.parm));

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Too much guessing on your part.

    Convert COBOL to C
    Not that much, I am a newbie in Cobol.
    Or let's say,I never implemented in Cobol, now I am trying to get some basics which I need for my C Implementation.
    It seems your C is pretty weak as well.

    Interoperability between different languages usually requires that you are pretty competent at one of them.
    If you're fumbling on this kind of question, it's not good.

    Plus, it's hard to keep track of the half dozen threads you've suddenly spawned with your scattergun approach.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Nov 2016
    Posts
    84
    Quote Originally Posted by Salem View Post
    Too much guessing on your part.

    Convert COBOL to C


    It seems your C is pretty weak as well.

    Interoperability between different languages usually requires that you are pretty competent at one of them.
    If you're fumbling on this kind of question, it's not good.

    Plus, it's hard to keep track of the half dozen threads you've suddenly spawned with your scattergun approach.
    I am very sorry, I will not create threads anymore.
    I have to do something and I try my best.
    Could you please tell whether my approach with itoa is correct?And my last question: What can be done if my source data type is MQCHAR8 and my dest data type char[4]?
    Thank you and sorry again.I will post no more.
    Last edited by Joe1903; 11-05-2019 at 12:31 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Urgent Help plz....
    By shansajid in forum C Programming
    Replies: 3
    Last Post: 01-05-2013, 05:44 AM
  2. Non-Urgent
    By rockyhwc in forum C Programming
    Replies: 13
    Last Post: 05-17-2010, 06:32 PM
  3. hello, please can i have some urgent help!
    By soundwave in forum C++ Programming
    Replies: 9
    Last Post: 01-14-2007, 01:34 PM
  4. > > > Urgent Help < < <
    By CodeCypher in forum C Programming
    Replies: 2
    Last Post: 01-31-2006, 02:06 PM

Tags for this Thread