PocketC has a set of functions for memo database access. See the PocketC documentation. However, such memos are limited to 4k in size.

Probably the easiest thing to do is to accumulate a string of your output and to display it with the PToolbox Note() function using string-in-string-out mode. The text size limit on the Note() function is 32k for editable text and 65k for non-editable text.