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

Sorting a PS


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lokesh_try8

New User


Joined: 30 Dec 2005
Posts: 14
Location: Chennai

PostPosted: Thu Feb 16, 2006 8:07 pm
Reply with quote

Hi,
Can anyone help me out in sorting a PS file , by giving a TSO command which can in turn be used in REXX.

Thanks & Regards ,
Lokesh R icon_biggrin.gif
Back to top
View user's profile Send private message
Dariusz
Warnings : 1

New User


Joined: 11 Aug 2005
Posts: 27
Location: POLAND

PostPosted: Thu Feb 16, 2006 8:18 pm
Reply with quote

Hi.
For not very big file and simple key we can sort the file during EDIT:

on command line set sort start_column end_column.

For big or very big file we use batch sort usuelly.

Regards.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Feb 16, 2006 8:31 pm
Reply with quote

You need to allocate your input dataset to SORTIN, your output dataset to SORTOUT (they can be the same dataset, if you wish), and your terminal or DUMMY to SYSOUT:
Code:

TSO ALLOC DD(SORTIN) DA(my.dataset) SHR REU"
TSO ALLOC DD(SORTOUT) DA(my.dataset) SHR REU"
TSO ALLOC DD(SYSOUT) DA(*) REU"


Then, call the SORT program:
Code:

TSO CALL *(SORT)


Use your terminal (i.e. the SYSIN DD) to enter your SORT commands, then end the input stream with a slash/asterisk (/*):
Code:

  SORT FIELDS=(1,8,BI,A,10,6,BI,D)
/*             
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Sorting Date Field DFSORT/ICETOOL 4
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts Sorting a record spanned over multipl... DFSORT/ICETOOL 13
No new posts Creating additional seqnum/Literal wh... DFSORT/ICETOOL 4
Search our Forums:

Back to Top