从IBM i(iSeries / AS400)读取以将值赋给变量

时间:2018-05-22 00:38:17

标签: excel vba ibm-midrange basic iseries-navigator

我是BASIC的新手,我正在尝试使用Visual Basic编写一个宏来完成我的工作。该宏将进入我们的iSeries数据库并查找我们产品的项目编号并为其分配新价格。我一直试图从AS400软件中读取数字。

过程就是这样,用户将输入项目编号及其新价格。然后宏进入数据库,我创建了循环,允许宏浏览数据库,查找看起来像这样的项目编号:

Sub UpdatePrice(ItemNum,Price)

'Here, I need to read the item number in AS400 and assign it to the variable, Int

If Int = ItemNum Then  

'Change the price

Else Int != ItemNum Then

'Go to the next line and read the ItemNum

End If  Int = [blank]

'End macro because ItemNum was not found in AS400

我不确定这是否可行,因为我们使用excel来创建我们粘贴到软件读取的文本文件中的代码。我们使用的唯一其他宏不会从软件中读取,只能非常快速地输入击键。

0 个答案:

没有答案