View previous topic :: View next topic
|
Author |
Message |
Ashish choudhary
New User
Joined: 11 Feb 2013 Posts: 7 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Ashish choudhary
New User
Joined: 11 Feb 2013 Posts: 7 Location: India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Ashish choudhary
New User
Joined: 11 Feb 2013 Posts: 7 Location: India
|
|
|
|
Thanks,
Will change in the program to check the same. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
1) proper scheduling
2) rename the file after use - although I have NEVER seen this done |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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? |
|
Back to top |
|
|
Ashish choudhary
New User
Joined: 11 Feb 2013 Posts: 7 Location: India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
But i guess we dont have such kind of utility. |
Your guess is wrong
it is not that You do not have it... it does not exist |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
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 |
|
|
|