Forums
Hi!
See the following code:
d ilobConfiguration... d s * // Store all configurations in a single ILOB d MyValue 40 varying d SettingDS ds d Value 40 varying d Setting ds likeds(SettingDS) d Configuration ds qualified d based(ilobConfiguration) d MyValueArray... d likeds(Setting) dim(99) //
I do the following: Assign a value to 'MyValue': include tha dollar '$' character. Assign 'MyValue' to an element in 'MyValueArray'. Write 'MyValue' to trace using trace(). Write 'MyValueArray' value to trace using trace().
Both trace()'s output the dollar sign to the trace log.
Next I do: Assign 'MyValueArray' element back into 'MyValue'. Write 'MyValue' to trace using trace().
This trace() will write 'Ã…' instead of '$'.
Is there some kind of CCSID translation when something is stored and/or retrieved from content that is stored in an ILOB?
Best regards,
John Foldager
www.izone.dk
www.icebreakforum.org
Re: CCSID on data structure in ILOB?
Hi John,
I have found problems with the first 50 bytes of an ILOB. For some reason IceBreak seems to overwrite the information with its own data.
Can I suggest that you offset you ILOB working area by 50 bytes and see if this helps.
Incidently - If this helps - I usually use the following approach ( note the column positioning is not accurate!!):
The pointer D is a function of pointer H and can therefore can be calculated from H if the value of H is a known variable. Let us suppose we have data in the ILOB and that we have the pointer to H, then to process the data in the ILOB record by record, then we must use something like:
A similar process can be used to add data to the ILOB - don't forget to increment the record count in H
It is also worth noting that if you don't need to store information in the session you can perform a similar process using the RPG %ALLOC and %REALLOC BIFs and the DEALLOC op code.
Hope this helps
Syd
Re: CCSID on data structure in ILOB?
Gents;
When you are receiving the pointer to the ILOB - then it is a handle. so you have to retrive the data pointer from the handle. the workaround that Syd i sugesting actually work ... but use the real poiner please...
Re: CCSID on data structure in ILOB?
Ah - So - we have a new function:
"MyIlobDta = ILOB_GetDataPtr(MyIlob); //' Get the data pointer to the ILOB"
Thanks Niels - I didn't know about this.
Regards
Syd