获取示例1
设置StoredProcDataList = New AcObjectArray开始 将全局StoredProcDataList作为AcObjectArray全局 ………。
函数Fetch()作为AcDataRow 设置提取= Super :: Fetch()
Dim OutputRow As rootCAMain::drSPS
Dim dataObj As SPDataClass
Set OutputRow = fetch
Set dataObj = New SPDataClass
如果OutputRow什么都没有,则
退出功能
如果结束
showfactorystatus(“运行ID”&OutputRow.RUN_ID) CopyInstance(OutputRow,dataObj) StoredProcDataList.AddToTail(dataObj)
结束功能
获取示例2
函数Fetch()作为AcDataRow 设置提取= Super :: Fetch()
Dim TheRow As DR_Top_Ten_Pos
Dim a1Row As DR_Top_Ten_Pos
Dim Sec_Name As String
Dim Select_Param As String
set a1row = newdatarow()
counter = counter + 1
If Fetch Is Nothing Then
If counter = 1 Then
a1row.Dummy = "xyz"
set fetch = a1row
Else
Exit Function
End If
Else
If g_TopTen_Ctr <=10 Then
Set TheRow = Fetch
Build_XML_List(Sec_Name,g_Account_ID,g_Account_Name,g_Benchmark_ID,g_Benchmark_Name,
+ TheRow.Port_Name,“”,“”,“”,Cstr(Format(TheRow.Port_Value,“ 0.000”)), + IIf(IsNull(TheRow.Bench_Value),“ ---”,Cstr(Format(TheRow.Bench_Value,“ 0.000”))), + IIf(IsNull(TheRow.Bench_Value),“ ---”,Cstr(Format(TheRow.Difference,“ 0.000”))),“”,“”,“”,“”,“”,“”,“ “,”“,”“,”“,”“,”,Select_Param) g_TopTen_Ctr = g_TopTen_Ctr + 1 其他 设置获取=什么都没有 退出功能 万一 如果结束
结束功能
获取示例3
函数Fetch()作为AcDataRow '设置获取= Super :: Fetch() Dim IsuCredit_Events_FetchObj作为TopBotIssue_DataClass 昏暗的OutputRow作为DR_Issue_Credit_Events 昏暗的a23row作为DR_Issue_Credit_Events 昏暗的整数 计数器=计数器+ 1 设置OutputRow =新的DR_Issue_Credit_Events 设置a23row = newdatarow()
ICE_block:
If g_IssueList.GetCount() >= g_ICE_ctr Then
Set IsuCredit_Events_FetchObj = g_IssueList.GetAt(g_ICE_ctr)
If Trim(IsuCredit_Events_FetchObj.ACCOUNT) = Trim(g_Account_ID) Then
g_ICE_ctr = g_ICE_ctr + 1
OutputRow.ACCOUNT = IsuCredit_Events_FetchObj.ACCOUNT
OutputRow.AS_OF_DATE = IsuCredit_Events_FetchObj.AS_OF_DATE
OutputRow.SECTOR_NAME = IsuCredit_Events_FetchObj.SECTOR_NAME
OutputRow.COUNT = IsuCredit_Events_FetchObj.COUNT
OutputRow.EXPOSURE = IsuCredit_Events_FetchObj.EXPOSURE
OutputRow.EXPOSURE_PCT = IsuCredit_Events_FetchObj.EXPOSURE_PCT
OutputRow.CTR = IsuCredit_Events_FetchObj.CTR
Build_XML_List(Sec_Name,g_Account_ID,g_Account_Name,
+ g_Benchmark_ID,g_Benchmark_Name,OutputRow.SECTOR_NAME,“”,“”,“”,“”,“,”,“,”,“,”,“,”,“,”,“,”,“,OutputRow计数, + Format(OutputRow.EXPOSURE,“ 0.00”),Format(OutputRow.EXPOSURE_PCT,“ 0.000”),“”,“”,Format(OutputRow.CTR,“ 0.000”),Select_Param)
Set Fetch = OutputRow
g_Flag_ICE = 1
Else
g_ICE_ctr = g_ICE_ctr + 1
If g_Flag_ICE <> 1 Then
Goto ICE_block
End If
End If
Else
Set Fetch = Nothing
End If
If Fetch Is Nothing Then
If counter = 1 Then
a23row.Dummy = "xyz"
set fetch = a23row
Else
Exit Function
End If
End If
结束功能
获取示例4
全球
函数Get_CurrExposure()为布尔值
Dim l_DBStmt As AcDBStatement
Dim l_DB2Conn As AcDB2Connection
Dim l_AcDBCur As AcDBCursor
Dim l_SQL_str As String
Dim l_CurrExposureRow As CurrExposure_DataClass
Dim i As Integer
Dim k As Integer
Dim p As Integer
Dim q As Integer
l_SQL_str = Get_CurrExposure_SP()
Set l_DB2Conn = gConnection
Set l_DBStmt = New AcDBStatement(l_DB2Conn)
l_DBStmt.Prepare(l_SQL_str)
If l_DBStmt Is Nothing Then
Exit Function
End If
Set l_AcDBCur = l_DBStmt.OpenCursor()
l_AcDBCur.BindColumn(1, "CurrExposure_DataClass", "ACCOUNT")
l_AcDBCur.BindColumn(2, "CurrExposure_DataClass", "AS_OF_DATE")
l_AcDBCur.BindColumn(3, "CurrExposure_DataClass", "CURRENCY_CODE")
l_AcDBCur.BindColumn(4, "CurrExposure_DataClass", "CURRENCY_DESC")
l_AcDBCur.BindColumn(5, "CurrExposure_DataClass", "EXPOSURE")
Set l_CurrExposureRow = New CurrExposure_DataClass
Dim CurrExposureRowObj as CurrExposure_DataClass
Do While l_AcDBCur.Fetch(l_CurrExposureRow)
set CurrExposureRowObj = new CurrExposure_DataClass
CopyInstance(l_CurrExposureRow, CurrExposureRowObj)
g_CurrExposureList.AddToTail(CurrExposureRowObj)
Loop
l_AcDBCur.CloseCursor()
Set l_AcDBCur = Nothing
结束功能
函数Get_CurrExposure_SP()作为字符串 昏暗的stmtText作为字符串 昏暗的换行符作为字符串 换行符= Chr $(13)+ Chr $(10)
'StmtText =“ {CALL PRAMSPS1.SR_MAG_CURR_CONV(”
StmtText =“ {CALL PRAMSPS1.PR_MAG_CURR_EXP(”'-更改请求#0010,将于12/10发布
stmtText = stmtText & " '" & rootIMExpress::DB2Alias & "',"
stmtText = stmtText & " '" & Account_ID_01 & "',"
stmtText = stmtText & " '" & g_SQL_Date_Str & "',"
stmtText = stmtText & " '" & Data_Display_Top10CE & "',"
stmtText = stmtText & g_PooledFund & ","
stmtText = stmtText & " 0"
stmtText = stmtText & ")}"
Get_CurrExposure_SP = stmtText
ShowFactoryStatus("MAAG Currency Exposure SP Call:" & stmtText)
结束功能
报告部分-数据流
函数Start()为布尔值 开始= Super :: Start() Dim Curr_Exposure_FetchObj作为CurrExposure_DataClass Dim DummyRow作为CurrExposure_DataClass Dim DummyRow1作为CurrExposure_DataClass Dim DummyRow2作为CurrExposure_DataClass 昏暗的整数 g_Chrt_sizer = 0
For i = 1 to g_CurrExposureList.GetCount()
Set Curr_Exposure_FetchObj = g_CurrExposureList.GetAt(i)
If Curr_Exposure_FetchObj.Account = Trim(g_Account_ID) Then
g_SelectList(0).AddToTail(Curr_Exposure_FetchObj)
g_Chrt_sizer = g_Chrt_sizer + 1
End If
Next i
set DummyRow = new CurrExposure_DataClass
Select Case g_Chrt_sizer
Case 1
set DummyRow = new CurrExposure_DataClass
DummyRow.ACCOUNT = g_Account_ID
DummyRow.CURRENCY_CODE = "001"
DummyRow.CURRENCY_DESC = "001"
DummyRow.EXPOSURE = NULL
g_SelectList(0).AddToHead(DummyRow)
set DummyRow1 = new CurrExposure_DataClass
DummyRow1.ACCOUNT = g_Account_ID
DummyRow1.CURRENCY_CODE = "002"
DummyRow1.CURRENCY_DESC = "002"
DummyRow1.EXPOSURE = NULL
g_SelectList(0).AddToHead(DummyRow1)
set DummyRow2 = new CurrExposure_DataClass
DummyRow2.ACCOUNT = g_Account_ID
DummyRow2.CURRENCY_CODE = "003"
DummyRow2.CURRENCY_DESC = "003"
DummyRow2.EXPOSURE = NULL
g_SelectList(0).AddToHead(DummyRow2)
Case 2
set DummyRow = new CurrExposure_DataClass
DummyRow.ACCOUNT = g_Account_ID
DummyRow.CURRENCY_CODE = "001"
DummyRow.CURRENCY_DESC = "001"
DummyRow.EXPOSURE = NULL
g_SelectList(0).AddToHead(DummyRow)
set DummyRow1 = new CurrExposure_DataClass
DummyRow1.ACCOUNT = g_Account_ID
DummyRow1.CURRENCY_CODE = "002"
DummyRow1.CURRENCY_DESC = "002"
DummyRow1.EXPOSURE = NULL
g_SelectList(0).AddToHead(DummyRow1)
Case 3
set DummyRow = new CurrExposure_DataClass
DummyRow.ACCOUNT = g_Account_ID
DummyRow.CURRENCY_CODE = "001"
DummyRow.CURRENCY_DESC = "001"
DummyRow.EXPOSURE = NULL
g_SelectList(0).AddToHead(DummyRow)
End Select
Set Iter = g_SelectList(0).NewIterator()
结束功能
………..
函数Fetch()作为AcDataRow '设置获取= Super :: Fetch() Dim CurrExposure_FetchObj作为CurrExposure_DataClass 将输出行调暗为DR_Currency_Exposure 以DR_Currency_Exposure昏暗a26row
counter = counter + 1
Set OutputRow = New DR_Currency_Exposure
Set a26row = newdatarow()
If Iter.HasMore() Then
Set CurrExposure_FetchObj = Iter.GetNext
OutputRow.ACCOUNT = CurrExposure_FetchObj.ACCOUNT
OutputRow.AS_OF_DATE = CurrExposure_FetchObj.AS_OF_DATE
OutputRow.CURRENCY_CODE = CurrExposure_FetchObj.CURRENCY_CODE
OutputRow.CURRENCY_DESC = CurrExposure_FetchObj.CURRENCY_DESC
OutputRow.EXPOSURE = CurrExposure_FetchObj.EXPOSURE
如果Left $(OutputRow.CURRENCY_CODE,2)<>“ 00”然后 Build_XML_List(Sec_Name,g_Account_ID,g_Account_Name, + g_Benchmark_ID,g_Benchmark_Name,OutputRow.CURRENCY_DESC,“”,“”,“”, +格式(OutputRow.EXPOSURE,“ 0.000”),“”,“”,“”,“”,“,”,“,”,“,”,“,”,“,”,“”,“” ,“”,Select_Param) 如果结束
Set Fetch = OutputRow
Else
Set Fetch = Nothing
End If
If Fetch Is Nothing Then
If counter = 1 Then
a26row.Dummy = "xyz"
set fetch = a26row
Else
Exit Function
End If
End If
结束功能
………………。
子完成() 'Super :: Finish() g_SelectList(0).RemoveAll() 结束