|
|
| Author |
Message |
lokesh_try8
New User
Joined: 30 Dec 2005 Posts: 14 Location: Chennai
|
|
|
|
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  |
|
| Back to top |
|
 |
References
|
|
 |
Dariusz Warnings : 1 New User
Joined: 11 Aug 2005 Posts: 27 Location: POLAND
|
|
|
|
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 |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3265 Location: Charlotte,NC USA
|
|
|
|
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:
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 |
|
 |
|
|
|