View previous topic :: View next topic
|
Author |
Message |
infotech58
New User
Joined: 07 Jul 2005 Posts: 31 Location: Mumbai, INDIA
|
|
|
|
I have a Job which accepts a file from FTP server and process that file. In case it is a holiday there is no file found on the server and Job abends. I want to resolve it. What I thought of doing is, to write a program which will read a the list of holidays from a file and if today's date is holiday it will skip the FTP processing and will continue with an empty file.
Could anyone suggest me an alternate way of doing so or any comments on this method..
My Requirement is:- if it is a holiday instead of taking file from FTP server an empty file should be created and processing go on with empty file.
Job1
Step1 FTP Step
Step2 Processing Step
Any Inputs Appreciated.
Thanks |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
Our FTP is set to give a cc 0004, not abend if it unable to complete.
We have the next step IEFBR14 or Gener with dummy input disp=(mod,catlg,catlg) to the dataset.
The following steps can then run whether they received input from the FTP or not. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
write a program which will read a the list of holidays from a file and if today's date is holiday it will skip the FTP processing and will continue with an empty file |
Several systems i've worked with do this. The program that determines if today is a holiday (or any other day that would have no server file) creates the empty file and sets a condition code so that the FTP is not executed. Processing then continues with the empty file. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Our scheduler (CA-7) has a holiday calendar. The scheduling people then just put the job on that calendar and we don't have these kinds of problems. Maybe your scheduler can do the same thing. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you use the scheduler, you will still need to create the empty file when the process needs to run, but the ftp should not.
You might do this with condition codes or by defining 2 separate jobs to the scheduling software. |
|
Back to top |
|
|
raviprasath_kp Warnings : 1 New User
Joined: 20 Feb 2005 Posts: 65 Location: chennai
|
|
|
|
hi
i hope expect holiday the file is having data
so user surcount utility,if the record is there process as usual othere wise
create dummy file in another step and ran the job |
|
Back to top |
|
|
sasikumar1984
Active User
Joined: 02 Jul 2007 Posts: 109 Location: Chennai - India
|
|
|
|
Hi,
FTP step never goes with abend state if the file is empty, it will set CC to 4. so u can add a step next to ur FTP step and check previous return code, if it 4, then create a empty file in that step. I think u must be knowing checking previous steps return code values in JCL itself. We had same problems and following this.... HOpe this will help u lot...
Regards,
Sasikumar.K |
|
Back to top |
|
|
infotech58
New User
Joined: 07 Jul 2005 Posts: 31 Location: Mumbai, INDIA
|
|
|
|
Thanks Gentlemen for all your replies ..
reading a holiday list file and skipping the FTP step is a better idea. I will try to do it and get the results to you people.
By simply checking the return codes of FTP step if we try to conclude if file is there or not may work but there may be other cases when file is not present on the server for some other reason than holiday, in that case job should abend and processing should not go with empty file.
Cheers..!!
SumeetK |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
One more way can be available, if you can define the file as GDG. Keep one empty version ready for processing prior to the execution of JOB. On holidays JOB will run with empty file else with data file. |
|
Back to top |
|
|
infotech58
New User
Joined: 07 Jul 2005 Posts: 31 Location: Mumbai, INDIA
|
|
|
|
Guys..
I tried using SORT and ICETOOL and it went fine...
using SORT i read from a file containing holiday list and in case today is a holiday it is written to a temp file otherwise temp file is empty. then ICETOOL reads the temp file and gives RC 12 in case it is not holiday and RC 0 in case it is holiday. rest processing is handelled by comparing the RC of ICETOOL step.
only problem is in case is my JOB gives MAXCC of 12 in case it is not holiday and I would have do get if defined as acceptable return code in scheduler. Is there any way wherein I could force my job to end with RC 0?? |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Not complete by any means, but we use this. Or eztrieve to change return codes as needed.
//step execIDCAMS,
//sysin *
SET MAXCC=0 |
|
Back to top |
|
|
infotech58
New User
Joined: 07 Jul 2005 Posts: 31 Location: Mumbai, INDIA
|
|
|
|
Thanks Steve..
I will try it .. |
|
Back to top |
|
|
|