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

How to check if the file is already processed in provios job


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

New User


Joined: 11 Feb 2013
Posts: 7
Location: India

PostPosted: Mon Feb 11, 2013 5:19 pm
Reply with quote

I need to check if the file is already processed with the same job in previos run or not. How to check through JCL.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Feb 11, 2013 5:23 pm
Reply with quote

1. It cannot be done "through JCL". JCL does nothing but execute programs.

2. How do you determine if the file has been processed already? If you do not know that, then your question is impossible to answer as stated.
Back to top
View user's profile Send private message
Ashish choudhary

New User


Joined: 11 Feb 2013
Posts: 7
Location: India

PostPosted: Mon Feb 11, 2013 5:35 pm
Reply with quote

Thanks,
but i wanted to confirm if we have any utility which we can use in job which can confrim if a perticular version of the file has already been processed through this job. Looking for a utility which can check the version of the file.

Thanks
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Feb 11, 2013 6:04 pm
Reply with quote

How could that possibly work? You have to code it yourself. Control file, headers, trailers, stuff which should be in the design from day one.
Back to top
View user's profile Send private message
Ashish choudhary

New User


Joined: 11 Feb 2013
Posts: 7
Location: India

PostPosted: Mon Feb 11, 2013 6:13 pm
Reply with quote

Thanks,
Will change in the program to check the same.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Feb 11, 2013 6:23 pm
Reply with quote

1) proper scheduling
2) rename the file after use - although I have NEVER seen this done
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Feb 11, 2013 6:27 pm
Reply with quote

Quote:
I need to check if the file is already processed with the same job in previos run or not. How to check through JCL.


If this is an one off case, why dont you check the output file/report of the previous job to see what input got processed?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Feb 11, 2013 6:56 pm
Reply with quote

Quote:
Looking for a utility which can check the version of the file.
There is no such thing. Utilities are not concerned about "version" of a file -- they typically only are concerned with whether or not the file exists. "Version" depends upon the file name, or the header in the file, or the trailer in the file, or some external file that is used to keep track of versions processed. All of this is part of application design and, as such, HAS ABSOLUTELY NOTHING TO DO WITH THE OVERALL SYSTEM. Design the application to track the "version" but don't expect the system to be able to do something magical with your data.

This forum is for professionals. Based upon this question, you would be MUCH better off in Beginners and Students Forum since your question should not even exist in a professional's mind.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Mon Feb 11, 2013 7:44 pm
Reply with quote

Ashish choudhary wrote:
I need to check if the file is already processed with the same job in previos run or not. How to check through JCL.
Your question is kinda confusing - are you talking about if the "EOF marker" is set; as in if file is ever opened for processing? icon_rolleyes.gif
Back to top
View user's profile Send private message
Ashish choudhary

New User


Joined: 11 Feb 2013
Posts: 7
Location: India

PostPosted: Mon Feb 11, 2013 7:52 pm
Reply with quote

i was looking for some utility to check the file version. But i guess we dont have such kind of utility. Will change the program to check the same.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Feb 11, 2013 7:58 pm
Reply with quote

Quote:
But i guess we dont have such kind of utility.

Your guess is wrong icon_cool.gif

it is not that You do not have it... it does not exist
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Mon Feb 11, 2013 8:11 pm
Reply with quote

If I understand what you are asking I/we did this all the time in one of my previous contracts but not with any specific utility. It worked with a little programming and something like this…

Job 1
1) process incoming daily file from company X.
2) if incoming file processed correctly, add date and time to one-line one-Limit-GDG file.
We wrote the file from a COBOL program.

Job 2 (and other jobs)
If incoming file processed correctly in Job 1, continue Job 2 steps, else stop job.
This was just a simple Easytrieve step to verify the one-line one-Limit-GDG that set a condition-code.
The rest of the JCL steps were executed or not executed depending on condition-code from Easytrieve step.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
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
Search our Forums:

Back to Top