RXS_PutStdOut()

This subprocedure is used to output (to standard out) data. Typically, this would be used in a scenario where you are providing a webservice, and would be used to output XML retrieved via RXS_GetComposeBuffer().

Subprocedure Prototype

#

     D RXS_PutStdOut...
     D                 PR                  Extproc('RXS_PutStdOut')

     D   Input                             Like(RXS_Var16Mv_t)
     D                                     Options(*Varsize) Const

Data to be written to "standard out", i.e. to a web browser or to a web service which initiated the incoming request as a client.

     D   pDS                               Like(RXS_Var64K_t)
     D                                     Options(*Varsize:*Nopass)

Optional RXS_PutStdOutDS_t to allow for CCSID conversion during output.

Example Code

#
      *--------------------------------------------------------------
      * This example code writes the content of the field gXml to standard out.
      *--------------------------------------------------------------
     H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

      /copy QRPGLECPY,RXSCB

     D gXML            S                   Like(RXS_Var1Kv_t)
      /free
       gXml = '<element>Example XML</element>';
       RXS_PutStdOut( gXml );

       *INLR = *ON;
      /end-free
      *--------------------------------------------------------------
      * This example code converts the content of the gXml field to UTF-8,
      *  then sends the data to standard out.
      *--------------------------------------------------------------
     H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

      /copy QRPGLECPY,RXSCB

     D putStdOutDS     DS                  LikeDS(RXS_PutStdOutDS_t)
     D                                     Inz(*Likeds) 

     D gXML            S                   Like(RXS_Var1Kv_t)
      /free
       reset PutStdOutDS;

       gXml = '<element>Example XML</element>';
       
       PutStdOutDS.CCSID = RXS_CCSID_UTF8;
       RXS_PutStdOut( gXml : PutStdOutDS );

       *INLR = *ON;
      /end-free

Data Structures

#

     D RXS_PutStdOutDS_t...
     D                 DS                  Qualified Template Inz

     D   ReturnedErrorInfo...
     D                                     LikeDS(RXS_ReturnedErrorInfoDS_t) Inz

     D   OnErrorMessageType...
     D                               10I 0

     D   Ccsid                       10I 0

The contents of the Input parameter are converted from the job CCSID to this CCSID before being sent to standard out.