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

Syncsort Syntax Error


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

New User


Joined: 30 Dec 2009
Posts: 9
Location: India

PostPosted: Mon Jan 11, 2010 6:52 pm
Reply with quote

What's the syntax error in this control card.
Code:

OUTFIL FNAMES=OGM511,                               
 OMIT=(501,1,CH,NE,C'G'),                           
REMOVECC,                                           
HEADER1=(1:'O*N01',                                 
         54:'74',                                   
         501:'G'),                                 
IFTHEN=(WHEN=(12,18,CH,NE,C'                  '),   
SECTIONS=(501,3,SKIP=0L,                           
HEADER3=(1:'O*N05',                                 
         6:501,3,                                   
         9:504,3,                                   
         12:8' ',                                   
         20:'PPES',                                 
         24:30' ',                                 
         54:'74',                                   
         56:445' ',                                 
         501:501,3),                               
TRAILER3=(1:'O*N95',                               
         6:501,3,                                   
         9:504,3,                                   
         12:8' ',                                   
         20:'PPES',                                 
         24:30' ',                                 
         54:'74',                                   
         56:445' ',                                 
         501:501,3))),                             
TRAILER1=(1:'O*N99',                               
          54:'74',                                 
          501:'G')                                 
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jan 11, 2010 7:04 pm
Reply with quote

If you were to include all the jcl for the step,
and also the sysout msgs produced by your sort product - which usually point to the syntax error
someone could possibly take the time to look thru.
but to ask someone to just look at your control cards,
I think is abit much!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 11, 2010 11:00 pm
Reply with quote

Hello,

Quote:
but to ask someone to just look at your control cards,
I think is abit much!
Personally, i believe this goes way beyond "abit much". It is completely lazy and somewhat rude. . .

The error(s) presented by the run describe the problem(s) quite well. If you will not do any research at all to resolve your error, you should at least post the info provided by the execution as well as the jcl used. . . As DBZ has already mentioned. . .
Back to top
View user's profile Send private message
Deepan Raj

New User


Joined: 30 Dec 2009
Posts: 9
Location: India

PostPosted: Tue Jan 12, 2010 9:57 am
Reply with quote

Sorry,

This is my sysout message,

Code:
 WER268A  OUTFIL STATEMENT  : SYNTAX ERROR       
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000   
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE   


The jcl i tried is

Code:
//SORTJNF1 DD  DSN=File1,
//             DISP=SHR                                     
//SORTJNF2 DD  DSN=file2,       
//             DISP=SHR             
//OGM511   DD  DSN=file3.output,
//             DISP=(NEW,CATLG,DELETE),             
//             UNIT=SYSDA,                           
//             STORCLAS=CTSDASD,                     
//             AVGREC=K,                             
//             SPACE=(511,(900,100),RLSE),           
//             DCB=(RECFM=FB,LRECL=511)   
//SYSIN    DD *                                   
JOINKEYS FILE=F1,                                           
        FIELDS=(501,3,A)                                     
JOINKEYS FILE=F2,                                           
        FIELDS=(1,3,A)                                       
REFORMAT FIELDS=(F1:1,511)                                   
SORT FIELDS=(501,3,A,12,9,A,21,9,A),FORMAT=CH               
OUTREC FIELDS=(1:1,3,4:SEQNUM,8,ZD,RESTART=(501,3),12:12,500)
OUTFIL FNAMES=OGM511,                             
 OMIT=(501,1,CH,NE,C'G'),                         
REMOVECC,                                         
HEADER1=(1:'O*N01',                               
         54:'74',                                 
         501:'G'),                               
IFTHEN=(WHEN=(12,18,CH,NE,C'                  '),
SECTIONS=(501,3,SKIP=0L,                         
HEADER3=(1:'O*N05',                               
         6:501,3,                                 
         9:504,3,                                 
         12:8' ',                                 
         20:'PPES',                               
         24:30' ',                               
         54:'74',                                 
         56:445' ',                               
         501:501,3),                             
TRAILER3=(1:'O*N95',                             
         6:501,3,                                 
         9:504,3,                                 
         12:8' ',                                 
         20:'PPES',                               
         24:30' ',                               
         54:'74',                                 
         56:445' ',                               
         501:501,3))),                           
