|
View previous topic :: View next topic
|
| Author |
Message |
jerryte
Active User

Joined: 29 Oct 2010 Posts: 205 Location: Toronto, ON, Canada
|
|
|
|
The below statement fails with error "DUPLICATE PARSED FIELD DEFINITION" on the second "REPEAT=2":
| Code: |
OUTREC PARSE=(%=(ENDBEFR=TAB,REPEAT=4),
%01=(ENDBEFR=TAB,FIXLEN=15),
%=(ENDBEFR=TAB,REPEAT=2),
%02=(ENDBEFR=TAB,FIXLEN=20)),
BUILD=(%01,X,
%02,X) |
The below works using the same statment twice:
| Code: |
OUTREC PARSE=(%=(ENDBEFR=TAB,REPEAT=4),
%01=(ENDBEFR=TAB,FIXLEN=15),
%=(ENDBEFR=TAB),
%=(ENDBEFR=TAB),
%02=(ENDBEFR=TAB,FIXLEN=20)),
BUILD=(%01,X,
%02,X) |
The reference manual does not state a limit to how many times a REPEAT can be used. Any ideas why this fails? I want to skip some parsed fields to get to the ones that I want. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
| jerryte wrote: |
| I want to skip some parsed fields to get to the ones that I want. |
Use larger increments for your parsed fields as a workaround. Sample:
| Code: |
OPTION COPY
OUTREC PARSE=(%=(ENDBEFR=BLANKS,REPEAT=4),
%00=(ENDBEFR=BLANKS,FIXLEN=2),
%=(ENDBEFR=BLANKS,REPEAT=2),
%10=(ENDBEFR=BLANKS,FIXLEN=2),
%=(ENDBEFR=BLANKS,REPEAT=9),
%20=(ENDBEFR=BLANKS,FIXLEN=2)),
BUILD=(..)
END |
|
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|