Discussion Board for collaboration on QlikView Scripting.
I try to import a field (length = 245 characters) from an AS400 (iseries) database. I only see the first 62 characters in Qlikview.
After the 62 characters there are 14 blanco characters and after those blanco's we have textcharacters. But these textcharacters are not in Qlikview.
Is it possible that Qlikview cut off the field after a number of blanco characters?
Or how can I insert all the 245 characters in Qlikview?
Go to Solution.
No, now you do the split in the QV section of the script.
You have to do it in the SQL Select part
something like this
SQL Select mid(CPFLD1,92,15) as ShortName, mid(XPFLD1, 84, 3) as Type from X62FIL700O.PXP
Do you get all characters when you load this data in an other application (like Excel) when you conect via ODBC? Maybe it's cut-off by the ODBC driver ?
In Excel I see the full field (more than 62 characters). So I don't think it is the ODBC-Driver...
I know Qlikview removes trelling spaces but i don't know after how many digits.
Have you tried to extract an other field with the same length and fully filled with characters?
What is the length of the field / value in QV? (length(fielda)) Mayby a special character in it, like a CR (Carriage Return)? You wont see the data in a listbox, but could see it in a textbox.
I've been looking in the datadescription of the file. And the value of the field is defined by a data-structure.
In this data-structure there is a packed field. And it seems that he cut-off the field at the beginning of the packed value.
Could this be related to the driver?
This doesn't give a difference.
Could you just split the field in your SQL SELECT statement at the position the PackedDecimal field starts?
This may help. Maybe convert the 2nd part to a integer of varchar
Do you mean by this?
mid(XPFLD1, 92, 15) as ShortName,
mid(XPFLD1, 84, 3) as Type;
SQL SELECT *
FROM S060AE2T.X62FIL700O.PXP where Left(XPKEYF,2) = 'SS' ;
Because there are no values in ShortName and Type.
This is working.
We only need to use "substr" because the AS400 doesn't understand the "mid"