TRAILER1=(1:'O*N99',                             
          54:'74',                               
          501:'G')         
//SYSOUT   DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=A                     

What im trying to do is, if the input records to the outfil is empty, i just need to write header1, else if there are records then header1, header3, data, trailer3,trailer1
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Tue Jan 12, 2010 1:46 pm
Reply with quote

Post the entire SYSOUT - what you post does not convey much (anything..)
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jan 12, 2010 2:29 pm
Reply with quote

most often in the sysout/sort messages,

when WER268A OUTFIL STATEMENT : SYNTAX ERROR occurs
there is usually a $ or * or some marker under the colum in the line,
usually at the point the sort parser decided there was an error.

that is the reason we want the complete sort message details.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 12, 2010 10:11 pm
Reply with quote

Hello,

You will help others help you if you will use the Code tag. . .

This may be your problem - from the manual:
Quote:
The control statement can begin in column 2 through column 69. If labels are used, the control statement must be separated from the label by at least one blank.
Back to top
View user's profile Send private message
Deepan Raj

New User


Joined: 30 Dec 2009
Posts: 9
Location: India

PostPosted: Wed Jan 13, 2010 12:09 pm
Reply with quote

Code:
SYNCSORT FOR Z/OS  1.3.2.1R    U.S. PATENTS: 4210961, 5117495   (C) 200
                                          * XXXXXXXXXXXXX. *   z/OS   1.
