Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sorting an alphanumeric field which has date values in it..

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
roopesh_vp
Currently Banned

New User


Joined: 30 Jan 2009
Posts: 2
Location: Mysore

PostPosted: Fri Mar 20, 2009 2:50 pm    Post subject: Sorting an alphanumeric field which has date values in it..
Reply with quote

Hi All,

I want to sort a ps based on the value of the clumn 'last used'( some sample values for that column is given below)
LAST USED

02/20/09
12/07/07
01/31/08
12/28/06
*NEVER*
01/16/09
02/13/09
*NEVER*
*NEVER*
04/04/07
*NEVER*
08/24/06

It has both date fields and the string *NEVER* .. Can i sort this field in descending order of date and move all *NEVER* records to the botton of the file??? Is it possible to do this using a COBOL program or easytrieve...??

Thanks in advance
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Fri Mar 20, 2009 2:59 pm    Post subject:
Reply with quote

since numbers are represented as hex F0 (0) thru F9 (9) and letters/special characters are represented as hex C1 (A) thru E?,
you are not going to be able to desc sort without changing the value of '*never*' to something like '9never*'.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts LOW VALUES as a KEY juares castro DB2 10 Sat Apr 07, 2018 1:06 am
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us