View previous topic :: View next topic
|
Author |
Message |
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
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 |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
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 |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
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.  |
|
Back to top |
|
 |
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
Well,
I wanted to show where the error was and hence the gamble and i knew i would be getting back
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.  |
|
Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
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.  |
|
Back to top |
|
 |
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
Oh ... 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
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  |
|
Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
So..is it working now after the changes? |
|
Back to top |
|
 |
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
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 |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
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 |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
surya4ug,
So what was your problem? what changes did you make to the control cards? |
|
Back to top |
|
 |
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
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
Thanks for looking into it! |
|
Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
surya4ug wrote: |
Having fun with SYNCSORT, courtesy Mr. Arun
Thanks for looking into it! |
You're welcome. Thanks for the follow up. It's really an amazing utility.  |
|
Back to top |
|
 |
|
|