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

Job abending on Holidays- How to Resolve.


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

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Mon Aug 13, 2007 10:32 pm
Reply with quote

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
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Mon Aug 13, 2007 10:44 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Aug 13, 2007 11:49 pm
Reply with quote

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
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Aug 14, 2007 12:17 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Aug 14, 2007 12:20 am
Reply with quote

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
View user's profile Send private message
raviprasath_kp
Warnings : 1

New User


Joined: 20 Feb 2005
Posts: 65
Location: chennai

PostPosted: Tue Aug 14, 2007 4:43 am
Reply with quote

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
View user's profile Send private message
sasikumar1984

Active User


Joined: 02 Jul 2007
Posts: 109
Location: Chennai - India

PostPosted: Tue Aug 14, 2007 7:28 am
Reply with quote

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
View user's profile Send private message
infotech58

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Tue Aug 14, 2007 11:21 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Aug 14, 2007 6:08 pm
Reply with quote

You're welcome icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Tue Aug 14, 2007 7:10 pm
Reply with quote

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
View user's profile Send private message
infotech58

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Tue Aug 14, 2007 7:28 pm
Reply with quote

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
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Aug 14, 2007 7:35 pm
Reply with quote

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
View user's profile Send private message
infotech58

New User


Joined: 07 Jul 2005
Posts: 31
Location: Mumbai, INDIA

PostPosted: Tue Aug 14, 2007 7:59 pm
Reply with quote

Thanks Steve..
I will try it ..
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 Need help to resolve a hard edit COBOL Programming 8
This topic is locked: you cannot edit posts or make replies. Need help to resolve a hard edit COBOL Programming 4
No new posts How to resolve SYNCH15! & SYNCH16... Compuware & Other Tools 0
No new posts How to resolve sqlcode of CALL ATTACH... DB2 3
No new posts *MASTER* address space abending at IPL All Other Mainframe Topics 2
Search our Forums:

Back to Top