View previous topic :: View next topic
|
Author |
Message |
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
I have written the below code to check some sorting tech ... But the below JCL gives me wrong output ... Can anyone just clear me about that what went wrong with my JCL .. The RC=0 for the below JCL
Code: |
//STEP2 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=MSD.MKT.T7868.ABBU.SORT(INP),
// DISP=SHR
//SORTOF01 DD DSN=MSD.MKT.T7868.ABBU.SORT.OUT01,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(1,1),RLSE)
//SORTOF02 DD DSN=MSD.MKT.T7868.ABBU.SORT.OUT02,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(1,1),RLSE)
//SYSIN DD *
OPTION COPY
OUTFIL FILES=01,INCLUDE=(1,2,CH,EQ,C'AR')
OUTFIL FILES=02,INCLUDE=(9,2,CH,EQ,C'13')
/*
|
Just think the input is as below
Code: |
MOHANK 23423423434534344 KIRAN
MOHANK 13342345345345345 RAJEEV
ARAMES 34535345325354324 SURESH
SURESH 98347385385933987 PULI
RAMESH 67575789769876785 MADHU
KRISHN 50830948530859340 OIIED
KRISHN 30495849572938495 MADHU
SURESH 98347385385933987 PULI
|
Edited for Syntax |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
For SORTOF01, I get
Code: |
ARAMES 34535345325354324 SURESH
|
For SORTOF02, I get
Code: |
MOHANK 13342345345345345 RAJEEV
|
You're saying that's not right? |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi khamarutheen,
What are u expecting as o/p? |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi,
What superk says's the one i expected and that should be the output for that JCL ... Instead i am getting
SORTOF01:
MOHANK 23423423434534344 KIRAN
MOHANK 13342345345345345 RAJEEV
ARAMES 34535345325354324 SURESH
SURESH 98347385385933987 PULI
RAMESH 67575789769876785 MADHU
KRISHN 50830948530859340 OIIED
KRISHN 30495849572938495 MADHU
SURESH 98347385385933987 PULI
SORTOF02:
MOHANK 23423423434534344 KIRAN
MOHANK 13342345345345345 RAJEEV
ARAMES 34535345325354324 SURESH
SURESH 98347385385933987 PULI
RAMESH 67575789769876785 MADHU
KRISHN 50830948530859340 OIIED
KRISHN 30495849572938495 MADHU
SURESH 98347385385933987 PULI
I was just confused why i am getting this output .... I ran several times and got the same ...
Guptae,
Please have a look into the o/p and advise me on the same ... Can i try giving diff file names? if so what's wrong with this ... |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Interesting......
Could you post the sort's sysout?
That could help us...... |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Also, I had to edit the original post to correct some syntactical issues (see the note) that might be misleading to someone else. Make sure you're using the syntactically correct code. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Khamaurutheen,
I am not able to understand why u r getting this o/p for fixed length .This job should produce the output as Superk shows.Giving different file name wont resolve the issue. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
what's wrong with this |
k.a.khamaurutheen,
I don't see how you could have gotten all of the records in SORTOF1 and SORTOF2 (as you say you did) with those input records and those control statements.
If your input has RECFM=VB, then you wouldn't get any records.
If your input has RECFM=FB, then you should have gotten the expected output.
There's something not obvious here that you're not telling us or are unaware of.
Please run the following job and post the //SYSOUT messages and //SORTOUT output:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=MSD.MKT.T7868.ABBU.SORT(INP),
// DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
/*
|
Also, post the //SYSOUT messages from your run with the OUTFIL statements.
I'm not sure what Superk edited, but perhaps it makes a difference. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Frank Yaeger wrote: |
I'm not sure what Superk edited, but perhaps it makes a difference. |
There was a blank instead of a comma before the INCLUDE statements. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
superk wrote: |
There was a blank instead of a comma before the INCLUDE statements. |
That is probably the problem, the blank would turn the includes into comments......
Why can't people just explain their problem rather than just hinting at it...... |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Yes, that would explain why the output files had all of the records.
I guess in this case, editing the original post without saying what was edited obscured the problem and solution. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
My bad!
Won't do that again. I guess I just hate to see blatantly obvious coding/syntax errors, especially when someone else might use the same code and end up with the same issue. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I guess I just hate to see blatantly obvious coding/syntax errors, especially when someone else might use the same code and end up with the same issue. |
Yes, I feel the same way. I edit a lot of "bad" stuff like unneeded DD statements (e.g. SYSPRINT), unneeded DCB attributes, etc. I even edit out syntax errors in solutions given by people that are close but not quite right. But I guess we can all learn from this to be more careful when editing original posts. |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi all,
Sorry for late joining with your discussion ... I was in vacation...
Fine when i include camma as superk did i got the MAXCC=16 and i got the below sysout
Quote: |
SYNCSORT FOR Z/OS 1.2.2.3R U.S. PATENTS: 4210961, 5117495 (C) 2005 SYNCSO
XXXXX z/OS 1.7.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER XXXXX 370 LICEN
SYSIN :
SORT FIELDS=COPY
OUTFIL FILES=01, INCLUDE COND=(1,2,CH,EQ,C'AR')
OUTFIL FILES=02, INCLUDE COND=(9,2,CH,EQ,C'13')
*
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
Please suggest |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Quote: |
OUTFIL FILES=01, INCLUDE COND=(1,2,CH,EQ,C'AR')
OUTFIL FILES=02, INCLUDE COND=(9,2,CH,EQ,C'13')
|
The reason for the syntax error is the comma after the OUTFIL FILES statements followed by a space. However, there is also another error in this code that will need to be addressed as well...
Leave out the space before the INCLUDE statements and also leave out the COND portion of the INCLUDE statement. Fix these and the problem should be resolved:
Code: |
OUTFIL FILES=01,INCLUDE=(1,2,CH,EQ,C'AR')
OUTFIL FILES=02,INCLUDE=(9,2,CH,EQ,C'13')
|
|
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi all,
I changed as per Alissa Margulies said and got the output per superk said ...Thanks for all in this to get in my prog to get work .... |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Maybe you should contact Alissa and get some proper SYNCSORT documentation. |
|
Back to top |
|
|
|