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 fields

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


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Fri Sep 03, 2004 5:46 am    Post subject: Sort fields Reply with quote

Hi,

I have 3 packed fields declared in the following way

VARA START-1, LENGTH=1, TYPE=PD
VARB START-2, LENGTH=3, TYPE=PD
VARC START-5, LENGTH=3, TYPE=PD

Total = 1+3+3=7 bytes

I have two sort cards
==========================
SORT FIELDS=(1,7,PD,A)
==========================

==========================
SORT FIELDS=(1,1,PD,A,2,3,PD,A,5,3,PD,A)
==========================

Both these sort cards are fetching me the same results. How??

Thanks,
Deepesh
Back to top
View user's profile Send private message AIM Address
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Fri Sep 03, 2004 11:06 am    Post subject: Reply with quote

The second method is the correct way.

The first method will not always work. However, if the signs in all of the PD fields are the same (e.g. it's always C), it will appear to work, e.g.

As an example consider the following input (in hex):

1C12345C12345C
2C10000C12345C
2C10001C00005C
0C12345C12345C

Since C is the same in all of the PD values, it has no effect on the result.

But if you had:

1D12345C12345C
2C10000C12345C
2C10001D00005C
0C12345C12345C

The C sign for plus and D sign for minus would be treated correctly as the sign for each individual PD field with the second method, but would not be recognize as the sign the first method.
_________________
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
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Fri Sep 03, 2004 11:28 am    Post subject: Reply with quote

But, Frank, why is 1,7,PD not treated as 'invalid' PD field in this particular example? A SUM FIELDS on this field does result in S0C7.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
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 Sep 03, 2004 12:08 pm    Post subject: Reply with quote

Cogito,

DFSORT's SUM processing uses instructions which result in an 0C7 for an invalid PD value.

DFSORT's SORT processing does not use any instructions which result in an 0C7 for an invalid PD value. The invalid sign or digit is just treated as bits.
_________________
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