RXS_initTplEng
From Wiki
|
| User Guide |
Contents |
Description
Call this subprocedure to initialize the Template Engine environment. Its parameters allow programmers to override default options. To accept a default, pass the keyword *omit for a particular parameter.
Prototype
D RXS_initTplEng... D pr D pOutType value like(RXS_Type) D pOutFile const options(*omit) D like(RXS_FilePath) D pCodePage 10u 0 const options(*omit) D pTplDir like(RXS_FilePath) D const options(*omit) D pTransDir like(RXS_FilePath) D const options(*omit) D pDebug n value
Parameters
- pOutType
- Used to specify where to send output when the internal buffer is flushed. Passing RXS_STDOUT will route output to standard output (used when offering a web service from your System i5). Passing RXS_STMF will route output to an IFS stream file. Passing RXS_VAR will allow the content to be buffered until RXS_getBuffData is called to retrieve the data. Those are the only valid values.
- pOutFile
- If pOutType = RXS_STMF this parameter specifies the file name of the IFS file that will receive the output. Specify the full path (i.e. /myifs/folder/myfile.xml) only when the desired destination is not in the default transaction directory. If pOutType = RXS_STDOUT, specify *omit here.
- pCodePage
- If pOutType = RXS_STMF, this parameter can contain a code page to override the default. If pOutType = RXS_STMF and this parameter is omitted, RXS will use the job’s default values. If pOutType = RXS_STDOUT, specify *omit here.
- pTplDir
- Specifying the template directory temporarily overrides the location the Template Engine should look for templates. For example the default template directory may be set to /www/myrxs/templates/ but your program may want to temporarily change it to /home/myname/templates/.
- pTransDir
- Specifying the transaction directory temporarily overrides the location where the Template Engine will place XML transaction files (i.e. XML documents.) For example, the default transaction directory may be set to /www/myrxs/trans/ but your program may want to temporarily change it to /home/myname/trans/
- pDebug
- Setting this to *on will enable writing informational messages to the job log for debugging purposes. Once an application goes into production, set this value to *off to keep job logs from filling up.
Return value
None.
Notes / Examples
Sending to standard out (using RXS_STDOUT for pOutType) when offering a web service generally executes faster because it does not need to go to an IFS stream file first. Using RXS_VAR for pOutType will also execute slightly faster when executing a web service on a remote machine because it does not need to go to an IFS stream file.
