Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Template Sample

CobolScript code can be embedded in a text file.


Install Node.js.


With the command line:

node run webserver.cobt

(actually, .cobt extension is reserved to template files).

The template file:

data division.
working-storage section.
01 n.

procedure division.

perform show-factorial varying n from 1 to 10.

local result.
perform factorial using n giving result.
${n}!= ${result}
factorial using n.
local m.
if n = 1 then return n.
subtract 1 from n giving m.
perform factorial using m giving m.
multiply n by m.
return m.

CobolScript code is embedded between <# and #>. CobolScript expressions are embedded between ${ and }.

You can’t perform that action at this time.