Oh my - I'm not sure with all that swapping that you'll come out much ahead.
You're missing the "point" of remove. If your array is well built your code simply becomes: LOOP REMOVE CUST.NUM FROM IN.TAB SETTING MARK REMOVE CUST.DESC FROM IN.TAB SETTING MARK (do your thing) WHILE MARK DO REPEAT If you do have to worry about having more attributes or sub-values in the array then you need to test the "MARK" variable after each remove and keep removing until the line is exhausted. Here is how "MARK" (delimiter) is set: Delimiter Code Description ASCII Value* 0 array end 1 record mark 255 2 attribute mark 254 3 value mark 253 4 subvalue mark 252 5 text mark 251 6 not used; nonprinting 250 7 not used; nonprinting 249 Someone else sent an example of how to keep checking "MARK" so I won't bother. You could even throw it in a subroutine to keep your processing "clean." Hth Colin Alfke Calgary, Canada > -----Original Message----- > From: Dave Laansma > > That is what I was afraid of. Okay. So after listening to all of your > comments (thus far since there is an annoying delay in these messages), > here is what I like the best: > > SWAP CHAR(9) WITH "" IN IN.TAB > SWAP CHAR(10) WITH "" IN IN.TAB > > SWAP @VM WITH CHAR(9) IN IN.TAB > SWAP @SM WITH CHAR(10) IN IN.TAB > > REPEAT > REMOVE IN.LINE FROM IN.TAB SETTING MARK > SWAP CHAR(9) WITH @VM IN IN.LINE > SWAP CHAR(10) WITH @SM IN IN.LINE > (do my thing with IN.LINE) > UNTIL MARK DO > REPEAT > > Any objections, concerns or better suggestions for using CHAR(10) as > the > temporary substitute for the @SM? I just picked it because it came > right after CHAR(9) on my handy-dandy ASCII chart! Been using it since > the 70's. Some things just never go out of style! > > David Laansma > > -----Original Message----- > From: David Wolverton > > If you don't want to 'swap' all the other markers with 'strings' (SWAP > @VM > WITH "<<VM>>" IN RECORD) then you have to 'build' the line item up -- > keep > removing until you see the remove hit the @AM and then process the > line... > > DW ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
