Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 6968
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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us