SYNCSORT LICENSED FOR CPU SERIAL NUMBER XXXXX, MODEL XXX XXX         
SYSIN :                                                               
  JOINKEYS FILE=F1,                                                   
          FIELDS=(501,3,A)                                             
  JOINKEYS FILE=F2,                                                   
          FIELDS=(1,3,A)                                               
  REFORMAT FIELDS=(F1:1,511)                                           
  SORT FIELDS=(501,3,A,12,9,A,21,9,A),FORMAT=CH                       
  OUTREC FIELDS=(1:1,3,4:SEQNUM,8,ZD,RESTART=(501,3),12:12,500)       
  OUTFIL FNAMES=OFILE511,                                             
  INCLUDE=(501,1,CH,NE,C'G'),                                         
  REMOVECC,VLTRIM=X'AA',                                               
  SECTIONS=(501,3,SKIP=0L,                                             
  HEADER3=(1:'BOF',                                                   
           4:6' ',                                                     
           10:'PERSHING ',                                             
           19:'PORTFOLIO HOLDINGS DATA OF  ',                         
           47:&DATE=(MD4/),                                           
           57:' TO REMOTE ',                                           
           68:501,3,                                                   
           72:' BEGINS HERE  ',                                       
           86:&DATE=(MD4/),                                           
           96:1' ',                                                   
           97:&TIME,                                                   
           105:395' ',                                                 
           500:'A',                                                   
           501:501,3),                                                 
  TRAILER3=(1:'EOF',                                                   
           4:6' ',                                                     
           10:'PERSHING ',                                             
           19:'PORTFOLIO HOLDINGS DATA OF  ',                         
           47:&DATE=(MD4/),                                           
           57:' TO REMOTE ',                                           
           68:501,3,                                                   
           72:' ENDS HERE. ',                                         
            84:'TOTAL DETAIL RECORDS: ',               
            106:COUNT=(TO=ZD,LENGTH=10),               
            116:380' ',                               
            500:'Z',                                   
            501:501,3))                               
   OUTFIL FNAMES=OFTP511,                             
   INCLUDE=((501,1,CH,EQ,C'F'),OR,                     
           (501,1,CH,EQ,C'C'),OR,                     
           (501,1,CH,EQ,C'D'),OR,                     
           (501,1,CH,EQ,C'E'),OR,                     
           (501,1,CH,EQ,C'H'),OR,                     
           (501,1,CH,EQ,C'J'),OR,                     
           (501,1,CH,EQ,C'&')),                       
   REMOVECC,                                           
   SECTIONS=(501,3,SKIP=0L,                           
   HEADER3=(1:'BOF',                                   
            4:6' ',                                   
            10:'PERSHING ',                           
            19:'PORTFOLIO HOLDINGS DATA OF  ',         
            47:&DATE=(MD4/),                           
            57:' TO REMOTE ',                         
            68:501,3,                                 
            72:' BEGINS HERE  ',                       
            86:&DATE=(MD4/),                           
            96:1' ',                                   
            97:&TIME,                                 
            105:395' ',                               
            500:'A',                                   
            501:501,3),                               
   TRAILER3=(1:'EOF',                                 
            4:6' ',                                   
            10:'PERSHING ',                           
            19:'PORTFOLIO HOLDINGS DATA OF  ',         
            47:&DATE=(MD4/),                           
            57:' TO REMOTE ',                         
            68:501,3,                                 
            72:' ENDS HERE. ',                         
            84:'TOTAL DETAIL RECORDS: ',               
           106:COUNT=(TO=ZD,LENGTH=10),                 
           116:380' ',                                   
           500:'Z',                                     
           501:501,3))                                   
  OUTFIL FNAMES=ONJE511,                                 
  INCLUDE=(501,1,CH,EQ,C'N'),                           
  REMOVECC,                                             
  SECTIONS=(501,3,SKIP=0L,                               
  HEADER3=(1:'BOF',                                     
           4:6' ',                                       
           10:'PERSHING ',                               
           19:'PORTFOLIO HOLDINGS DATA OF  ',           
           47:&DATE=(MD4/),                             
           57:' TO REMOTE ',                             
           68:501,3,                                     
           72:' BEGINS HERE  ',                         
           86:&DATE=(MD4/),                             
           96:1' ',                                     
           97:&TIME,                                     
           105:395' ',                                   
           500:'A',                                     
           501:501,3),                                   
  TRAILER3=(1:'EOF',                                     
           4:6' ',                                       
           10:'PERSHING ',                               
           19:'PORTFOLIO HOLDINGS DATA OF  ',           
           47:&DATE=(MD4/),                             
           57:' TO REMOTE ',                             
           68:501,3,                                     
           72:' ENDS HERE. ',                           
           84:'TOTAL DETAIL RECORDS: ',                 
           106:COUNT=(TO=ZD,LENGTH=10),                 
           116:380' ',                                   
           500:'Z',                                     
           501:501,3))                                   
  OUTFIL FNAMES=OGM511,                                 
   OMIT=(501,1,CH,NE,C'G'),                             
  REMOVECC,                                             
  HEADER1=(1:'O*N01',                                   
           54:'74',                                     
           501:'G'),                                     
  IFTHEN=(WHEN=(12,9,CH,NE,C'         '),               
                                                           *               
  SECTIONS=(501,3,SKIP=0L,                               
  HEADER3=(1:'O*N05',                                   
           6:501,3,                                     
           9:504,3,                                     
           12:8' ',                                     
           20:'PPES',                                   
           24:30' ',                                     
           54:'74',                                     
           56:445' ',                                   
           501:501,3),                                   
  TRAILER3=(1:'O*N95',                                   
           6:501,3,                                     
           9:504,3,                                     
           12:8' ',                                     
           20:'PPES',                                   
           24:30' ',                                     
           54:'74',                                     
           56:445' ',                                   
           501:501,3))),                                 
  TRAILER1=(1:'O*N99',                                   
            54:'74',                                     
            501:'G')                                     
WER268A  OUTFIL STATEMENT  : SYNTAX ERROR               
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000           
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE           

This is my whole sysout message,
actually im trying to change the program, which split the input file into four output file on particular condition and also add header n trailewr to those files. Im trying to include HEADER inside the IFTHEN condition, I dont know whether we can use HEADER inside IFTHEN condition.

(Edited by A. Margulies to protect company information.)
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 Compare only first records of the fil... SYNCSORT 7
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top