View previous topic :: View next topic |
Author |
Message |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 624 Topics: 175 Location: Stockholm, Sweden
|
Posted: Mon Dec 27, 2021 10:10 am Post subject: Sort input file to same file |
|
|
Got this question from a colleague and couldn't answer it.
Are there any pros and cons of sorting a file and using the same file for both input and output ? (Just curious) _________________ Michael |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
kolusu Site Admin
![Site Admin Site Admin](images/ranks/adminpic.jpg)
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Mon Dec 27, 2021 11:38 am Post subject: |
|
|
misi01,
Technically you CAN sort the same file using as both input and output. You just canNOT use a COPY operation to the same file. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 624 Topics: 175 Location: Stockholm, Sweden
|
Posted: Wed Dec 29, 2021 7:15 am Post subject: |
|
|
Thanks, but are there any special pros/cons to using the same file for both input and output for a sort? _________________ Michael |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
kolusu Site Admin
![Site Admin Site Admin](images/ranks/adminpic.jpg)
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Wed Dec 29, 2021 10:31 am Post subject: |
|
|
misi01,
There are no special pros to use the same file for both input and output. You may save some DASD as you don't write to another dataset. Nowadays DASD isn't that expensive.
As for cons, if for any reason the job abends then you may loose data. If you have a backup copy of the dataset then you are good, but without a backup you may run into an issue when the job abends. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|