Handling Lansa HTML field on iseries

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Mkolbe
Posts: 27
Joined: Tue Apr 04, 2017 12:45 am

Handling Lansa HTML field on iseries

Post 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.
Attachments
Lansa HTML DB field.docx
(474.64 KiB) Downloaded 5948 times
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Handling Lansa HTML field on iseries

Post by MarkD »

Could you do an IBM i DSPFFD (Display File Field Description) command on the table and post what it outputs?
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Handling Lansa HTML field on iseries

Post 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 76589 times
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Handling Lansa HTML field on iseries

Post by MarkD »

There seem to be lots of RPG program examples on the web for writing BLOB and CLOB data.
Mkolbe
Posts: 27
Joined: Tue Apr 04, 2017 12:45 am

Re: Handling Lansa HTML field on iseries

Post 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.
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: Handling Lansa HTML field on iseries

Post by atostaine »

You need to use SQL to read or write BLOB's in RPG. Are you trying to read or write?
Art Tostaine
Mkolbe
Posts: 27
Joined: Tue Apr 04, 2017 12:45 am

Re: Handling Lansa HTML field on iseries

Post 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).
Post Reply