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 the SORT step have same input and output file

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

New User


Joined: 20 Dec 2007
Posts: 8
Location: India

PostPosted: Tue Jul 13, 2010 4:44 pm    Post subject: Can the SORT step have same input and output file
Reply with quote

Hi,

The input file to the SORT step is getting generated in the same JCL. The file is a GDG. I need a SORT step to omit certain records from that GDG. But I do not intend to increase the GDG version number.

I think, I can sort it to a temp dataset and then using REPRO can replace the existing GDG version with temp dataset.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jul 13, 2010 4:46 pm    Post subject:
Reply with quote

Quote:
But I do not intend to increase the GDG version number.
Terminology is critical in IT, where similar words may mean very different things. Did you mean version here or generation -- there is a huge difference.
Back to top
View user's profile Send private message
Jain Abhinav

New User


Joined: 20 Dec 2007
Posts: 8
Location: India

PostPosted: Tue Jul 13, 2010 4:50 pm    Post subject:
Reply with quote

I meant generation!!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 13, 2010 4:50 pm    Post subject:
Reply with quote

Using the same input file as output is not the greatest of ideas where data integrity is involved.

My suggestion would be to create the input to the sort either as a temporary or permanent file and the create the next GDG generation as output from the sort step.
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: Tue Jul 13, 2010 7:44 pm    Post subject:
Reply with quote

Hello,

Strongly suggest you follow Expat's advice.

If you try to re-write the same file, and the sort abends for any reason (x37, timeout, operator cancel, etc), the input will have to be re-created thereby wasting resources.

If you do as Expat suggests, the restart is trivial.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jul 14, 2010 4:16 pm    Post subject: Re: Can the SORT step have same input and output file
Reply with quote

Jain Abhinav wrote:
I think, I can sort it to a temp dataset and then using REPRO can replace the existing GDG version with temp dataset.
You already wrote this, so I think you've a solution. However, your subject line gives a different impression and usually I refer to that as "suicidal effort" - which should be avoided.
Back to top
View user's profile Send private message
Jain Abhinav

New User


Joined: 20 Dec 2007
Posts: 8
Location: India

PostPosted: Thu Jul 15, 2010 2:12 pm    Post subject: Reply to: Can the SORT step have same input and output file
Reply with quote

Thanks Anuj for your "fitting" reply.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jul 15, 2010 3:52 pm    Post subject:
Reply with quote

What does that mean? icon_neutral.gif
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 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am


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