I can't figure out what you want to do. It's not clear what your records look like. You mention various positions such as 20, 23-42, 910, 3490-3495, 22:20, 1:20, 3490:6 and 22:6. All of that different notation makes it difficult to understand what positions you're talking about. Also, since the input file is VB, the first data byte starts at position 5, not position 1 and I don't think you've taken that into account when giving the starting positions.
Please indicate clearly and in straightforward notation the starting position, length and format of each relevant field taking the RDW in positions 1-4 into account. Explain the "rules" for getting from input to output.
What do you mean by the "latest CUST-NUM"? Do you mean the highest NUM value for duplicate CUST-NUM values?
Do all of your records contain the NUM value or can you have "short" records that end before the NUM value? If so, what do you want to do about those "short" records? Do you want to remove them or use blanks for the NUM value or what?
CUST-NUM PIC X(20) --> Postion - (23-42)
Update-Date PIC 9(06) --> Postion - (3490-3495)
1) Rule 1: for O/P 1
select the reccord with the Latest date and eliminate the other records for each CUST-NUM
2) Rule 1: for O/P 2
Move O/P1(27:20) to O/P2(1:20)
Move O/P1((3495:6) to O/P2(21:6)
similarly other fields.