Included page: .FrontPage.QA.Archive.ServiceAutomation.NRA.2022.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 txt
ExpectedDir \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\IntegrationTests-OTT\BaselineFiles\Baseline\files\QA\YrSpecSuites\2022\BatchAutomation\NRA-new
ExpectedDirectory \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\IntegrationTests-OTT\BaselineFiles\Baseline\files\QA\YrSpecSuites\2022\BatchAutomation\NRA-new\DataFiles
ActualDir \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\AutomationQA\_QATeam\FitnesseTestArtifacts\files\Actuals\QA\YrSpecSuites\2022\BatchAutomation\NRA-new
ResultDir \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\AutomationQA\_QATeam\FitnesseTestArtifacts\files\Results\QA\YrSpecSuites\2022\BatchAutomation\NRA-new
DownloadPath \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\AutomationQA\_QATeam\FitnesseTestArtifacts\files\Actuals\QA\YrSpecSuites\2022\BatchAutomation\NRA-new\DataFiles
CompareResultDir \\EC2AMAZ-2GFJSTU.a648727226388.amazonaws.com\TZAPPS01SS-QA\AutomationQA\_QATeam\FitnesseTestArtifacts\files\Results\QA\YrSpecSuites\2022\BatchAutomation\NRA-new
ignoreNodes /Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRARecipInfo/Filing_Dt_Ovr;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRARecipInfo/Filing_Dt;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/Filing_Dt;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/Filing_Dt_Ovr;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/NRAUniqueFormID;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/NRAUniqueFormID_Fl;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/NRAUniqueFormID_Ovr;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/Compute_Dt_Ovr;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/Compute_Dt;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAWAInfo/Filing_Dt;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/NRAUniqueID;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/Error_Cd;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/Error_Cd_Ovr;/Envelope/Body/Get1042SFilingInfoResponse/Get1042SFilingInfoResult/diffgram/NewDataSet/NRAIncomeInfo/NRAUniqueID_Ovr;/Envelope/Body/ProcessRegister_UntypedResponse/ProcessRegister_UntypedResult/register/design/columns/column/columnid;/Envelope/Body/ProcessRegister_UntypedResponse/ProcessRegister_UntypedResult/register/design/functions/function/functionid;/Envelope/Body/ProcessRegister_UntypedResponse/ProcessRegister_UntypedResult/register/design/tables/table/tableid;/Envelope/Body/ProcessRegister_UntypedResponse/ProcessRegister_UntypedResult/register/design/tableproperties/tableproperty/tablepropertyid;/Envelope/Body/ProcessRegister_UntypedResponse/ProcessRegister_UntypedResult/register/design/orderbys//orderby/orderbyid;/Envelope/Body/ProcessRegister_UntypedResponse/ProcessRegister_UntypedResult/register/runtime/batchid;/Envelope/Body/ProcessRegister_UntypedResponse/ProcessRegister_UntypedResult/register/runtime/starttime

ddt:DynamicQuery Select convert(varchar(10),getdate(),101) As TodayDate
TodayDate?
$TodayDate=

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?
NRA1 $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 = '{{TaxYear}}' 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 >= '{{TaxYear}}0' and YrSeq <= '{{TaxYear}}9'and AcctNo = '{{PAN}}' and NRAFiling_Dt is not Null
PAN TaxYear Server DBName Product_Cd
$PAN1 2022 $Server1 $DBName1 $ProductCd1

UpdateNRAAgent

ddt: DynamicQuery UPDATE {{Server}}.{{DBName}}.dbo.NRAAgent SET Filing_Dt = null where AcctNo = '{{PAN}}' and Year = '{{TaxYear}}' and WAEIN = '{{WAEIN}}'
PAN TaxYear Server DBName WAEIN
$PAN1 2022 $Server1 $DBName1 32-8909876
$PAN1 2022 $Server1 $DBName1 10-1234567

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 >= '{{TaxYear}}0' and YrSeq <= '{{TaxYear}}9' AND TrustNo='{{TrustNo}}' and ACCTNO = '{{PAN}}' DELETE A FROM {{Server}}.{{DBName}}.dbo.NRARecip A JOIN {{Server}}.{{DBName}}.dbo.TrustXref B ON A.TrustKey = B.TrustKey where YrSeq >= '{{TaxYear}}0' and YrSeq <= '{{TaxYear}}9' and AcctNo = '{{PAN}}' and TrustNo='{{TrustNo}}'
PAN TaxYear Server DBName TrustNo
$PAN1 2022 $Server1 $DBName1 NRASINGLEBENE
$PAN1 2022 $Server1 $DBName1 NRAMULTIPLEBENE
$PAN1 2022 $Server1 $DBName1 NRAMULTIBENE2
$PAN1 2022 $Server1 $DBName1 NRAWSCASSET
$PAN1 2022 $Server1 $DBName1 BOABEN
$PAN1 2022 $Server1 $DBName1 BOABENE
$PAN1 2022 $Server1 $DBName1 BOAECI
$PAN1 2022 $Server1 $DBName1 BOAEXP
$PAN1 2022 $Server1 $DBName1 BOAFWQI
$PAN1 2022 $Server1 $DBName1 BOAQI
$PAN1 2022 $Server1 $DBName1 NRABOA
$PAN1 2022 $Server1 $DBName1 NRAINCOMECD
$PAN1 2022 $Server1 $DBName1 NRASUBID100
$PAN1 2022 $Server1 $DBName1 NRA2NDCORREC
$PAN1 2022 $Server1 $DBName1 NRA3RDCORREC