Data buffers

When you use VuGen to create a Windows Sockets Vuser script, VuGen creates the data file. This file contains the data that is transmitted, and is expected to be received, during the replay sessions. You can right-click any step in the Editor and then select Show Arguments to show the buffer content that is stored in for the selected step. Using the Text View tab of the dialog box that opens, you can edit the data that is stored for any data buffer.

The data file has the following format:

  • File header

  • A list of buffers and their contents

The file header includes an internal version number of the data file format. The current version is 2. If you try to access data from a data file with format version 1, VuGen issues an error.

;WSRData 2 1

An identifier precedes each record, indicating whether the data was received or sent, followed by the buffer descriptor, and the number of bytes received (for lrs_receive only). The buffer descriptor contains a number identifying the buffer.

For example,

recv buf5   25

indicates that the buffer contains data that was received. The record number is 5, indicating that this receive operation was the sixth data transfer (the index is zero based), and twenty-five bytes of data were received.

If your data is in ASCII format, the descriptor is followed by the actual ASCII data that was transferred by the sockets.

If your data is in EBCDIC format, it must be translated through a look-up table. For information on setting the translation table, see WinSock recording options. The EBCDIC whose ASCII value (after translation) is printable, is displayed as an ASCII character. If the ASCII value corresponds to a non-printable character, then VuGen displays the original EBCDIC value.

recv buf6 39
    "SunOS UNIX (sunny)\r\n"

The following segment shows the header, descriptors, and data in a typical data file:

;WSRData 2 1
send buf0 48
recv buf1 15
send buf2 24

Back to top