Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Positive Pay File Trailer Line - Count Function and Total Payment Amount

Question
81
Views
0
Comments

Summary

Positive Pay File Trailer Line - Count Function and Total Payment Amount

Content

I have messed around with different codes on this file for over a week now. Any help would be greatly appreciated.

I need to create 2 functions:

1. A function 10 characters long that will count the number of outbound payments in the Positive Pay file and left pad it with 0's.

2. A function 12 characters long that will total the Payments of all the detail lines in the 'D' Records of the Positive Pay Files and left pad with 0's.

Format Setup:

Hint: Define formatting options…

<TEMPLATE TYPE>

FIXED_POSITION_BASED

<OUTPUT CHARACTER SET>

iso-8859-1

<CASE CONVERSION>

UPPER

<NEW RECORD CHARACTER>

Carriage Return

<LEVEL>

PositivePayDataExtract

<NEW RECORD>

Positive_Pay_Rec2

1

1

Alpha

‘T’

2

3

Alpha

‘001’

5

10

Alpha

R, ‘0’

Substr(Rpad(OutboundPayment /BankAccount/BankAccountNumber,10,’0’),1,10)

Bank Account Number

15

7

Alpha

L, ‘ ’

Rpad(‘ ‘,7,’ ’)

22

10

Alpha

????

Total Detail Records

32

12

Number,

Decimal

????

Payment amount - Decimal

44

137

Alpha

Rpad(‘ ‘,137,’ ’)

Space Fill

<END LEVEL>

PositivePayDataExtract

I need the output to say  0000000013000008444574

OUTPUT:

H001102904802912122016TWD LEGAL ENTITY_103121                                                                                                                       
D0011029048029I121220160000001323000000000999                            WINDOWS R US                                                                               
D0011029048029I121320160000001324000000050000                            STAPLES CONTRACT AND COMMERCIAL, INC.                                                      
D0011029048029I122920160000001325000000050000                            ABC FIRE EXTINGUISHER, INC                                                                 
D0011029048029I010520170000001326000000540000                            ABC FIRE EXTINGUISHER, INC                                                                 
D0011029048029I010620170000001327000000750025                            ABC FIRE EXTINGUISHER, INC                                                                 
D0011029048029V010620170000001328000000520038                            STAPLES CONTRACT AND COMMERCIAL, INC.                                                      
D0011029048029I012620170000001329000000250056                            BARTLETT PRODUCTS, LLC                                                                     
D0011029048029I012620170000001330000000123456                            CARDINAL FG                                                                                
D0011029048029I012620170000001331000002100000                            KEYSTONE CERTIFICATIONS INC                                                                
D0011029048029I012620170000001332000001510000                            ABC FIRE EXTINGUISHER, INC                                                                 
D0011029048029I012620170000001333000002100000                            KEYSTONE CERTIFICATIONS INC                                                                
D0011029048029I012620170000001334000000450000                            ABC FIRE EXTINGUISHER, INC                                                                 
T00110290480290000000000000000000000  

The XML is Attached