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 

Problem with TBSORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
rutlandn
Beginner


Joined: 18 Apr 2006
Posts: 1
Topics: 1
Location: London UK

PostPosted: Wed Oct 03, 2007 8:15 am    Post subject: Problem with TBSORT Reply with quote

I'm using TBSORT to, well, sort a list of entries comprising a code and a name. I'm toggling between code and name order and it all looks OK except that when sorting in name order I'm getting what at first looks OK, but scrolling down shows names not in sequence at all. I am retrieving the names from a DB2 table using something we have called REXXSQL, which gets data on to REXX compund variable, and I am using the DB2 UPPER() function to store a name field to sort on (I'm displaying on the panel the original mixed-case name). I have two versions of the name, a 30 character one and a 50 character on. The longer one sorts OK but the shorter one is the problem.

The sorting is achieved by this code:

if order = 'fundid' then
do
order = 'name'
if nametyp = 'SHORT' then
ADDRESS ISPEXEC "TBSORT" fundtab "FIELDS(TFUNDSNU)"
else
ADDRESS ISPEXEC "TBSORT" fundtab "FIELDS(TFUNDLNU)"
end
else
do
order = 'fundid'
ADDRESS ISPEXEC "TBSORT" fundtab "FIELDS(TFUNDID)"
end
return


where fundtab contains the ISPF table name. TFUNDSNU, TFUNDLNU are the shorter and longer names, respectively. TFUNDID is the code.

Any clues?

Regards
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Thu Oct 25, 2007 1:12 am    Post subject: Reply with quote

Although not mandatory, you can try adding sort field type designator (probably 'C'), so the service should look like "ADDRESS ISPEXEC "TBSORT" fundtab "FIELDS(TFUNDSNU,C,A)"

O.
________
buy no2 vaporizer
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 -> TSO and ISPF 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