|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Validting File Input for Batch operation |
« View previous topic :: View next topic » |
Author |
Message
|
whydieanut |
Posted: Mon Dec 26, 2011 11:16 pm Post subject: Validting File Input for Batch operation |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
I have a file with multiple rows of data in it.
Multiple such rows belong to a single record, based on the value of a particular field. (In this example, the value of the 1st field)
Eg:
rows 1,2 are record 1
rows 3,4,5,6 are record 2
rows 7,8,9 are record 3
Code: |
1234,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1234,predefined forex rate,,01,100005,,1000,1000
1234,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1234,predefined forex rate,,50,3700000000,,1000
1235,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1235,predefined forex rate,,50,3700000000,,1000
1235,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1235,predefined forex rate,,50,3700000000,,1000
1235,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1235,predefined forex rate,,50,3700000000,,1000
1235,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1235,predefined forex rate,,50,3700000000,,1000
1236,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1236,predefined forex rate,,50,3700000000,,1000
1236,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1236,predefined forex rate,,50,3700000000,,1000
1236,17.11.2011,DR,1000,17.11.2011,USD,,RAMCO1236,predefined forex rate,,50,3700000000,,1000
|
I need to read this file and send it to SAP through and IDOC using the SAP Adapter. Each row of data will become a segment in the Data Record of the IDOC. So each file will produce a single message (and hence a single IDOC).
Now coming to the validations:
The number of rows of data for a single record are not fixed.
Each record needs to be sent in it's entirety.
If a particular row of data doesn't validate, then the whole record for that row of data needs to be put into an error file, and then continue with the rest of the rows in the file.
After processing the whole file, all the rows for records that validated need to be sent to SAP as an IDOC.
All rows for records that failed need to be put into an error file.
In the above sample message, there are 3 logical records.
If all rows validate, then the entire content is to be sent to SAP as a single IDOC.
If, say, row 5 fails, then rows 3,4,5,6 need to be put into the error file and the rest of the rows be sent as output - rows 1,2,7,8,9
Is this good design, or is there a better way of handling it?
I am looking at the follwoing 2 options:
1. Reject whole file if single row fails.
2. Split input file into seperate message based on records and send as mutiple IDOCs (3 in this case). I felt this is still better than sending incomplete batches.
Any inputs? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Dec 27, 2011 6:36 am Post subject: Re: Validting File Input for Batch operation |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
whydieanut wrote: |
I am looking at the follwoing 2 options:
1. Reject whole file if single row fails.
2. Split input file into seperate message based on records and send as mutiple IDOCs (3 in this case). I felt this is still better than sending incomplete batches.
Any inputs? |
I vote for option 2. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
whydieanut |
Posted: Sun Jan 01, 2012 9:58 pm Post subject: |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
Thanks for the input...
Turns out, the sending application is more comfortable with option 1...
But we aren't going to be sending incomplete batches anyways...
So it's either all records or none...
Need to revisit some parameters like volume of data and other business requirements, and then decide if option 2 is better... |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|