View previous topic :: View next topic
|
Author |
Message |
hallecodec
New User
Joined: 05 Sep 2006 Posts: 30 Location: Philippines
|
|
|
|
I just want to ask: is there a way to sort a dataset without having to produce another dataset? if there is, what jcl utility it would be? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
For any of the common SORT utilities (DFSORT, SYNCSORT etc.) you can specify the same file in SORTIN and in SORTOUT.
O. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If the sort ever abends, what will you do to re-create the input thas been destroyed? |
|
Back to top |
|
|
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 154 Location: The Netherlands
|
|
|
|
hallecodec,
U can specify the same dataset name in u r SORTIN and SORTOUT dd st. Yes as Dick mentioned if u r JCL abends u would be loosin all the data, usually this way of sorting is done only when u have a back up of the ds in a GDG base. We have a prog. generating a file with data, the next step of mine is to take back up of the same to GDG , and the third step sorts the file and gives the output on the same file,
Thamilzan. |
|
Back to top |
|
|
kregen
New User
Joined: 16 Mar 2006 Posts: 21
|
|
|
|
Hi,
ich do it as follwed
//SORT EXEC=DFSORT
.
.
.
.
.
//SORTIN DD DISP=(OLD,DELETE,KEEP),DSN=GDG.ENTRY(0)
//SORTOUT DD DISP=(NEW,CATLG),DSN=GDG.ENTRY(+1)
.
.
.
THE GDG-Base ist defined with LIMIT 1 SCRATCH.
TSO DEFINE GDG ( NAME(GDG.ENTRY) LIMIT(1)
All followed JOBSTEPS are running with GDG-BASE-Name only
//READIT EXEC=PROG
//INPUT DD DISP=SHR,DSN=GDG.ENTRY
.
.
.
cu
kai |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Kregen,
Neat solution
It solves the problem of still having the input in case of an abend as well as producing the "same" dsn as output. While it does create a "new" file, two files exist only briefly and when the step is done, the downstream processes see only "the file". |
|
Back to top |
|
|
hallecodec
New User
Joined: 05 Sep 2006 Posts: 30 Location: Philippines
|
|
|
|
hi,
thanks for all of your helpful tips and suggestions... |
|
Back to top |
|
|
|