# RXS_GetComposeBuffer() Retrieves the current composition engine buffer into a variable. The buffer is cleared upon successful retrieval. ## Subprocedure Prototype ### IBM i 7.1+ | Field | Description | |---|---| | ` D RXS_GetComposeBuffer... D PR Extproc('RXS_GetComposeBuffer') D Opdesc Like(RXS_Var16Mv_t) D Rtnparm` | Returns the current contents of the compose engine buffer. | ### IBM i 6.1 | Field | Description | |---|---| | ` D RXS_GetComposeBuffer... D PR Extproc('RXS_GetComposeBuffer') D Opdesc` | | | ` D Buffer Like(RXS_Var16Mv_t) Options(*Varsize)` | Holds the current contents of the compose engine buffer. | ## Example Code ### IBM i 7.1+ #### Example 1: Retrieve XML from Buffer ```rpgle *-------------------------------------------------------------- * This example code retrieves the composition engine buffer and * stores it in the field gXmlRequest. This process might be * used when calling a web service. *-------------------------------------------------------------- H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER) /copy QRPGLECPY,RXSCB D gXmlRequest S Like(RXS_Var64Kv_t) /free gXmlRequest = RXS_GetComposeBuffer(); *INLR = *ON; /end-free ``` ### IBM i 6.1 #### Example 1: Retrieve XML from Buffer ```rpgle *-------------------------------------------------------------- * This example code retrieves the composition engine buffer and * stores it in the field gXmlRequest. This process might be * used when calling a web service. *-------------------------------------------------------------- H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER) /define RXSV6R1 /copy QRPGLECPY,RXSCB D gXmlRequest S Like(RXS_Var64Kv_t) /free RXS_GetComposeBuffer( gXmlRequest ); *INLR = *ON; /end-free ```