Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Navigation: Subroutines > CGIUTL

Generate custom file from template

Scroll Prev Top Next More

xcall CGIUTL, CGIOP_MRGFIL, file, status, outch {,varsub1, varsub2 ... {,varsubN}

Opcode 6, CGIOP_MRGFIL, is identical to opcode 3, which see for further parameter details, except that instead of outputting to stdout, it outputs to an arbitrary open file channel, thus making it useful for all kinds of purposes besides CGI. It was combined here rather than as a separate subroutine because it shares nearly all of the same logic as CGIUTL opcode 3.

Parameters

file (String)  [in]

AMOS or native file specification for input file.

status  (Signed Num)  [out]

Will be set to 0 to indicate that a page was successfully generated (although it may still fail to meet the necessary syntactic requirements for a valid webpage). –1 indicates that file could not be opened.

outch  (Num),  [in]

File channel; must be open for output.

varsubN (String)  [in]

One or more variable substitution definitions of the form <name>=<value> (e.g. $CLIENTID=12345).