Included page: .FrontPage.QA.Archive.ServiceAutomation.NRARollUp.2020.SetUp (edit)

import
TBOT.Generic.Database

!*****> Setup
ddt: SetUp
key value
ConnectionString Server=10.153.120.216,1600;database=AUTOTESTING;User Id=automation; password=automation*100
BytesColumn DataObject
FileExtension zip
ExpectedDir \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\IntegrationTests-OTT\BaselineFiles\Baseline\files\QA\YrSpecSuites\2020\BatchAutomation\NRA-new
ExpectedDirectory \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\IntegrationTests-OTT\BaselineFiles\Baseline\files\QA\YrSpecSuites\2020\BatchAutomation\NRA-new\DataFiles
ActualDir \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\AutomationQA\_QATeam\FitnesseTestArtifacts\files\Actuals\QA\YrSpecSuites\2020\BatchAutomation\NRA-new
TargetDirectory \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\AutomationQA\_QATeam\FitnesseTestArtifacts\files\Actuals\QA\YrSpecSuites\2020\BatchAutomation\NRA-new\DataFiles
ResultDir \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\AutomationQA\_QATeam\FitnesseTestArtifacts\files\Results\QA\YrSpecSuites\2020\BatchAutomation\NRA-new
DownloadPath \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\AutomationQA\_QATeam\FitnesseTestArtifacts\files\Actuals\QA\YrSpecSuites\2020\BatchAutomation\NRA-new\DataFiles
CompareResultDir \FitnesseTestArtifacts\files\Results\QA\YrSpecSuites\2020\BatchAutomation\NRA-new
ignorePathValidations false
DeleteFile true
NewYearFlag false
skipIgnorePatterns true
|

import
TBOT.Generic.Database

import
TBOT.Generic

ddt: DynamicQuery Select AcctNo As PAN,LTRIM(RTRIM(Server)) As Server,LTRIM(RTRIM(DB_NAME)) As DBName from BTMDB..Package where AcctNo='{{PAN}}'
PAN PAN? Server? DBName?
312G $PAN1= $Server1= $DBName1=



ddt:DynamicQuery Select A.ValueText As ProductCd from BANKCONST..Translate A Join BANKCONST..Translate B On A.TranslateCode=B.TranslateCode and A.Seq=B.Seq and A.ValueID = 1 and B.ValueID=2 where A.Translatecode={{TransCode}} and B.ValueText='{{Value}}'
TransCode Value ProductCd?
3002 1042-S Filing Request $ProductCd1=

Delete Bankdata

ddt: DynamicQuery DELETE A FROM {{Server}}.{{DBName}}.dbo.BankData A WHERE Year = '2020' and AcctNo = '{{PAN}}' and Product_Cd = '{{Product_Cd}}' DELETE A FROM {{Server}}.{{DBName}}.dbo.TrustYr A Join {{Server}}.{{DBName}}.dbo.TrustXref B On A.TrustKey=B.TrustKey WHERE YrSeq >= '20200' and YrSeq <= '20209'and AcctNo = '{{PAN}}' and NRAFiling_Dt is not Null
PAN Server DBName Product_Cd
$PAN1 $Server1 $DBName1 $ProductCd1


Delete NRAExtract and Recip

ddt: DynamicQuery DELETE A FROM {{Server}}.{{DBName}}.dbo.NRAExtract A JOIN {{Server}}.{{DBName}}.dbo.TrustXref B ON A.TrustKey = B.TrustKey WHERE YrSeq >= '20200' and YrSeq <= '20209' AND ACCTNO = '{{PAN}}' DELETE B FROM {{Server}}.{{DBName}}.dbo.NRARecip B ,{{Server}}.{{DBName}}.dbo.TrustXref A where A.AcctNo='{{PAN}}' and A.TrustKey=B.TrustKey and B.YrSeq >= '20200'and B.YrSeq <= '20209' and B.Corrected_Fl >0 DELETE B FROM {{Server}}.{{DBName}}.dbo.NRARecip B ,{{Server}}.{{DBName}}.dbo.TrustXref A where A.AcctNo='{{PAN}}' and A.TrustKey=B.TrustKey and B.YrSeq >= '20200' and B.YrSeq <= '20209' and A.TrustNo not like '%QI%'
PAN Server DBName
$PAN1 $Server1 $DBName1