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
 

 

SYNCSORT Question, what went wrong with my JCL

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

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Tue Sep 25, 2007 11:39 pm    Post subject: SYNCSORT Question, what went wrong with my JCL
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

Moderator Team Head


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

PostPosted: Tue Sep 25, 2007 11:49 pm    Post subject: Reply to: DFSORT Question
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: 1187
Location: Bangalore,India

PostPosted: Tue Sep 25, 2007 11:57 pm    Post subject:
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: 680
Location: NJ

PostPosted: Wed Sep 26, 2007 12:11 am    Post subject: Reply to: DFSORT Question
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: 2150
Location: At my coffee table

PostPosted: Wed Sep 26, 2007 12:18 am    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Sep 26, 2007 12:20 am    Post subject: Reply to: DFSORT Question
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: 1187
Location: Bangalore,India

PostPosted: Wed Sep 26, 2007 12:23 am    Post subject:
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 Moderator


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

PostPosted: Wed Sep 26, 2007 12:59 am    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Sep 26, 2007 9:44 am    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Sep 26, 2007 1:56 pm    Post subject:
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 Moderator


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

PostPosted: Wed Sep 26, 2007 8:15 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Sep 26, 2007 8:34 pm    Post subject: Reply to: DFSORT Question, what went wrong with my JCL
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 Moderator


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

PostPosted: Wed Sep 26, 2007 9:03 pm    Post subject:
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: 680
Location: NJ

PostPosted: Wed Oct 03, 2007 9:04 pm    Post subject:
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: 500
Location: USA

PostPosted: Wed Oct 03, 2007 9:40 pm    Post subject:
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: 680
Location: NJ

PostPosted: Wed Oct 03, 2007 10:38 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Oct 03, 2007 11:26 pm    Post subject: Reply to: SYNCSORT Question, what went wrong with my JCL
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    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 syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm


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