MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Are there any performance issues with the below SORT
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Mon Aug 06, 2007 10:38 am    Post subject: Are there any performance issues with the below SORT Reply with quote

Hi,
We are having a requirement to create 3 output files from a i/p file.File is of VB with 6004 as record length.We have coded a ICETOOL step to create 3 files.The job :



Code:


//PS035    EXEC PGM=ICETOOL                                 
//SYSOUT   DD SYSOUT=*                                       
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//SORTIN   DD DSN=XXXXX.YYYY,                               
//            DISP=SHR                                       
//SORTOF1  DD DSN=XXXX.YY1,                                 
//            DISP=(NEW,CATLG,DELETE),                       
//            UNIT=SYSDA,                                   
//            SPACE=(CYL,(400,200),RLSE),                   
//            DCB=(LRECL=6004,RECFM=VB,BLKSIZE=0)           
//SORTOF2  DD DSN=XXXX.YY2,                                 
//            DISP=(NEW,CATLG,DELETE),                       
//            UNIT=SYSDA,                                   
//            SPACE=(CYL,(400,200),RLSE),                   
//            DCB=(LRECL=6004,RECFM=VB,BLKSIZE=0)           
//SORTOF3  DD DSN=XXXX.YY3,                                 
//            DISP=(NEW,CATLG,DELETE),                       
//            UNIT=SYSDA,                                   
//            SPACE=(CYL,(400,200),RLSE),                   
//            DCB=(LRECL=6004,RECFM=VB,BLKSIZE=0)           
//TOOLIN   DD *                                             
   SORT FROM(SORTIN) TO(SORTOF1) USING(CTL1)                 
   SORT FROM(SORTIN) TO(SORTOF2) USING(CTL2)                 
   SORT FROM(SORTIN) TO(SORTOF3) USING(CTL3)                 
//CTL1CNTL DD *                                                         
 SORT FIELDS=(05,129,BI,A)                                             
 INCLUDE COND=((16,3,CH,EQ,C'zzz'),OR,                                 
          (16,7,CH,EQ,C'5zzzzzz'))                                     
//CTL2CNTL DD *                                                         
 SORT FIELDS=(05,129,BI,A)                                             
 OMIT COND=((16,3,CH,EQ,C'zzz'),OR,                                     
          (16,7,CH,EQ,C'5zzzzzz'))                                     
//CTL3CNTL DD *                                                         
 SORT FIELDS=(05,129,BI,A)                                             
   INREC IFTHEN=(WHEN=(26,1,CH,EQ,C'a',AND,279,1,CH,EQ,C'k'),           
                OVERLAY=(138:X'003C')),                                 
         IFTHEN=(WHEN=(26,1,CH,EQ,C'a',AND,138,2,BI,NE,X'004C',AND,     
                       279,1,CH,NE,C'k'),                               
                OVERLAY=(138:X'008C'))                                 
 OMIT COND=((16,3,CH,EQ,C'zzz'),OR,                                     
          (16,7,CH,EQ,C'5zzzzzz'))                                     
//*


We have got a request from a Sr .team member to modify the SORT step to have only SORT as PGMNAME (not ICETOOL) and asked us to implimnet with the
Code:

OUTFIL FILES=1,<then the first ctl stmnt>
OUTFIL FILES=2,<then the second ctl stmnt>
OUTFIL FILES=3,<then the third ctl stmnt>
           


Is this really true that the performance will recude if we go for ICETOOL?

Thanks
Bprasanna[/code]
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Aug 06, 2007 11:00 am    Post subject: Reply with quote

bprasanna,

