RXS_StartComposeEngine()

This subprocedure initializes the compose engine with a specific template file. This is utilized primarily to build XML but could be used to build any type of character data.

Subprocedure Prototype

     D RXS_StartComposeEngine...
     D                 PR                  Extproc('RXS_StartComposeEngine')
     D                                     Opdesc

     D   ComposeDS                         Likeds(RXS_ComposeDS_t)
     D                                     Options(*Varsize)

Pass in an RXS_ComposeDS_t to control how the composition engine functions.

Example Code

      *--------------------------------------------------------------
      * This example code initializes the composition engine for the EXAMPLE template and 
      *  configures it with the procedure address for the Template procedure.
      *--------------------------------------------------------------
     H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

      /copy QRPGLECPY,RXSCB
      /copy QRPGLETPL,EXAMPLE

     D ComposeDS       DS                  LikeDS(RXS_ComposeDS_t)
     D                                     Inz(*LikeDS) 
      /free
       reset ComposeDS;
       ComposeDS.TemplateProcedure = %Paddr(Template);
       RXS_StartComposeEngine( ComposeDS );

       *INLR = *ON;
      /end-free

     P Template        B
     D                 PI
     D  p                                  Like(RXS_TEMPLATE_PARM)
      /copy QRPGLETPL,EXAMPLE
     P                 E

Data Structures

     D RXS_ComposeDS_t...
     D                 DS                  Qualified Template Inz

     D   ReturnedErrorInfo...
     D                                     Like(RXS_ReturnedErrorInfoDS_t) Inz

     D   OnErrorMessageType...
     D                                5I 0

     D   TemplateProcedure...
     D                                 *   Procptr

Pointer to the address of the subprocedure that will compose the XML or other character based content.

     D   LogFile                           Like(RXS_Var1Kv_t)

IFS location where a log file will be created during composition.