Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us