IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need to Sort field that are in 9's complement


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
fareed

New User


Joined: 29 Mar 2006
Posts: 1

PostPosted: Wed Mar 29, 2006 1:19 am
Reply with quote

There is a timestamp field which is in 9's complement. We need to sort it.
Am not very great a sort and so but still can understand Sort Fields
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 29, 2006 1:49 am
Reply with quote

Please show me an example of the records in your input file and what you want for output. Show examples of the type of values you're working with and what they look like in 9's complement. Also, what is the RECFM and LRECL of your input file?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Mar 30, 2006 11:12 pm
Reply with quote

You sent me the following information in a private message:

I need to sort on timestamp(79939139671438)

99999999999999 -- 9?s component

79939139671438 -- Value in the File

20060860328561 -- Actual value

Since each actual value is just the value in the file subtracted from 9's, you can just sort ZD descending:

Code:

   SORT FIELDS=(p,14,ZD,D)


where p is the starting position of the field.

If there's more to it than that, you need to explain further.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top