Reply To: Delete repeating segment in xlate

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Delete repeating segment in xlate Reply To: Delete repeating segment in xlate

#57802
Jonathan Hamilton
Participant

I think your problem is you are trying to modify the input record layout when really you just want to control what is going into the output record layout.  You can’t modify the input record layout in Xlate.

One option is simply to not map the DG1 to the destination record layout.  If you are using bulkcopy you would need to replace it with several pathcopies for each segment you want included.  Then in your if statement if true do nothing else pathcopy the DG1 that you want.

If (1(0).0(0).DG1(%s1).00380.[0].[0] eq =PROVISIONAL

          COMMENT {DO NOTHING!”}

ElseBody

          Copy (1(0).0(0).DG1(%s1).00380.[0] -> @null)

Another option would be to use pathcopy @null in place of your copy.  I have had problems in the past that the segment header would remain after removing the remainder of the segment.

Pathcopy (@null -> 1(0).0(0).DG1(%s1))

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10