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

Can the SORT step have same input and output file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 13, 2010 4:46 pm
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
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 13, 2010 4:50 pm
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 13, 2010 7:44 pm
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

Superior Member


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

PostPosted: Wed Jul 14, 2010 4:16 pm
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
Reply with quote

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

Superior Member


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

PostPosted: Thu Jul 15, 2010 3:52 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top