RTVDS (‘Filename’ : Data record)
Filename = Constant or alphanumeric field (10A)
Data record = the corresponding data structure with data


Return type:
Datarecord

Description:
rtvDS returns a data record. The individual fields are retrieved from the file description of the filename in parameter 1. The decoding, from XML, of the individual fields is taken from the administration setup. The data inserted into the record description. Any field that is not represented in the XML, is given the value from the corresponding field value from the data record in parameter 2.

The first time the command is used, the administration setup is automatically created. If a field is located in SSAPD012P the field is automatically activated. If the field is located in SSAPD014P it is also activated. Date and time fields are normally created as nummerinc and require a change of the setup file. (found in the administrator menu)

Example:
Customer_rec = rtvDS(‘Customerfile’ : empty_customer_rec)

Uses the File description of the customerfile (Even though you program uses a logical file, use the name of the physical file here) Then the command places the data from the XML into the correct fields in the customer_record. Using the “field definitions” in the administrator menu.

See program CSMAIM62R for more detail.

Notes and Restrictions:
The variable name is converted to upper case.
Remember that the layout of the second variable, MUST match the filename in variable 1.