RXS_ResetDS()

This subprocedure initializes a data structure with default values. Always intialize a data structure before use and always use this API instead of the RESET opcode.

A full list of DS-type constants is available in the RXSCB copybook.

Subprocedure Prototype

CopyrpgleD RXS_ResetDS...
D                 PR                  Extproc('RXS_ResetDS') Opdesc
 
CopyrpgleD  DS                                 Like(RXS_Var512K_t)
D                                     Options(*Varsize)

Holds the data structure to be initialized with default values.

CopyrpgleD  TypeOfDS                      5I 0 Const

The type of data structure to be initialized with default values.

Example Code

Copyrpgle*--------------------------------------------------------------
* This example code initializes most of the current RXS3 data 
* structure types using RXS_ResetDS().
*--------------------------------------------------------------
* Data structures for web service APIs
* Consuming a web service
D gTransmitDS     DS                  LikeDS(RXS_TransmitDS_t)
* Offering a web service
D gGetStdInDS     DS                  LikeDS(RXS_GetStdInDS_t)
D gPutStdOutDS    DS                  LikeDS(RXS_PutStdOutDS_t)

* Data structures for XML APIs
D gComposeDS      DS                  LikeDS(RXS_ComposeDS_t)
D gParseDS        DS                  LikeDS(RXS_ParseDS_t)
D gXsdValidationDS...
D                 DS                  LikeDS(RXS_XsdValidationDS_t)
* XML DOM parser
D gOpenDomDS      DS                  LikeDS(RXS_OpenDomDS_t)
D gParseDomDS     DS                  LikeDS(RXS_ParseDomDS_t)

* Data structures for JSON APIs
D gComposeJsonDS  DS                  LikeDS(RXS_ComposeJsonDS_t)
D gParseJsonDS    DS                  LikeDS(RXS_ParseJsonDS_t)

* RXS_Convert data structures
D gConvertBase64DS...
D                 DS                  LikeDS(RXS_ConvertBase64DS_t)
D gConvertCaseDS  DS                  LikeDS(RXS_ConvertCaseDS_t)
D gConvertCcsidDS...
D                 DS                  LikeDS(RXS_ConvertCcsidDS_t)
D gConvertUrlPercentDS...
D                 DS                  LikeDS(RXS_ConvertUrlPercentDS_t)
D gConvertUserDefinedDS...
D                 DS                  LikeDS(RXS_ConvertUserDefinedDS_t)
D gConvertXmlEntitiesDS...
D                 DS                  LikeDS(RXS_ConvertXmlEntitiesDS_t)

* RXS_Crypt data structures
D gAesCryptDS     DS                  LikeDS(RXS_AesCryptDS_t)
D gMd5CryptDS     DS                  LikeDS(RXS_Md5CryptDS_t)
D gShaCryptDS     DS                  LikeDS(RXS_ShaCryptDS_t)

* Data structures for STMF APIs
D gCopyStmfDS     DS                  LikeDS(RXS_CopyStmfDS_t)
D gCreateStmfDS   DS                  LikeDS(RXS_CreateStmfDS_t)
D gDeleteStmfDS   DS                  LikeDS(RXS_DeleteStmfDS_t)
D gGetStmfDS      DS                  LikeDS(RXS_GetStmfDS_t)
D gPutStmfDS      DS                  LikeDS(RXS_PutStmfDS_t)
D gMoveStmfDS     DS                  LikeDS(RXS_MoveStmfDS_t)

* Error handling APIs
D gCatchThrowErrorDS...
D                 DS                  LikeDS(RXS_CatchThrowErrorDS_t)

 /free
 
  // Data structures for web service APIs
  //  Consuming a web service
  RXS_ResetDS( gTransmitDS : RXS_DS_TYPE_TRANSMIT );
  //  Offering a web service
  RXS_ResetDS( gGetStdInDS : RXS_DS_TYPE_GETSTDIN );
  RXS_ResetDS( gPutStdOutDS : RXS_DS_TYPE_PUTSTDOUT );
  
  // Data structures for XML APIs
  RXS_ResetDS( gComposeDS : RXS_DS_TYPE_COMPOSE );
  RXS_ResetDS( gParseDS : RXS_DS_TYPE_PARSE );
  RXS_ResetDS( gXsdValidationDS : RXS_DS_TYPE_XSDVALIDATION );
  //  XML DOM parser
  RXS_ResetDS( gOpenDomDS : RXS_DS_TYPE_OPENDOM );
  RXS_ResetDS( gParseDomDS : RXS_DS_TYPE_PARSEDOM );
  
  // Data structures for JSON APIs
  RXS_ResetDS( gComposeJsonDS : RXS_DS_TYPE_COMPOSEJSON );
  RXS_ResetDS( gParseJsonDS : RXS_DS_TYPE_PARSEJSON );

  // RXS_Convert data structures
  RXS_ResetDS( gConvertBase64DS : RXS_DS_TYPE_CONVERTBASE64 );
  RXS_ResetDS( gConvertCaseDS : RXS_DS_TYPE_CONVERTCASE );
  RXS_ResetDS( gConvertCcsidDS : RXS_DS_TYPE_CONVERTCCSID );
  RXS_ResetDS( gConvertUrlPercentDS : RXS_DS_TYPE_CONVERTURLPERCENT );
  RXS_ResetDS( gConvertUserDefinedDS : RXS_DS_TYPE_CONVERTUSERDEFINED );
  RXS_ResetDS( gConvertXmlEntitiesDS : RXS_DS_TYPE_CONVERTXMLENTITIES );
  
  // RXS_Crypt data structures
  RXS_ResetDS( gAesCryptDS : RXS_DS_TYPE_AESCRYPT );
  RXS_ResetDS( gMd5CryptDS : RXS_DS_TYPE_MD5CRYPT );
  RXS_ResetDS( gShaCryptDS : RXS_DS_TYPE_SHACRYPT );
  
  // Data structures for STMF APIs
  RXS_ResetDS( gCopyStmfDS : RXS_DS_TYPE_COPYSTMF );
  RXS_ResetDS( gCreateStmfDS : RXS_DS_TYPE_CREATESTMF );
  RXS_ResetDS( gDeleteStmfDS : RXS_DS_TYPE_DELETESTMF );
  RXS_ResetDS( gGetStmfDS : RXS_DS_TYPE_GETSTMF );
  RXS_ResetDS( gPutStmfDS : RXS_DS_TYPE_PUTSTMF );
  RXS_ResetDS( gMoveStmfDS : RXS_DS_TYPE_MOVESTMF );

  // Error handling APIs
  RXS_ResetDS( gCatchThrowErrorDS : RXS_DS_TYPE_CATCHTHROWERROR );
  
 /end-free