Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us