Page 1 of 1

Handling Lansa HTML field on iseries

Posted: Wed Sep 30, 2020 3:33 am
by Mkolbe
We defined a file/table within Lansa that contains an HTML field. The file/field is being used to store free-format notes entered within our Lansa application. I now have to figure out how to output to this field using an RPGLE program on the iseries as well.

Does anyone have any experience doing something like this?
Is this even possible?

As I look at the file on our iseries, the "field type" shown ("1") isn't even valid from a AS400 DDS perspective. When I compile my RPGLE program, the field name as it appears on the iseries isn't recognized (I have no issue with any of the other fields on the file). I've included an attachment.

Re: Handling Lansa HTML field on iseries

Posted: Wed Sep 30, 2020 3:59 pm
by MarkD
Could you do an IBM i DSPFFD (Display File Field Description) command on the table and post what it outputs?

Re: Handling Lansa HTML field on iseries

Posted: Wed Sep 30, 2020 4:15 pm
by MarkD
If it shows a "1" as the field type also, then this is possibly a more up to date list of all the possibilities:
Capture.PNG
Capture.PNG (25.23 KiB) Viewed 76587 times

Re: Handling Lansa HTML field on iseries

Posted: Wed Sep 30, 2020 4:17 pm
by MarkD
There seem to be lots of RPG program examples on the web for writing BLOB and CLOB data.

Re: Handling Lansa HTML field on iseries

Posted: Wed Sep 30, 2020 11:45 pm
by Mkolbe
Thanks for the list. The ones I was looking at didn't include type "1". I'll do some more research on BLOBS.

Re: Handling Lansa HTML field on iseries

Posted: Thu Oct 01, 2020 4:27 am
by atostaine
You need to use SQL to read or write BLOB's in RPG. Are you trying to read or write?

Re: Handling Lansa HTML field on iseries

Posted: Tue Oct 06, 2020 7:43 am
by Mkolbe
atostaine wrote: Thu Oct 01, 2020 4:27 am You need to use SQL to read or write BLOB's in RPG. Are you trying to read or write?
I need write to a BLOB field on a file (not a display). My input file has text data in multiple fields that I'm going to be "concatenating" and writing to the BLOB field.

So far I'm just jumping from one website to another trying to piece together the clues on how to do it. Haven't found a good tutorial/example.

I did find something that confirms what you said, the program needs to be SQLRPGLE and the output is handled with a SQL statement. I'm assuming that alleviates the compile problem I was having when defining the output file in the F specs (where it didn't recognize the Blob field name).