Your ICETOOL job is having 3 passes of data which is quite unnecessary. You can get the desired results with just 1 pass of data. Try this untested JCL

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=XXXXX.YYYY,
//            DISP=SHR
//OUT1     DD DSN=XXXX.YY1,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(400,200),RLSE)
/*
//OUT2     DD DSN=XXXX.YY2,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(400,200),RLSE)
/*
//OUT3     DD DSN=XXXX.YY3,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(400,200),RLSE)
//SYSIN    DD *
  SORT FIELDS=(05,129,BI,A)
                                           
  OUTFIL FNAMES=OUT1,INCLUDE=((16,3,CH,EQ,C'zzz'),OR,
                              (16,7,CH,EQ,C'5zzzzzz'))
 
  OUTFIL FNAMES=OUT2,OMIT=((16,3,CH,EQ,C'zzz'),OR,
                           (16,7,CH,EQ,C'5zzzzzz'))

  OUTFIL FNAMES=OUT3,OMIT=((16,3,CH,EQ,C'zzz'),OR,
                           (16,7,CH,EQ,C'5zzzzzz')),
        IFTHEN=(WHEN=(026,1,CH,EQ,C'a',AND,
                      279,1,CH,EQ,C'k'),
       OVERLAY=(138:X'003C')),
        IFTHEN=(WHEN=(026,1,CH,EQ,C'a',AND,
                      138,2,BI,NE,X'004C',AND,
                      279,1,CH,NE,C'k'),
       OVERLAY=(138:X'008C'))
/*


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Mon Aug 06, 2007 11:19 am    Post subject: Reply with quote

Code:

        IFTHEN=(WHEN=(026,1,CH,EQ,C'a',AND,
                      279,1,CH,EQ,C'k'),
       OVERLAY=(138:X'003C')),
        IFTHEN=(WHEN=(026,1,CH,EQ,C'a',AND,
                      138,2,BI,NE,X'004C',AND,
                      279,1,CH,NE,C'k'),
       OVERLAY=(138:X'008C'))

Just as a aside, shouldn't those two IFTHENs be reversed?
It looks like the more selective second one will never get used since the first will overlay 138 with the +3, insuring that it will never be a +4 for the second......
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Aug 06, 2007 11:40 am    Post subject: Reply with quote

CICS Guy,

Good Catch. The second IFTHEN would never get excueted at all. IFTHEN just acts like "Evaluate" in COBOL. The moment the first IFTHEN is satisfied it does not validate the next IFTHEN statements. If you really need to go to the next IFTHEN then you need HIT=NEXT parm.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Mon Aug 06, 2007 1:40 pm    Post subject: Reply with quote

Kolusu&CICS Guy,
Thanks for the reply and pointing the error in the sort statement.Another small question,Am i going to get the same output if I use HIT=NEXT and reversing of the IFTHEN's.

Thanks
Bprasanna
_________________
----------------
Thanks&Regards
Bprasanna
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Aug 06, 2007 1:50 pm    Post subject: Reply with quote

Quote:

Thanks for the reply and pointing the error in the sort statement.Another small question,Am i going to get the same output if I use HIT=NEXT and reversing of the IFTHEN's.


What exactly are the conditions? I think you just need 1 IFTHEN. Post your conditions and we will suggest the IFTHEN statement

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon Aug 06, 2007 3:32 pm    Post subject: Reply with quote

Quote:
Is this really true that the performance will recude if we go for ICETOOL?


Note that the performance issue here is not the use of ICETOOL, but the way in which you used ICETOOL. You can do the same single SORT pass with ICETOOL that you can do with DFSORT.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Tue Aug 07, 2007 10:28 am    Post subject: Reply with quote

Hi,
Please see the structer of my i/p file.

Code:

----+----1----+----2----............134................275...
******************************                               
4ABC      .364466386BA1A           01..032444991B        .K 
FCCC4444440FFFFFFFFFCCFC           FF00FFFFFFFFFC        0D 
483900000003644663862111           010C0324449912        02 
 ------------------------------------------------           
4ABC      .364466386BA1A           01..032444991B        .   
FCCC4444440FFFFFFFFFCCFC           FF00FFFFFFFFFC        0   
483900000003644663862111           010C0324449912        0   


Here I am having the values at positions 22,134,275 as A ,0 and K for the first record and 2,0 and space for second record.
We need to create the o/p file as.

Code:


----+----1----+----2----............134................275...
******************************                               
4ABC      .364466386BA1A           01..032444991B      .K   
FCCC4444440FFFFFFFFFCCFC           FF03FFFFFFFFFC      0D   
483900000003644663862111           010C0324449912      02   
 ------------------------------------------------           
4ABC      .364466386BA1A           01..032444991B      .     
FCCC4444440FFFFFFFFFCCFC           FF02FFFFFFFFFC      0     
483900000003644663862111           010C0324449912      0     

The conditions are below.

If the value at position 22 is A and 275 is K then the value at position 134 is to be replace with 3.
if the value at position 22 is A and 275 is NOT equal to K and 134 is NOT equal to 1 then 134 is to be replaced with 2.

Thank you
Bprasanna
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Tue Aug 07, 2007 11:08 am    Post subject: Reply with quote

Right, "male vision"....EQ vs NE.... bonk
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Aug 07, 2007 11:22 am    Post subject: Reply with quote

bprasanna,

Your IFTHEN statements are correct. You don't have to change them. I overlooked the NE condition. Sorry

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Thu Aug 09, 2007 8:45 am    Post subject: Reply with quote

Hi,
I tried the above code which has been given.But the second statement is not properly executing.Please note that I am trying in SYNCSORT with SYNCSORT FOR Z/OS 1.2.1.1N.

I am still getting the second record same as the i/p in the o/p file.But the amazing thing is ,if I use SYNCTOOL ,the o/p is coming proper.

Is there any issue with the OUTFIL and IFTHEN clause ?

Thank you
Bprasanna
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Aug 09, 2007 9:10 am    Post subject: Reply with quote

Quote:

I am still getting the second record same as the i/p in the o/p file.But the amazing thing is ,if I use SYNCTOOL ,the o/p is coming proper.


bprasanna,

I am wondering if the data is case sensitive. I see that you are checking for lower case 'a' and 'k' . Do you have the same case sensitive check in the synctool job also?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Thu Aug 09, 2007 1:16 pm    Post subject: Reply with quote

Hi Kolusu,
Yes.I am having the same case sensitive check in SYNCTOOL.I believe some one who is having the SYNC SORT in their system can check the conditions what I am saying is correct or not.

Thanks
Bprasanna
_________________
----------------
Thanks&Regards
Bprasanna
Back to top
View user's profile Send private message
bprasanna
Beginner


Joined: 05 Sep 2003
Posts: 119
Topics: 33
Location: Hyderabad

PostPosted: Fri Aug 10, 2007 10:30 am    Post subject: Reply with quote

Hi Alissa,

Could you please check the above SORT statement in the SYNCSORT env.It seems there is some thing wrong with the OUTFIL with IFTHEN in the release SYNCSORT FOR Z/OS 1.2.1.1N.

Thanks
Bprasanna
_________________
----------------
Thanks&Regards
Bprasanna
Back to top
View user's profile Send private message
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Fri Aug 10, 2007 2:10 pm    Post subject: Reply with quote

Bprasanna,

I just tested the application using SyncSort for z/OS 1.2.1 and it ran fine. If you require further assistance, please contact me offline. You can email me at alissa.margulies@syncsort.com. Please provide the complete and unedited job listing, along with sample output.
_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group