Originally posted by: SystemAdmin
Hello! Have a vaildation map that needs to have a cross check between the 1 header record and all the detail records on two date fields.
The map works up until the first error condition is met, the error being validated is that the Effective End Date on a detail record must be less than the End Date on the Header record, this works fine for the first invalid condition.
However, the restart is not working correctly, the Reject function which is used to send the invalid record to a reject report file works but the error record is split accross two lines, then the map does not restart from that point.
Would like to attach a zip file which contains the map, two trees and a sample data file but cannot find any link in the forum to add an attachment here.
Following is a more detailed description of what is going on, yes this is hard to understand without viewing the actual map source but maybe someone can look at the files off site unless there is some way to add an attachment here.
The UFLDemoFile group has 1 header record, many detail records and 1 trailer record defined in it, the component rule for this specific check is at the file level. Have other component rules in the tree for field level validation which work fine.
Have expanded the component rule for Demo Group in the UFLDemoFile Copybook to now read as, LEFT($,1) = "D" & WHEN (PRESENT(UFL_HEADER_RECORD Record), Rej_HDR_END_DATE Field:UFL_HEADER_RECORD Record
> Rej_CL_CLT_Empl_Stat_Eff_Dte Field:UFL_DEMO_DETAIL Record:$)
The change was to add the & and the WHEN condition.
This works but it does not Restart correctly, the reject output file produced from Output card 3 prints out the detail record which had its Empl Stat Dte greater than the Hdr End Date but it is written across two lines, the trace indicates attempting to restart and shows 9999 bytes of unknown data at the end of the file.
Have had this before and put Restarts at various group levels but this is a little different since the rule is at the File level. Tried putting a restart on Empl Stat Eff Dte but that did not work. Not sure where to put it in the tree.
Had to put Restarts at all record levels, had to put them on the Header and Trailer because if they falied a validation check, then it would not continue reading more records on the file. Have validation checks for the Header and Trailer in place and the Restart is needed to keep it moving forward.
Have updated the zip file with the tree changes and the 5th record on the test input file has 20040927 in position 313 which is greater than the Hdr End Date, however, once it hits this error the rest is unknown data at the end of the file.
Not sure what to do at this point. Hopefully someone may have some time to look at this and request the zip file to view the actual map.
Would appreciate any help that someone can offer here.
Thanks!
#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender#DataExchange