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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am
No new posts Limit in Length for a CICS START seahawk789 CICS 6 Mon Apr 02, 2018 8:34 pm

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