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 

Sort Substring Problem.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ace
Beginner


Joined: 24 Feb 2004
Posts: 58
Topics: 23

PostPosted: Thu Oct 19, 2006 11:09 am    Post subject: Sort Substring Problem. Reply with quote

Hi All,
I'm facing some strange problem while using Substring Control statement in DFSORT.

The input file is VB and has a length of 3786.
When I used the following statements

Code:
//TOOLIN DD *                                 
  COPY FROM(IN) USING(CTL1)                   
/*                                           
//CTL1CNTL DD *                               
  OUTFIL FNAMES=T1,                           
         INCLUDE=(5,3780,SS,EQ,C'STRING1',OR,
                  5,3780,SS,EQ,C'STRING2')
  OUTFIL FNAMES=T2,SAVE
/*       

DFMSG :
--------------
ICE054I 0 RECORDS - IN: 8185421, OUT: 8185421               
ICE227I 0 T1       : DELETED = 8185421, REPORT = 0, DATA = 0
ICE228I 0 T1       : TOTAL IN = 8185421, TOTAL OUT = 0       
ICE227I 0 T2       : DELETED = 0, REPORT = 0, DATA = 8185421
ICE228I 0 T2       : TOTAL IN = 8185421, TOTAL OUT = 8185421


But when I changed to this, the result is as shown below.

Code:
//TOOLIN DD *                                 
  COPY FROM(IN) USING(CTL1)                   
/*                                           
//CTL1CNTL DD *                               
  OUTFIL FNAMES=T1,                           
         INCLUDE=(100,200,SS,EQ,C'STRING1',OR,
                  100,200,SS,EQ,C'STRING2')
  OUTFIL FNAMES=T2,SAVE
/*                         

DFMSG:
--------------

ICE054I 0 RECORDS - IN: 8185421, OUT: 8185421                     
ICE227I 0 T1       : DELETED = 7510358, REPORT = 0, DATA = 675063
ICE228I 0 T1       : TOTAL IN = 8185421, TOTAL OUT = 675063       
ICE227I 0 T2       : DELETED = 675063, REPORT = 0, DATA = 7510358
ICE228I 0 T2       : TOTAL IN = 8185421, TOTAL OUT = 7510358   


Still I'm not getting the expected result. There are some records in T2 which has the above mentioned strings present in 120 position. Please let me know whether I'm missing something here..
_________________
Thank You
-Ace
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Thu Oct 19, 2006 11:51 am    Post subject: Reply with quote

I'll take an educated guess that you have VLSHRT in effect. With VLSHRT, INCLUDE will delete all "short" records. So when you have 5,3784, all records less than 3788 bytes are deleted which is every record in your case. When you have 100,200, all records less than 299 bytes are deleted, but records greater than 299 bytes are checked for 'STRING1' or 'STRING2'.

Add the following to //CTL1CNTL to get what you want:

Code:

   OPTION VLSCMP


For more information on VLSCMP, see the "How can I use INCLUDE/OMIT with "short" fields? " Ask Professor Sort item at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/
_________________
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
ace
Beginner


Joined: 24 Feb 2004
Posts: 58
Topics: 23

PostPosted: Thu Oct 19, 2006 12:29 pm    Post subject: Reply with quote

Thank you Very much Frank. It worked.
But I clould see in DFMSG the following messages, when I ran the previous jobs.

Code:
ICE201I 0 RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE150I 1 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELD


Could you please tell me what is the relevance of these messages?
_________________
Thank You
-Ace
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Thu Oct 19, 2006 2:54 pm    Post subject: Reply with quote

As stated in the System action for the ICE150I message: Processing continues: VLSHRT is not used for SORT, MERGE, INCLUDE, OMIT or SUM statement fields, but is used for OUTFIL INCLUDE or OMIT parameter fields, if specified. So VLSHRT was used for your OUTFIL INCLUDE fields which caused the deleted records.
_________________
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
ace
Beginner


Joined: 24 Feb 2004
Posts: 58
Topics: 23

PostPosted: Fri Oct 20, 2006 9:46 am    Post subject: Reply with quote

Frank,
Thanks for the clarification. My input file has around 8185421 records. While using the VLSCMP it's taking a lot of time to complete the job. Is there any way to improve the performance?
_________________
Thank You
-Ace
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Fri Oct 20, 2006 10:19 am    Post subject: Reply with quote

That's a lot of bytes to search for your strings. Taking a lot of time compared to what? How much time is a lot of time?

If you don't really need to search the entire record, cutting down the columns to search might reduce the time. Or writing an E15 to do the search based on the actual length of each record might reduce the time. YMMV.
_________________
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
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
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