|
From: | Patrick |
Subject: | Re: [open-cobol-list] tree data, embedding a language or string interpolation? |
Date: | Sat, 16 Mar 2013 10:35:48 -0400 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121215 Icedove/3.0.11 |
With openCOBOL there is a function called "substitute" Move "This is my Title" To MyTitle. Move Substitute(<title> $title</title> ,"$title",mytitle) To MyHtml. So MyHtml should contain "<title> This is my Title</title> Other functions exclusive to openCOBOL that may also help with parsing in general are: Concatenate and Trim. So if MyTitle is defined as Pic X(64), then you may want to: Move "This is my Title" To MyTitle. Move Substitute(<title> $title</title> ,"$title",Trim(mytitle)) To MyHtml. Code examples require cobc -ffunctions-all Use Concatenate to append MyHtml to your html output buffer. Then display Trim(htmlbuffer) *> nulls are not trimmed.
Thanks Michael !There is still so much I need to learn about Cobol. This looks very promising.
One thing I am still worried about. Is there a way around the 255 character limit? So for instance I might want to do something like this:
<p> MyWriting </p>were the content being swapped in place of MyWriting is several page worth of text.
Is there a way to accomplish this? Thanks again
[Prev in Thread] | Current Thread | [Next in Thread] |