Originally posted by: SystemAdmin
I'm receiving a flat file with a fixed file format. I need to convert it into an outbound x12 file.
The input file looks something like the following:
isa_1|gs_1|st_1|sub_1|dep_1
isa_1|gs_1|st_1|sub_1|dep_2
isa_1|gs_1|st_1|sub_2|dep_1
isa_1|gs_1|st_2|sub_1|dep_1
isa_1|gs_1|st_2|sub_2|dep_1
isa_1|gs_1|st_2|sub_2|dep_2
I need to ignore the redundant data in the flat file or I'll end-up with an ISA/GS/ST loop for every record. So the output should look something like below.....
isa_1
gs_1
st_1
sub_1
dep_1
dep_2
sub2
dep_1
st_2
sub_1
dep_1
sub_2
dep_1
dep_2
I'm trying to have my map use the
last function but having little luck... I'm running two f_maps.
rule 1:
make_f_map1(record:file, record
last:file)
rule 1 (make_f_map1):
if(isa:current != isa:last, make_isa_loop(isa:current))
Essentially, I'm not getting the last record processed. I'm getting the last record in the file.
The input is simple. All fields are fixed length text, all records end with CRLF and the input passes a validation map.
Any ideas on how to get this to work?
jvanboga
PS: Win2k & XP-Pro - tried both 6.7.1 & 8.0.
#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender#DataExchange