IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CAN I SORT ONE PS FILE AND STORE INTO ONE PS FILE?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jspaulpeter

New User


Joined: 25 Aug 2005
Posts: 12

PostPosted: Thu Jan 12, 2006 8:31 pm
Reply with quote

HAI FRIENDS I HAVE ONE DOUBT ?
CAN I SORT ONE PS FILE AND STORE INTO ONE PS FILE?[/b]

Title changed from "JCL SORT" to "CAN I SORT ONE PS FILE AND STORE INTO ONE PS FILE?" : Priyesh.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Jan 12, 2006 8:41 pm
Reply with quote

Quote:
CAN I SORT ONE PS FILE AND STORE INTO ONE PS FILE?

Yes, you can.

Code:
//STEP01     EXEC SORT                               
//SORTIN   DD DSN=HLQ.INPUT,DISP=SHR   
//SORTOUT  DD DSN=HLQ.OUTPUT,
//            DISP=(NEW,CATLG,DELETE)             
//SYSIN    DD *                                   
   SORT FIELDS=....
//                                                 


Fill up parameters acc to ur need... or get back in case of any problem...

Regards,

Priyesh.
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Thu Jan 12, 2006 8:41 pm
Reply with quote

Yes U can do that......
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Jan 12, 2006 9:09 pm
Reply with quote

I think the question is whether the sort can do with one file (input and output the same one). This can be done. The intermediate results of the sort are in sortwk. So:

//sortin dd dsn=file-x,disp=shr
//sortout dd dsn=file-x,disp=shr
//sortwk01 dd dsn=&&sort1,disp=(...etc)
//sortwk03 dd dsn=&&sort2.......
//and as many sortwk files as you need more...

After the sort your input is resorted in the same file.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top