Xe_na_thanks
Active Member
Dear list,
Config: Xe ,SP15 , AS400, DB2/400.
Problem.
I want to simulate the following SQL statement using Table IO in a Named Event Rule;
UPDATE PYDTA/F5500100 SET SCUB02 = 100 WHERE SCMCU = ' 194'
and SCITM = 100321 and sctrdj <= 101200
I am reading F5500100 in a select, fetch next loop and then updating it (IN THE LOOP) with an update using handles.
e.g.
********************************************************************
F5500100(VA evt_idF5500100Handle_F55100).Select
F5500100(VA evt_idF5500100Handle_F55100).Fetch Next
//
While SV File_IO_Status is equal to CO SUCCESS
//
// Some processing
//
F5500100(VA evt_idF5500100Handle2_F5510).Update
VA evt_szCostCenter_MCU = TK Business Unit
VA evt_mnIdentifierShortItem_ITM = TK Item Number - Short
VA evt_jdStoredTransDate_TRDJ = TK Date - Order/Transaction
VA evt_Quantity_UB02 -> TK Quantity UB01
//
F5500100(VA evt_idF5500100Handle_F55100).Fetch Next
//
End While
*********************************************************************
But What I want is;
*********************************************************************
F5500100(VA evt_idF5500100Handle_F55100).Select
F5500100(VA evt_idF5500100Handle_F55100).Fetch Next
//
While SV File_IO_Status is equal to CO SUCCESS
//
// Some processing
//
F5500100(VA evt_idF5500100Handle2_F5510).Update
VA evt_szCostCenter_MCU = TK Business Unit
VA evt_mnIdentifierShortItem_ITM = TK Item Number - Short
VA evt_jdStoredTransDate_TRDJ =< TK Date - Order/Transaction
**
VA evt_Quantity_UB02 -> TK Quantity UB01
//
F5500100(VA evt_idF5500100Handle_F55100).Fetch Next
//
End While
*********************************************************************
As you can see I want to use a less than or equal to conditioner for the transaction date. I can't seem to achieve this using straight forward table IO as when I click on the operation field to change this to a less than or equal to sign nothing happens (it does if you are in select of course) I wondered if any of you clever people out there had any thoughts on this. I can think of one way to do it which would be to select within a select using handles but that would be incredibly slow!
Any help would be greatly appreciated.
Regards,
Adrian.
Config: Xe ,SP15 , AS400, DB2/400.
Problem.
I want to simulate the following SQL statement using Table IO in a Named Event Rule;
UPDATE PYDTA/F5500100 SET SCUB02 = 100 WHERE SCMCU = ' 194'
and SCITM = 100321 and sctrdj <= 101200
I am reading F5500100 in a select, fetch next loop and then updating it (IN THE LOOP) with an update using handles.
e.g.
********************************************************************
F5500100(VA evt_idF5500100Handle_F55100).Select
F5500100(VA evt_idF5500100Handle_F55100).Fetch Next
//
While SV File_IO_Status is equal to CO SUCCESS
//
// Some processing
//
F5500100(VA evt_idF5500100Handle2_F5510).Update
VA evt_szCostCenter_MCU = TK Business Unit
VA evt_mnIdentifierShortItem_ITM = TK Item Number - Short
VA evt_jdStoredTransDate_TRDJ = TK Date - Order/Transaction
VA evt_Quantity_UB02 -> TK Quantity UB01
//
F5500100(VA evt_idF5500100Handle_F55100).Fetch Next
//
End While
*********************************************************************
But What I want is;
*********************************************************************
F5500100(VA evt_idF5500100Handle_F55100).Select
F5500100(VA evt_idF5500100Handle_F55100).Fetch Next
//
While SV File_IO_Status is equal to CO SUCCESS
//
// Some processing
//
F5500100(VA evt_idF5500100Handle2_F5510).Update
VA evt_szCostCenter_MCU = TK Business Unit
VA evt_mnIdentifierShortItem_ITM = TK Item Number - Short
VA evt_jdStoredTransDate_TRDJ =< TK Date - Order/Transaction
**
VA evt_Quantity_UB02 -> TK Quantity UB01
//
F5500100(VA evt_idF5500100Handle_F55100).Fetch Next
//
End While
*********************************************************************
As you can see I want to use a less than or equal to conditioner for the transaction date. I can't seem to achieve this using straight forward table IO as when I click on the operation field to change this to a less than or equal to sign nothing happens (it does if you are in select of course) I wondered if any of you clever people out there had any thoughts on this. I can think of one way to do it which would be to select within a select using handles but that would be incredibly slow!
Any help would be greatly appreciated.
Regards,
Adrian.