Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 
Joinkeys: REFORMAT STATEMENT SYNTAX ERROR

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Joinkeys: REFORMAT STATEMENT SYNTAX ERROR
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 08, 2011 1:39 pm    Post subject:
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Apr 08, 2011 3:51 pm    Post subject: Reply to: Joinkeys: REFORMAT STATEMENT SYNTAX ERROR
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Apr 08, 2011 4:34 pm    Post subject: Reply to: Joinkeys: REFORMAT STATEMENT SYNTAX ERROR
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

Senior Member


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

PostPosted: Fri Apr 08, 2011 4:54 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Apr 08, 2011 5:00 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
No new posts ON 2 AND EVERY 1 - Statement ??? UmeySan COBOL Programming 2 Tue Jul 25, 2017 1:20 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us