IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Not able to figure out the error


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rocky_balboa

New User


Joined: 24 Mar 2010
Posts: 61
Location: Cape of Good Hope

PostPosted: Tue Jul 21, 2015 12:38 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 21, 2015 12:52 pm
Reply with quote

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
View user's profile Send private message
rocky_balboa

New User


Joined: 24 Mar 2010
Posts: 61
Location: Cape of Good Hope

PostPosted: Tue Jul 21, 2015 6:24 pm
Reply with quote

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
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Tue Jul 21, 2015 8:26 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 21, 2015 8:27 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top