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
 

 

How to Sort a numeric data using Dfsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ksssrikanth

New User


Joined: 21 Jul 2005
Posts: 6

PostPosted: Mon Jul 23, 2007 6:52 pm    Post subject: How to Sort a numeric data using Dfsort
Reply with quote

Hi ,
In DFsort , My control card is sorting on bases of character mode , plz let me know the control card to sort the numeric data (not the packed decimal feilds)

intially : 19,32,20,

output(error) : 10,29,39

Required output :19,20,32

thanks
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Jul 23, 2007 6:55 pm    Post subject:
Reply with quote

What does the control card that produces the wrong data look like?
Back to top
View user's profile Send private message
ksssrikanth

New User


Joined: 21 Jul 2005
Posts: 6

PostPosted: Mon Jul 23, 2007 7:00 pm    Post subject: Re: How to Sort a numeric data using Dfsort
Reply with quote

output(error) : 10,29,32

sort fields = (1,2,ch,a)
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Jul 23, 2007 7:07 pm    Post subject:
Reply with quote

these three records input
Code:
19
32
20
caused this output
Code:
10
29
32
using this sortcard?
sort fields = (1,2,ch,a)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Mon Jul 23, 2007 8:41 pm    Post subject:
Reply with quote

ksssrikanth,

It's not clear from your post what you're trying to do. In fact, I can't make any sense out of it at all. You show three values for input (19,32,20) and three completey different values for output (10,29,39). Where did those output values come from?

You need to explain clearly what you're trying to do. Give an example of the records in your input file and what you expect for output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of the relevant fields.
Back to top
View user's profile Send private message
ksssrikanth

New User


Joined: 21 Jul 2005
Posts: 6

PostPosted: Tue Jul 24, 2007 8:50 am    Post subject:
Reply with quote

Hi ,
i am giving the example

input :

19
18
254
2
206
245
26

output : SORT FIELDS=(1,4,CH,A)

18
19
2
206
245
254
26

But i need the Sort to be done on numeric base not on the character mode

Excepted output :
2
18
19
26
206
245
254

thanks
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Tue Jul 24, 2007 10:24 pm    Post subject:
Reply with quote

Ah, why didn't you say so in the first place. You can use this DFSORT statement:

Code:

   SORT FIELDS=(1,4,UFF,A)
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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