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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am


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