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

Joinkeys: REFORMAT STATEMENT SYNTAX ERROR


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
PrabakarV

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Fri Apr 08, 2011 1:27 pm
Reply with quote

I am getting the below error before the ? symbol. used SORT pgm.

Code:
PARMTBLE : BMSG,CORE=MAX                                     
SYSIN :                                                     
  JOINKEYS FILES=F1,FIELDS=(1,3,A)                           
  JOINKEYS FILES=F2,FIELDS=(1,3,A)                           
  JOIN UNPAIRED,F1,F2                                       
  REFORMAT FIELDS=(F1:1,20,F2:1,20,?)                       
                                  *                         
  OPTION COPY                                               
  OUTFIL FNAMES=F1ONLY,INCLUDE=(41,1,CH,EQ,C'1'),BUILD=(1,20)
  OUTFIL FNAMES=F2ONLY,INCLUDE=(41,1,CH,EQ,C'2'),BUILD=(1,20)
  OUTFIL FNAMES=BOTH,INCLUDE=(41,1,CH,EQ,C'B'),BUILD=(1,20) 
WER161B  ALTERNATE PARM USED                                 
WER268A  REFORMAT STATEMENT: SYNTAX ERROR                   
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000               
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE               


could you please tell me why i am reformat fields error?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 08, 2011 1:39 pm
Reply with quote

Please explain in detail what it is that you wish to achieve, with examples of input data and expected output.

Have you read the SYNCSORT manual to get the information of the syntax for the failed statement.
Back to top
View user's profile Send private message
PrabakarV

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Fri Apr 08, 2011 3:14 pm
Reply with quote

I have two input files F1 and F2. have to compare it with a key then write non matched F1 only present records, non matched F2 only present records, matched records in three files.

below is the code i used.

Code:
//SORT1    EXEC PGM=SYNCSORT                                 
//SORTJNF1 DD  DSN=N******.UTIL.SORTINP1,DISP=SHR
//SORTJNF2 DD  DSN=N******.UTIL.SORTINP2,DISP=SHR
//SORTOUT  DD  SYSOUT=*                                     
//SYSOUT   DD  SYSOUT=*                                     
//SYSPRINT DD  SYSOUT=*                                     
//F1ONLY   DD  SYSOUT=*                                     
//F2ONLY   DD  SYSOUT=*                                     
//BOTH     DD  SYSOUT=*                                     
//*                                                         
//SYSIN    DD *                                             
  JOINKEYS FILES=F1,FIELDS=(1,3,A)                           
  JOINKEYS FILES=F2,FIELDS=(1,3,A)                           
  JOIN UNPAIRED,F1,F2                                       
  REFORMAT FIELDS=(F1:1,20,F2:1,20,?)                       
  OPTION COPY                                               
  OUTFIL FNAMES=F1ONLY,INCLUDE=(41,1,CH,EQ,C'1'),BUILD=(1,20)
  OUTFIL FNAMES=F2ONLY,INCLUDE=(41,1,CH,EQ,C'2'),BUILD=(1,20)
  OUTFIL FNAMES=BOTH,INCLUDE=(41,1,CH,EQ,C'B'),BUILD=(1,20) 
/* 
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Apr 08, 2011 3:51 pm
Reply with quote

Code:

WER268A  REFORMAT STATEMENT: SYNTAX ERROR 


Please look up that error message and post here what it says.
Back to top
View user's profile Send private message
PrabakarV

New User


Joined: 21 Dec 2007
Posts: 88
Location: My Desk

PostPosted: Fri Apr 08, 2011 4:23 pm
Reply with quote

Thanks for pointing Kevin. I did look at the error before thinking of asking help.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Apr 08, 2011 4:34 pm
Reply with quote

Let's let Alissa (from Syncsort) review your code and hopefully provide you with the correct syntax.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 08, 2011 4:54 pm
Reply with quote

AFAIK, SyncSort does not support "?" as an indicator,
Code:
REFORMAT FIELDS=(F1:1,20,F2:1,20,?)                       
looks like you picked up an example working for DFSort and used at a shop having SyncSort.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 08, 2011 5:00 pm
Reply with quote

Try this:
Code:
//SYSIN    DD *                                             
  JOINKEYS FILES=F1,FIELDS=(1,3,A)                           
  JOINKEYS FILES=F2,FIELDS=(1,3,A)                           
  JOIN UNPAIRED                                       
  REFORMAT FIELDS=(F1:1,20,F2:1,20),FILL=X'FF'                       
  OPTION COPY                                               
  OUTFIL FNAMES=F1ONLY,INCLUDE=(41,1,BI,EQ,X'FF'),BUILD=(1,20)
  OUTFIL FNAMES=F2ONLY,INCLUDE=(41,1,BI,EQ,X'FF'),BUILD=(1,20)
  OUTFIL FNAMES=BOTH,SAVE,BUILD=(1,20) 
/* 
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
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 Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top