Getting Started
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
GETTING STARTED WITH ARENA<br />
ReadWrite module<br />
DESCRIPTION<br />
The ReadWrite module is used to read data from an input file or the keyboard and<br />
assign the data values to a list of variables or attributes (or other expression). This<br />
module is also used to write data to an output device, such as the screen or a file.<br />
When reading from or writing to a file, the ReadWrite logic varies according to the<br />
Type of read or write action performed and according to the Access Type of the Arena<br />
File Name (the Access Type of a file is specified in the File module).<br />
Sequential File or LOTUS Spreadsheet Access Types. When an entity arrives at<br />
the ReadWrite module, the specified file is examined to see if it is open (active). If<br />
not, the file is automatically opened. The values of the attributes, variables, or<br />
expressions (other) listed are read or written according to the format specified.<br />
If you plan to import Lotus (.wks) files into Excel, see the online help for guidelines.<br />
Microsoft Excel, Microsoft Access, and ActiveX Data Objects Access Types.<br />
When an entity arrives at the ReadWrite module, the specified file is examined to see<br />
if an ADO connection to the file is open (active). If the file is currently closed, then<br />
an ADO connection is automatically opened to the data source using either the<br />
Microsoft Jet OLE DB Provider (if the Access Type is Microsoft Excel, Microsoft<br />
Excel 2007, Microsoft Access, or Microsoft Access 2007) or the specified connection<br />
string (if the Access Type is ActiveX Data Objects).<br />
The Recordset ID is then examined to see if that recordset in the file is open. A<br />
recordset refers to a table of data in the data store that is organized in columns (fields)<br />
and rows (records).<br />
If the recordset is currently closed, then it is automatically opened using the recordset<br />
definition specified in the File module (for example, the specified named range or<br />
table name). The recordset then remains open until the file is closed.<br />
The values of the attributes, variables, or expressions (other) listed in the<br />
Assignments repeat group are then read from or written to the specified Record<br />
Number (that is, row) in the recordset. The first entry in Assignments is read from or<br />
written to the first field in the record, the second entry corresponds to the second<br />
field, and so on.<br />
Extensible Markup Language Access Type. When an entity arrives at the<br />
ReadWrite module, the specified file is examined to see if it is open (active). If not,<br />
the file is automatically opened into a single ADO recordset.<br />
58