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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: CAN I SORT ONE PS FILE AND STORE INTO ONE PS FILE?
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: 1452
Location: Chicago, IL

PostPosted: Thu Jan 12, 2006 8:41 pm    Post subject: Re: JCL SORT
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: 309
Location: Vizag / US

PostPosted: Thu Jan 12, 2006 8:41 pm    Post subject: Re: JCL SORT
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Jan 12, 2006 9:09 pm    Post subject:
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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