Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Not able to figure out the error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
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    Post subject: Not able to figure out the error
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Tue Jul 21, 2015 12:52 pm    Post subject: Reply to: Not able to figure out the error
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Tue Jul 21, 2015 8:27 pm    Post subject: Reply to: Not able to figure out the error
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PLI Run JCL error with 806 shrivatsa PL/I & Assembler 6 Wed Dec 05, 2018 12:23 pm
No new posts Error reading file in REXX module ashek15 CLIST & REXX 3 Wed Oct 24, 2018 4:50 am
No new posts PL/I read error for HFS files Joe Kirsch PL/I & Assembler 6 Fri Sep 28, 2018 9:13 pm
No new posts Error in IEBGENER supriyo kumar JCL & VSAM 1 Thu Sep 27, 2018 10:22 pm
No new posts Error while trying to open an AIX in ... amitc23 CICS 4 Tue Sep 04, 2018 12:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us