给定来自 JTOpen 的 DecimalDataArea,在读取和写入数据区域时,AS400 上的对象是否会被锁定,从而阻止 AS400 上的其他应用程序同时写入它?
这是来自 javadoc 关于如何读/写等的示例代码。
// Prepare to work with the system named "My400".
AS400 system = new AS400("My400");
// Create a DecimalDataArea object.
QSYSObjectPathName path = new QSYSObjectPathName("MYLIB", "MYDATA", "DTAARA");
DecimalDataArea dataArea = new DecimalDataArea(system, path.getPath());
// Create the decimal data area on the system using default values.
dataArea.create();
// Clear the data area.
dataArea.clear();
// Write to the data area.
dataArea.write(new BigDecimal("1.2"));
// Read from the data area.
BigDecimal data = dataArea.read();
// Delete the data area from the system.
dataArea.delete();
http://javadoc.midrange.com/jtopen/com/ibm/as400/access/DecimalDataArea.html