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
 

 

INREC statement syntax error while executing SYNCSORT code.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Wed Jun 10, 2009 1:42 am    Post subject: INREC statement syntax error while executing SYNCSORT code.
Reply with quote

Hello,

I'm trying to execute the following code and am getting an error :

Code:

//*************************************************************         
//****  SORT THE GPSI CUST UNLOAD FILE                     ****         
//*************************************************************         
//STEP1    EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DSN=ABC.DEF.GHI(0),DISP=SHR         
//SORTOUT  DD DSN=&&S1,DISP=(,PASS)                                     
//SYSIN    DD *                                                         
  INCLUDE COND=(1,23,CH,EQ,C'No. of records from aaa')                 
  INREC BUILD=(C'CONST1,+',151,12,UFF,ZD,LENGTH=12,80:X)               
  SORT FIELDS=COPY                                                     
/*                                                                     
//**********************************************************************
//STEP2 EXEC PGM=SORT,                                                 
//    PARM='DYNALLOC=(SYSDA,24),HIPRMAX=OPTIMAL,VSCORE=16M,VSCORET=64M'
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DISP=SHR,DSN=ABC.DEF.GHI1(0)         
//SORTOUT  DD DSN=ABC.DEF.GHI.JLK(+1),                 
//          DISP=(,CATLG,DELETE),                                   
//          UNIT=SYSDA,RECFM=FB,                                       
//          SPACE=(CYL,(500,50),RLSE),BLKSIZE=0,                       
//          VOL=(,,,70)                                                                   
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)                                 
//SYSIN    DD *                                                         
   INREC IFTHEN=(WHEN=(21,3,CH,EQ,C'aaa',OR,21,3,CH,EQ,C'bbb'),         
    BUILD=(1,160,165:C'     ')),                                       
       IFTHEN=(WHEN=(21,3,CH,NE,C'aaa',OR,21,3,CH,NE,C'bbb'),           
    BUILD=(1,160,165:(151,10,ZD),MUL,+100,DIV,CONST1,M10,LENGTH=5,C'%'))
   OPTION COPY                                                   
   OUTFIL FNAMES=SORTOUT,REMOVECC,                               
   HEADER1=(001:'**********PERSONAL PROF OVERALL STATS',45:&DATE)
                                                     
/*




Error :

Code:

INREC IFTHEN=(WHEN=(21,3,CH,EQ,C'KTC',OR,21,3,CH,EQ,C'WCC'),BUILD=(1,160,165:C'
N/A')),IFTHEN=(WHEN=(21,3,CH,NE,C'KTC',OR,21,3,CH,NE,C'WCC'),BUILD=(1,160,165:
151,10,ZD),MUL,+100,DIV,CONST1,M10,LENGTH=5,C'%')
*
OPTION COPY
OUTFIL FNAMES=SORTOUT,REMOVECC,HEADER1=(001:'**********PERSONAL PROF OVERALL ST
TS',45:&DATE)
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE



The asterisk in the error is present exactly at the value CONST1. Not sure whats the problem. these are pieces of code you provided before. The input file LRECL is 168.

Please help. I'm stuck here and not able to move fwd
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Jun 10, 2009 2:57 am    Post subject:
Reply with quote

Quote:
...these are pieces of code you provided before. ...


Well come on and step up.
Whoever gave him the code is obviously responsible (TS thinks so, anyway).
So, give him his answer before he starts taking legal action against us.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Jun 10, 2009 6:08 am    Post subject:
Reply with quote

surya4ug wrote:
these are pieces of code you provided before
surya4ug,

Glad that you said those were "pieces" of code.
Hint: Do you find any difference in the control statements used in your run JCL and those in your error messages?
dbzTHEdinosauer wrote:
So, give him his answer before he starts taking legal action
May be it's time I consult my advocate. icon_smile.gif
Back to top
View user's profile Send private message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Wed Jun 10, 2009 8:26 am    Post subject: Reply to: INREC statement syntax error while executing SYNCS
Reply with quote

Well,

I wanted to show where the error was and hence the gamble and i knew i would be getting back icon_smile.gif


So, here is the error:

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


and the asterisk thats generally shown near the 'problematic' part of the control statements, shows up near the CONST1 in the 2nd BUILD statement. I remember you mentioned before that i missed a few brances and i still don't get where exactly i missed them.

Please let me know if this is hasn't helped to explain the situation. Not sure what else is needed. icon_sad.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Jun 10, 2009 11:23 am    Post subject:
Reply with quote

Your JCL wrote:
INREC IFTHEN=(WHEN=(21,3,CH,EQ,C'aaa',OR,21,3,CH,EQ,C'bbb')
................................
................................
BUILD=(1,160,165:(151,10,ZD),MUL,+100,DIV,CONST1,M10,LENGTH=5,C'%'))
................................
................................
Your Error Message wrote:
INREC IFTHEN=(WHEN=(21,3,CH,EQ,C'KTC',OR,21,3,CH,EQ,C'WCC')
................................
................................
BUILD=(1,160,165:
151
,10,ZD),MUL,+100,DIV,CONST1,M10,LENGTH=5,C'%')
................................
................................
surya4ug wrote:
I'm trying to execute the following code and am getting an error
You are not showing the output from the JCL that you said you submitted. I have highlighted the differences so that you can identify it. 36_2_51.gif
Back to top
View user's profile Send private message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Wed Jun 10, 2009 11:29 am    Post subject: Reply to: INREC statement syntax error while executing SYNCS
Reply with quote

Oh icon_smile.gif... my bad...... i intended to be generic while i pasted the code by mentioning aaa and bbb but forgot to change the values in the error message from KTC to aaa and WCC to bbb

The sysout also shows the same code icon_smile.gif

INREC IFTHEN=(WHEN=(21,3,CH,EQ,C'aaa',OR,21,3,CH,EQ,C'bbb')
................................
................................
BUILD=(1,160,165:(151,10,ZD),MUL,+100,DIV,CONST1,M10,LENGTH=5,C'%'))


By the way, nice emoticon...it made me smile icon_lol.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Jun 10, 2009 11:43 am    Post subject:
Reply with quote

So..is it working now after the changes?
Back to top
View user's profile Send private message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Thu Jun 11, 2009 8:21 am    Post subject: Reply to: INREC statement syntax error while executing SYNCS
Reply with quote

No,

What i meant was, i just posted the control statements in the error wrongly. The error still exists near the CONST1 value.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Jun 11, 2009 8:37 am    Post subject:
Reply with quote

Hello,

It will probably help if you post the current jcl and control statements and the diagnostic info from the execution.

Please use the "Code" tag to improve readability.
Back to top
View user's profile Send private message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Thu Jun 11, 2009 9:03 am    Post subject: Reply to: INREC statement syntax error while executing SYNCS
Reply with quote

I used the following code and it worked now!! YAAY....


Code:
INREC IFTHEN=(WHEN=(21,3,CH,EQ,C'aaa',OR,21,3,CH,EQ,C'bbb'),       
    BUILD=(1,160,175:C'  N/A')),                                   
      IFTHEN=(WHEN=(21,3,CH,NE,C'aaa',OR,21,3,CH,NE,C'bbb'),       
BUILD=(1,160,175:(151,12,ZD),MUL,+100,DIV,CONST1,M10,LENGTH=5,C'%'))
OPTION COPY                                                         
OUTFIL FNAMES=SORTOUT,REMOVECC,                                     
HEADER1=(001:'**********PERSONAL PROF OVERALL STATS',45:&DATE)   
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Thu Jun 11, 2009 9:47 am    Post subject:
Reply with quote

surya4ug,

So what was your problem? what changes did you make to the control cards?
Back to top
View user's profile Send private message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Thu Jun 11, 2009 11:25 pm    Post subject: Reply to: INREC statement syntax error while executing SYNCS
Reply with quote

The problem was that in step1, i edited the constant manually in the input file for some reason and also in one occasion the constant came out to be zero and since we are tryinig to divide a field in step2 with this constant, the problem occured.

I Just tweaked the input file a bit and it worked fine. No real syntax errors found. Having fun with SYNCSORT, courtesy Mr. Arun icon_cool.gif

Thanks for looking into it!
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Thu Jun 11, 2009 11:30 pm    Post subject: Re: Reply to: INREC statement syntax error while executing S
Reply with quote

surya4ug wrote:
Having fun with SYNCSORT, courtesy Mr. Arun icon_cool.gif

Thanks for looking into it!
You're welcome. Thanks for the follow up. It's really an amazing utility. icon_smile.gif
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 PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 3 Mon Dec 05, 2016 11:57 am
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 3 Fri Dec 02, 2016 9:47 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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