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
 
Sort a dataset without having to produce another dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Fri Mar 02, 2007 2:44 pm    Post subject: Sort a dataset without having to produce another dataset
Reply with quote

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
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Fri Mar 02, 2007 2:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 02, 2007 10:56 pm    Post subject:
Reply with quote

Hello,

If the sort ever abends, what will you do to re-create the input thas been destroyed?
Back to top
View user's profile Send private message
prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Sat Mar 03, 2007 4:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kregen

New User


Joined: 16 Mar 2006
Posts: 18

PostPosted: Mon Mar 05, 2007 5:39 pm    Post subject: Re: Sort a dataset without having to produce another dataset
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 05, 2007 8:39 pm    Post subject:
Reply with quote

Hello Kregen,

Neat solution icon_smile.gif

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
View user's profile Send private message
hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Tue Mar 06, 2007 12:53 pm    Post subject:
Reply with quote

hi,

thanks for all of your helpful tips and suggestions...
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 OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm

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