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

SYNCSORT Question, what went wrong with my JCL


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

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Tue Sep 25, 2007 11:39 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Sep 25, 2007 11:49 pm
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Sep 25, 2007 11:57 pm
Reply with quote

Hi khamarutheen,

What are u expecting as o/p?
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Sep 26, 2007 12:11 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Sep 26, 2007 12:18 am
Reply with quote

Interesting......
Could you post the sort's sysout?
That could help us......
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Sep 26, 2007 12:20 am
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Sep 26, 2007 12:23 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Sep 26, 2007 12:59 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Sep 26, 2007 9:44 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Sep 26, 2007 1:56 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Sep 26, 2007 8:15 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Sep 26, 2007 8:34 pm
Reply with quote

My bad! icon_redface.gif

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Sep 26, 2007 9:03 pm
Reply with quote

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
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Oct 03, 2007 9:04 pm
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Oct 03, 2007 9:40 pm
Reply with quote

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
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Oct 03, 2007 10:38 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Oct 03, 2007 11:26 pm
Reply with quote

Maybe you should contact Alissa and get some proper SYNCSORT documentation.
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 Compare only first records of the fil... SYNCSORT 7
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
Search our Forums:

Back to Top