|
View previous topic :: View next topic
|
| Author |
Message |
migusd
New User
Joined: 08 Aug 2014 Posts: 44 Location: USA
|
|
|
|
hello guys,
I am having troubles to understand INREC PARSING using Dictionary fields created.
I have a fixed length file with the first part of the records are fixed.
The last part of the records contain variable length fields.
But I decided to use dictionary.
and because of this I am running into issues.
I believe the issue is INREC PARSE I am using, but I don't understand why.
can someone tell me what am I missing?
here is the example
| Code: |
SYSIN :
INREC PARSE=(TIMR=(ABSPOS=1,FIXLEN=7),
LOQD=(ADDPOS=01,FIXLEN=7),
REQI=(ADDPOS=01,FIXLEN=6),
TDLI=(ADDPOS=01,ENDBEFR=PIP),
PRLI=(ADDPOS=01,ENDBEFR=BLK)),
BUILD=(1:PRLA,5:LIQD,12:TMAR,19:TDLP,22:REQU)
SORT FIELDS=(PRLA,A,LIQD,A,TMAR,A)
OMIT COND=(TDLP,EQ,C'OPN')
DATA DICTIONARY SYMBOLS SUBSTITUTED :
INREC PARSE=(1,7,ZD=(ABSPOS=1,FIXLEN=7),9,7,CH=(ADDPOS=01,FIXLEN=7),17,6,CH=(ADD
*
POS=01,FIXLEN=6),%00=(ADDPOS=01,ENDBEFR=C'|'),%01=(ADDPOS=01,ENDBEFR=C' ')),BUIL
D=(1:1,4,5:5,7,12:12,7,19:19,3,22:22,6)
SORT FIELDS=(1,4,CH,A,5,7,CH,A,12,7,ZD,A)
OMIT COND=(19,3,CH,EQ,C'OPN')
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER268A INREC STATEMENT : SYNTAX ERROR |
here are the dictionary items I am using
| Code: |
*-----------------------PARM USED IN BOTH-----------------------------*
*----------------TRLXSXXX JS0010 TMR USER REQUEST --------------------*
*----------------TRLXSXXX JS0020 VER STAT REQUEST --------------------*
*---------------------------------------------------------------------*
PRLA,001,04,CH 001 - 004
LIQD,005,07,CH 005 - 011
TMAR,012,07,ZD 012 - 018
TDLP,019,03,CH 019 - 021
REQU,022,06,CH 022 - 027
|
and
| Code: |
TIMR,1,7,ZD
LOQD,9,7,CH
REQI,17,6,CH
TDLI,%00
PRLI,%01
PIP,'|'
BLK,' '
|
thanks in advance |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| Code: |
TIMR,1,7,ZD
LOQD,9,7,CH
REQI,17,6,CH |
I think your problem lies here. You might want to define these PARSE fields as %n OR %nn to fix your syntax error (similar to what you have already done for TDLI and PRLI).
Refer the Syncsort/MFX manual or the PARSE examples in this forum to get familiar with the PARSE syntax.
| Quote: |
DATA DICTIONARY SYMBOLS SUBSTITUTED :
INREC PARSE=(1,7,ZD=(ABSPOS=1,FIXLEN=7) |
The asterisk shows exactly where your problem is. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
The syntax of your PARSE parameter (after substitution of dictionary values) is wrong/incorrect/not allowed.
PARSE= is not allowed without first character as '%'. Period.
What is not clear in this sample, or SYNCSORT error message?
Everything is clearly explained. RTFM. |
|
| Back to top |
|
 |
migusd
New User
Joined: 08 Aug 2014 Posts: 44 Location: USA
|
|
|
|
Hi Arun,
I did that as a test before, but the failing field is moving.
let me tell you that the %03 field is missing most times. So we have two field separators '|' together indicating a missing field. Is that something to be of a concern?
here he the new test...
| Code: |
SYSIN :
INREC PARSE=(TIMR=(ABSPOS=1,FIXLEN=7),
LOQD=(ADDPOS=01,FIXLEN=7),
REQI=(ADDPOS=01,FIXLEN=6),
TDLI=(ADDPOS=01,ENDBEFR=PIP),
PRLI=(ADDPOS=01,ENDBEFR=BLK)),
BUILD=(1:PRLA,5:LIQD,12:TMAR,19:TDLP,22:REQU)
SORT FIELDS=(PRLA,A,LIQD,A,TMAR,A)
OMIT COND=(TDLP,EQ,C'OPN')
DATA DICTIONARY SYMBOLS SUBSTITUTED :
INREC PARSE=(%00=(ABSPOS=1,FIXLEN=7),%01=(ADDPOS=01,FIXLEN=7),%02=(ADDPOS=01,FIX
LEN=6),%03=(ADDPOS=01,ENDBEFR=C'|'),%04=(ADDPOS=01,ENDBEFR=C' ')),BUILD=(1:1,4,5
*
:5,7,12:12,7,19:19,3,22:22,6)
SORT FIELDS=(1,4,CH,A,5,7,CH,A,12,7,ZD,A)
OMIT COND=(19,3,CH,EQ,C'OPN')
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER268A INREC STATEMENT : SYNTAX ERROR
|
| Code: |
TIMR,%00
LOQD,%01
REQI,%02
TDLI,%03
PRLI,%04
PIP,'|'
BLK,' '
|
|
|
| Back to top |
|
 |
migusd
New User
Joined: 08 Aug 2014 Posts: 44 Location: USA
|
|
|
|
Thanks for your explanation, Sergey.
Sometimes people with obtuse minds like me, fail to understand manuals... or missing the point. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| migusd wrote: |
Hi Arun,
I did that as a test before, but the failing field is moving.
let me tell you that the %03 field is missing most times. So we have two field separators '|' together indicating a missing field. Is that something to be of a concern?
here he the new test...
|
FIXLEN= subparameter is mandatory for PARSE... (except dummy case %=...)
If you want to get varying size value, in the following statements/parameters you can use subparameter SQZ=, or JFY=, or other ways of "truncation".
RTFM |
|
| Back to top |
|
 |
migusd
New User
Joined: 08 Aug 2014 Posts: 44 Location: USA
|
|
|
|
that was the issue, Sergey!
Thanks guys,
you are awesome! |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|