Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Job abending on Holidays- How to Resolve.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Job abending on Holidays- How to Resolve.
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    Post subject:
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

Site Director


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

PostPosted: Mon Aug 13, 2007 11:49 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Aug 14, 2007 12:20 am    Post subject:
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    Post subject:
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    Post subject: Re: Job abending on Holidays- How to Resolve.
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    Post subject: Re: Job abending on Holidays- How to Resolve.
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

Site Director


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

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

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

Senior Member


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

PostPosted: Tue Aug 14, 2007 7:10 pm    Post subject:
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    Post subject: Re: Job abending on Holidays- How to Resolve.
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    Post subject:
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    Post subject: Re: Job abending on Holidays- How to Resolve.
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts How to resolve IMS DB status code FM Priyanka Boga IMS DB/DC 3 Fri Jun 10, 2016 1:54 pm
No new posts how to Resolve SQL Error Code -924 Rajesh3825 ABENDS & Debugging 2 Thu Dec 10, 2015 2:39 pm
No new posts Exclusion of US Holidays in 'Cancella... apandey COBOL Programming 5 Fri Sep 18, 2015 3:34 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us