SYS$GETUAI for 64 Bit addressing - VMS

This is a discussion on SYS$GETUAI for 64 Bit addressing - VMS ; Hi, I am trying to execute the following section of the code for 64 bit application. The program is compiled with /pointer_size=64 on IA OpenVMS V8.2-1. The SYS$GETUAI is returing 12 as return status ( Which is ACCVIO). Please help ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: SYS$GETUAI for 64 Bit addressing

  1. SYS$GETUAI for 64 Bit addressing

    Hi,

    I am trying to execute the following section of the code for 64 bit
    application. The program is compiled with /pointer_size=64 on IA
    OpenVMS V8.2-1.

    The SYS$GETUAI is returing 12 as return status ( Which is ACCVIO).

    Please help me in working this section of the code. Many thanks in
    advance.

    < Please excuse for more header file. The code is copied from main
    source for trouble shoot>

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    int main(){


    unsigned __int64 lu_resval=0,lu_reslen=0;
    static $DESCRIPTOR(lu_usernam, "NAGARAJ");
    ileb_64 pItemList[2];
    int lu_sts;

    memset(pItemList,0,sizeof(pItemList));

    pItemList[0].ileb_64$l_mbmo = -1;
    pItemList[0].ileb_64$w_mbo = 1;
    pItemList[0].ileb_64$w_code = UAI$_BYTLM;
    pItemList[0].ileb_64$pq_bufaddr = (unsigned __int64)&lu_resval;
    pItemList[0].ileb_64$pq_retlen_addr = (unsigned
    __int64)&lu_reslen;
    pItemList[0].ileb_64$q_length[0] = 2;

    lu_sts = sys$getuai(0, 0, &lu_usernam, &pItemList, 0, 0, 0);

    printf("Status is %d , \n",lu_sts);
    }


    Thanks and Regards
    Nagaraj C

  2. Re: SYS$GETUAI for 64 Bit addressing

    Forget it. sys$getuai is a 32 bit system service and can't handle 64 bit addresses,
    so you have to move the data to a temp buffer in 32 bit space. See the openvms
    programming concepts manual, chapter 11 (support for 64 bit addressing).

    Jur.

    Nagaraj C wrote:
    > Hi,
    >
    > I am trying to execute the following section of the code for 64 bit
    > application. The program is compiled with /pointer_size=64 on IA
    > OpenVMS V8.2-1.
    >
    > The SYS$GETUAI is returing 12 as return status ( Which is ACCVIO).
    >
    > Please help me in working this section of the code. Many thanks in
    > advance.
    >
    > < Please excuse for more header file. The code is copied from main
    > source for trouble shoot>
    >
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    >
    > int main(){
    >
    >
    > unsigned __int64 lu_resval=0,lu_reslen=0;
    > static $DESCRIPTOR(lu_usernam, "NAGARAJ");
    > ileb_64 pItemList[2];
    > int lu_sts;
    >
    > memset(pItemList,0,sizeof(pItemList));
    >
    > pItemList[0].ileb_64$l_mbmo = -1;
    > pItemList[0].ileb_64$w_mbo = 1;
    > pItemList[0].ileb_64$w_code = UAI$_BYTLM;
    > pItemList[0].ileb_64$pq_bufaddr = (unsigned __int64)&lu_resval;
    > pItemList[0].ileb_64$pq_retlen_addr = (unsigned
    > __int64)&lu_reslen;
    > pItemList[0].ileb_64$q_length[0] = 2;
    >
    > lu_sts = sys$getuai(0, 0, &lu_usernam, &pItemList, 0, 0, 0);
    >
    > printf("Status is %d , \n",lu_sts);
    > }
    >
    >
    > Thanks and Regards
    > Nagaraj C


  3. Re: SYS$GETUAI for 64 Bit addressing

    Nagaraj C wrote:
    > Hi,
    >
    > I am trying to execute the following section of the code for 64 bit
    > application. The program is compiled with /pointer_size=64 on IA
    > OpenVMS V8.2-1.
    >
    > The SYS$GETUAI is returing 12 as return status ( Which is ACCVIO).
    >
    > Please help me in working this section of the code. Many thanks in
    > advance.
    >
    > < Please excuse for more header file. The code is copied from main
    > source for trouble shoot>
    >
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    > #include
    >
    > int main(){
    >
    >
    > unsigned __int64 lu_resval=0,lu_reslen=0;
    > static $DESCRIPTOR(lu_usernam, "NAGARAJ");
    > ileb_64 pItemList[2];
    > int lu_sts;
    >
    > memset(pItemList,0,sizeof(pItemList));
    >
    > pItemList[0].ileb_64$l_mbmo = -1;
    > pItemList[0].ileb_64$w_mbo = 1;
    > pItemList[0].ileb_64$w_code = UAI$_BYTLM;
    > pItemList[0].ileb_64$pq_bufaddr = (unsigned __int64)&lu_resval;
    > pItemList[0].ileb_64$pq_retlen_addr = (unsigned
    > __int64)&lu_reslen;
    > pItemList[0].ileb_64$q_length[0] = 2;
    >
    > lu_sts = sys$getuai(0, 0, &lu_usernam, &pItemList, 0, 0, 0);
    >
    > printf("Status is %d , \n",lu_sts);
    > }
    >
    >
    > Thanks and Regards
    > Nagaraj C


    When I compiled, linked, and ran it, it exited with
    "Status is 98994" which, being translated, means %RMS-E-RNF, record not
    found.

    This does not surprise me in the least since there is no user NAGARAJ in
    my UAF.

    When I run it with a username that exists in my UAF, it fails with an
    ACCVIO.

    I hope this provides you with a clue!

    I will leave further debugging as a exercise for the student.

+ Reply to Thread