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 variable length file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Mon Jul 24, 2006 5:12 pm    Post subject: How to sort a variable length file?
Reply with quote

How to sort a variable length file directly.I mean don't convert it to fixed length file.

how to specify the fields statement?for instance,i wan to sort a VF file and take the column 6 to 8 as the key field,how can write the parameters?

sort fields=?

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

Jerry

New User


Joined: 16 Sep 2005
Posts: 42

PostPosted: Mon Jul 24, 2006 5:27 pm    Post subject:
Reply with quote

Hi William,

You would refer the column as column number + 4. If it is column 6 to 8,
then you would give as,

sort fields=(10,2,CH)
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 24, 2006 9:17 pm    Post subject:
Reply with quote

To sort columns 6 to 8 of a VB file in ascending order, you would use this DFSORT statement:

Code:

  SORT FIELDS=(10,3,CH,A)
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Mon Jul 31, 2006 4:41 pm    Post subject:
Reply with quote

it didn't work.
why 25128 followed by 25100?
the parameter is below
000021 //SYSIN DD *
000022 SORT FIELDS=(5,5,CH,A)
000023 END
000024 /*
the result is below
000017 2512500000000000
000018 2512800000000000
000019 j 2510045600000000
000020 j 2510045600000000


000028 j 2512845700000000
000029 2510045600000000
000030 2510045600000000


in hex mode
000017 2512500000000000
0300FFFFFFFFFFFFFFFF
08002512500000000000
------------------------------------
000018 2512800000000000
0300FFFFFFFFFFFFFFFF
08002512800000000000
------------------------------------
000019 j 2510045600000000
0900FFFFFFFFFFFFFFFF
01002510045600000000
------------------------------------
000020 j 2510045600000000
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: Sat Aug 05, 2006 11:09 pm    Post subject:
Reply with quote

Please don't post in more than one Forum. I've closed this thread. See my response in your duplicate thread at:

http://ibmmainframes.com//viewtopic.php?t=12816
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: Sat Aug 05, 2006 11:09 pm    Post subject:
Reply with quote

Oops. I can't close this thead since it's not in the Forum I moderate.

Moderator - please close this duplicate thread.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm


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