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

Regarding SORT FIELDS=


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

New User


Joined: 19 Sep 2005
Posts: 17

PostPosted: Tue Nov 08, 2005 9:54 am
Reply with quote

Hi All,

I am having a problem while sorting out an input file.

My input file contains the following details

ROCK 1.20
RAM 11.30
SAM 12.10
TOM 4.60
JIM 8.60
TIM 22.40

i want to sort based on the numbers. so i gave the sort fields as

SORT FIELDS=(6,5,FI,A)

then i found that the output file looks like

ROCK 1.20
RAM 11.30
SAM 12.10
TIM 22.40
TOM 4.60
JIM 8.60

which is not correct.

i also tried using SORT FIELDS=(6,5,CH,A), but the result was same.

please let me know what format should i use so that i can get the output in proper sorted order. that is

ROCK 1.20
TOM 4.60
JIM 8.60
RAM 11.30
SAM 12.10
TIM 22.40

i cannot edit the contents of the input file.

Raajan.
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: Tue Nov 08, 2005 9:46 pm
Reply with quote

I need to know exactly what your input records look like. You didn't use ubb codes so it's very hard to tell. I tried to put the ubb codes in for you, but still couldn't tell what the data actually looks like. Please show your input records with a b for each blank between the two columns so I can see what the data actually looks like. Something like:

ROCKb1.20
RAMbb11.30
...

or whatever it actually looks like. Then I'll be able to help you.
Back to top
View user's profile Send private message
raajan_p

New User


Joined: 19 Sep 2005
Posts: 17

PostPosted: Wed Nov 09, 2005 9:31 am
Reply with quote

hi Frank,

the input file looks like

Code:

ROCKb1.20
RAMbb11.30
SAMbb12.10
TOMbb4.60
JIMbb8.60
TINbb22.40


Hope you are able to understand. please let me know if you require any other info in this regard.

thanks,
raajan
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 Nov 10, 2005 9:13 pm
Reply with quote

Yes, that helps. You can use the following DFSORT SORT statement to do what you asked for:

Code:

  SORT FIELDS=(6,5,UFF,A)


You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's UFF format. Only DFSORT has this function, so if you don't have DFSORT, you won't be able to use it. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:

Use [URL] BBCode for External Links
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
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