[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Array data type mismatch



I'm getting an array "put" and "get" error that I do not understand.  I'm
fairly new to SQR, so it may be something simple.

The error is:

   (SQR 3514) PUT and GET variables must match array field types.

The error only occurs for some of the fields ... in this case #inv_transeq;
the others listed I'm trying to print do so correctly with no error.  For
that field, I'm declaring it as a number, filling it with a number and
trying to retrieve it as a number.  I've also checked the source record, and
it is a number type there, as well.  Why am I getting the mismatch?

Thanks for any help.

I'm creating the array in the setup section, as follows:

    create-array name=Invoices size=200
        field=inv_custnum:char
        field=inv_policynum:char
        field=inv_trancode:char
        field=inv_inputcode:char
        field=inv_trantype:char
        field=inv_financestatement:char
        field=inv_description:char
        field=inv_csacode:char
        field=inv_invoicenum:number
        field=inv_policyseq:number
        field=inv_transeq:number
        field=inv_aramount:number
        field=inv_effdate:date
        field=inv_invdate:date
        field=inv_greaterdate:date

Then, I'm filling it (#invarraycount and variables are passed from calling
procedure):

put     $custnum
        &invoicenum
        &policynum
        &policyseq
        &trantype
        &trancode
        &transeq
        &inputcode
        &aramount
        &financestatement
        &description
        &effdate
        &invdate
        &greatdate
        &csacode
into    Invoices(#invarraycount)
        inv_custnum
        inv_invoicenum
        inv_policynum
        inv_policyseq
        inv_trantype
        inv_trancode
        inv_transeq
        inv_inputcode
        inv_aramount
        inv_financestatement
        inv_description
        inv_effdate
        inv_invdate
        inv_greaterdate
        inv_csacode

Then, I'm trying to get the information:

let #i = 0
while #i <= #invarraycount
    get $inv_custnum
        #inv_invoicenum
        $inv_policynum
        #inv_policyseq
        $inv_trantype
        $inv_trancode
        #inv_transeq
        $inv_csacode
    from Invoices(#i)
    print $inv_custnum (+1,1)
    print #inv_invoicenum (+0,+1)
    print $inv_policynum (+0,+1)
    print $inv_trantype (+0,+1)
    print $inv_trancode (+0,+1)
    print #inv_transeq (+0,+1)
    print $inv_csacode (+0,+1)
    add 1 to #i
end-while