|
View previous topic :: View next topic
|
| Author |
Message |
rocky_balboa
New User

Joined: 24 Mar 2010 Posts: 61 Location: Cape of Good Hope
|
|
|
|
Hi , I am not able to figure out the error . What do I need to change.
| Code: |
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOF1,VTOF,
INCLUDE=(17,6,CH,EQ,C'AAAAAA')
OUTREC IFTHEN=(WHEN=(67,8,CH,EQ,C' '),
BUILD=(1:6,11,X,C'051',X,C'111111',13X)),
IFTHEN=(WHEN=(67,8,CH,NE,C' '),
BUILD=(1:6,11,X,C'051'))
OUTFIL FNAMES=SORTOF2,VTOF,
INCLUDE=(17,6,CH,EQ,C'BBBBBB')
OUTREC IFTHEN=(WHEN=(67,8,CH,EQ,C' '),
*
BUILD=(1:6,11,X,C'051',X,C'222222',13X)),
IFTHEN=(WHEN=(67,8,CH,NE,C' '),
BUILD=(1:6,11,X,C'051'))
END |
| Code: |
WER269A OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
Thanks
Code'd |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
First you've been around long enough to know to code your own posts here.
Second, at the highest level it does not matter which order you code your SORT control cards in. SORT will always run them in the order it wants. Here's the order your cards will run in:
| Code: |
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(67,8,CH,EQ,C' '),
BUILD=(1:6,11,X,C'051',X,C'111111',13X)),
IFTHEN=(WHEN=(67,8,CH,NE,C' '),
BUILD=(1:6,11,X,C'051'))
OUTREC IFTHEN=(WHEN=(67,8,CH,EQ,C' '),
BUILD=(1:6,11,X,C'051',X,C'222222',13X)),
IFTHEN=(WHEN=(67,8,CH,NE,C' '),
BUILD=(1:6,11,X,C'051'))
OUTFIL FNAMES=SORTOF2,VTOF,
INCLUDE=(17,6,CH,EQ,C'BBBBBB')
OUTFIL FNAMES=SORTOF1,VTOF,
INCLUDE=(17,6,CH,EQ,C'AAAAAA')
END |
You are allowed multiple OUTFILs, but only one OUTREC.
How to resolve it depends on what you are supposed to be doing. If all is OK except for two OUTRECs, then make the first OUTREC into an INREC is the simplest. Or merge the two OUTRECs. Or if they are supposed to be OUTREC on OUTFIL, use BUILD instead to avoid such confusion. |
|
| Back to top |
|
 |
rocky_balboa
New User

Joined: 24 Mar 2010 Posts: 61 Location: Cape of Good Hope
|
|
|
|
Thanks Bill.
But I have a SYNCSORT running in production with 2 OUTRECS :
| Code: |
OUTFIL FNAMES=SORTOF1,VTOF,
INCLUDE=(17,6,CH,EQ,C'AAAAAA',AND,67,8,CH,EQ,C' '),
OUTREC=(1:6,11,X,C'051',X,C'111111',13X)
OUTFIL FNAMES=SORTOF2,VTOF,
INCLUDE=(17,6,CH,EQ,C'BBBBBB',AND,67,8,CH,NE,C' '),
OUTREC=(1:6,11,X,C'051') |
Anyways I modified the SORT as suggested, but I am getting a different error,
| Code: |
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(67,8,CH,EQ,C' '),
BUILD=(1:6,11,X,C'051',X,C'111111',13X)),
IFTHEN=(WHEN=(67,8,CH,NE,C' '),
BUILD=(1:6,11,X,C'051')),
IFTHEN=(WHEN=(67,8,CH,EQ,C' '),
BUILD=(1:6,11,X,C'051',X,C'222222',13X)),
IFTHEN=(WHEN=(67,8,CH,NE,C' '),
BUILD=(1:6,11,X,C'051'))
OUTFIL FNAMES=SORTOF1,VTOF,
INCLUDE=(17,6,CH,EQ,C'AAAAAA')
OUTFIL FNAMES=SORTOF2,VTOF,
INCLUDE=(17,6,CH,EQ,C'BBBBBB')
END
|
Error :
| Code: |
WER235A OUTREC RDW NOT INCLUDED
|
I have looked up the explanation but I am wondering how the first SORT is running in production.
| Code: |
WER235A {ddname} {INREC,OUTREC} RDW NOT INCLUDED
EXPLANATION: The ddname will be SORTOUT, SORTOFxx, SORTOFx or the
ddname provided by an OUTFIL FNAMES parameter. Four bytes must be
provided for the RDW of the variable length output record in
the FIELDS parameter of the INREC, OUTREC or OUTFIL OUTREC
specification. These bytes must appear at the beginning of the record and
must not be edited. |
Code'd, some |
|
| Back to top |
|
 |
magesh23586
Active User

Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
Try this Untested
| Code: |
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(67,8,CH,EQ,C' '),
BUILD=(1,4,6,11,X,C'051',X,C'111111',13X)),
IFTHEN=(WHEN=(67,8,CH,NE,C' '),
BUILD=(1,4,6,11,X,C'051')),
IFTHEN=(WHEN=(67,8,CH,EQ,C' '),
BUILD=(1,4,6,11,X,C'051',X,C'222222',13X)),
IFTHEN=(WHEN=(67,8,CH,NE,C' '),
BUILD=(1,4,6,11,X,C'051'))
OUTFIL FNAMES=SORTOF1,VTOF,BUILD=(5,33)
INCLUDE=(17,6,CH,EQ,C'AAAAAA')
OUTFIL FNAMES=SORTOF2,VTOF,BUILD=(5,33)
INCLUDE=(17,6,CH,EQ,C'BBBBBB')
END
|
|
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, there's the confusion I was talking about.
If you look at the first block of code, you'll see that the line before both OUTRECs end in a comma, so the OUTREC is part of OUTFIL.
Without the preceding comma, the OUTREC is a separate statement. And you can only have one OUTREC per set of control cards.
On INREC and OUTREC use BUILD instead of FIELDS for new code. On OUTFIL use BUILD instead of OUTREC for new code. Standardises and saves confusion. See here.
As to your new error, your input file is VB but you are treating the data in OUTREC as FB. VB needs an RDW, always.
Probably because the OUTREC has "fallen off" the OUTFIL. Perhaps you'd best explain what you are trying to do? |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|