RXS_GetStdIn()

This subprocedure is used to read data sent to you via HTTP POST into a field up to 16MB, or into an IFS STMF file.

This is typically used when you are offering a web service.

Subprocedure Prototype

CopyrpgleD RXS_GetStdIn...
D                 PR                  Extproc('RXS_GetStdIn') Opdesc
D                                     Like(RXS_Var16Mv_t)
D                                     Rtnparm

Returns the data retrieved from STDIN unless a STMF was specified in a RXS_GetStdInDS_t data structure passed in the DS parameter.

CopyrpgleD   DS                                Likeds(RXS_GetStdInDS_t)
D                                     Options(*Varsize:*Nopass)

Optional RXS_GetStdInDS_t data structure used to convert received data to a specified CCSID.

CopyrpgleD RXS_GetStdIn...
D                 PR                  Extproc('RXS_GetStdIn') Opdesc
 
CopyrpgleD   Output                            Like(RXS_Var16Mv_t)
D                                     Options(*Varsize)

Holds the data retrieved from STDIN.

CopyrpgleD   DS                                Likeds(RXS_GetStdInDS_t)
D                                     Options(*Varsize:*Nopass)

Optional RXS_GetStdInDS_t data structure used to convert received data to a specified CCSID.

Example Code

Copyrpgle*--------------------------------------------------------------
* This example code retrieves data from standard in and stores it
*  in the field gXmlRequest. 
* This process might be used when offering a web service.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

 /copy QRPGLECPY,RXSCB

D gXmlRequest     S                   Like(RXS_Var64Kv_t)
 /free
  gXmlRequest = RXS_GetStdIn();

  *INLR = *ON;
 /end-free
Copyrpgle*--------------------------------------------------------------
* This example code retrieves data from STDIN and write it 
*  to the specified IFS file.
* This process might be used when offering a web service.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

 /define RXSV6R1
 /copy QRPGLECPY,RXSCB

D GetStdInDS      DS                  LikeDS(RXS_GetStdInDS_t)
 /free
  RXS_ResetDS( GetStdInDS : RXS_DS_TYPE_GETSTDIN ); 
  GetStdInDS.Stmf = '/tmp/over16mb.xml';
  RXS_GetStdIn(GetStdInDS);

  *INLR = *ON;
 /end-free
Copyrpgle*--------------------------------------------------------------
* This example code retrieves data from standard in and stores it
*  in the field gXmlRequest. 
* This process might be used when offering a web service.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

 /copy QRPGLECPY,RXSCB

D gXmlRequest     S                   Like(RXS_Var64Kv_t)
 /free
  RXS_GetStdIn( gXmlRequest );

  *INLR = *ON;
 /end-free
Copyrpgle*--------------------------------------------------------------
* This example code retrieves data from STDIN and write it 
*  to the specified IFS file.
* This process might be used when offering a web service.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

 /define RXSV6R1
 /copy QRPGLECPY,RXSCB

D GetStdInDS      DS                  LikeDS(RXS_GetStdInDS_t)
 /free
  RXS_ResetDS( GetStdInDS : RXS_DS_TYPE_GETSTDIN ); 
  GetStdInDS.Stmf = '/tmp/over16mb.xml';
  RXS_GetStdIn(GetStdInDS);

  *INLR = *ON;
 /end-free

Data Structures

CopyrpgleD RXS_GetStdInDS_t...
D                 DS                  Qualified Template Inz
 
CopyrpgleD   ReturnedErrorInfo...
D                                     LikeDS(RXS_ReturnedErrorInfoDS_t) Inz
 
CopyrpgleD   DataStructureType...
D                                5I 0 Inz(RXS_DS_TYPE_GETSTDIN)
 
CopyrpgleD   OnErrorMessageType...
D                                5I 0
 
CopyrpgleD   Ccsid                       10I 0

Specifies the CCSID to convert the inbound data into.

CopyrpgleD   Stmf                              Like(RXS_Var1Kv_t)

Specifies the STMF to load with the contents of STDIN.