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

Backup and Delete Dataset on Every 200th Calander Day


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu Apr 10, 2008 12:32 pm
Reply with quote

Hi,

I have 5 steps in my Job and the output of 5th step (i.e. last step) will have disposition MOD as we want to append records to the output dataset everyday.

My requirement is on the 200 calender day, this dataset should be copied into GDG and deleted (so, on very 200th calander day(i.e, 200,400,...), this backup and delete step should be executed). Can we do this in the same JCL using DFSORT?

Regards,
KSK
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu Apr 10, 2008 1:52 pm
Reply with quote

Adding to the above, output of 5th step file contains "Current Date" colomn also. So, every day Current date is added to each record of the file.

Is there any way to do the above requirement from initial date and current date using DFSORT?
Back to top
View user's profile Send private message
Anu R

New User


Joined: 09 Apr 2008
Posts: 18
Location: India

PostPosted: Thu Apr 10, 2008 2:12 pm
Reply with quote

Hi Ksk,

Please provide more information as to what is the format of the date in the file.Whether it is Julian or gregorian.And whether the initial date has to be taken from the file or can it be hardcoded?
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu Apr 10, 2008 2:17 pm
Reply with quote

Format of the file in the input file is YYYYMMDD. Initial date also extracted using CURRENT DATE function only. Everyday when job runs, current date would be extracted.

So, if job runs 200 calendar days back, the value of that colomn would be 200 days back date and as job is running daily, today it would extract today's date as Current Date.

Let me know if you are not clear.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 10, 2008 2:19 pm
Reply with quote

Sounds like a job for the scheduling software to handle.

Are we talking total days or working days here ?

Either way the scheduling SW can schedule jobs every nnn days using either the everyday or working days calender.
Back to top
View user's profile Send private message
Anu R

New User


Joined: 09 Apr 2008
Posts: 18
Location: India

PostPosted: Thu Apr 10, 2008 2:39 pm
Reply with quote

Ksk,

Can you explain it with an example so that I can understand it better.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu Apr 10, 2008 3:26 pm
Reply with quote

Expat,

We can schedule if we write a new job for backup and delete. Can we write this step in the same job after STEP5?

I am talikng about total days.
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Thu Apr 10, 2008 4:10 pm
Reply with quote

Hi KSK,

I am not sure why you want to do this in same job.But here is solution you can follow to achieve what you want.

step 6 : in your JCL

You can write a program (cobol/ rexx or any language ) read the file.check the date in file and date of 200th day of year and set the return code to 1000 ( any value).
Step 7:
Depending on the return code execute backup job and delete input file.

I am not sure how this can be done in DFSORT.


Thanks,
Santosh.
Back to top
View user's profile Send private message
jayreddy

New User


Joined: 07 Apr 2008
Posts: 10
Location: Mumbai

PostPosted: Fri Apr 11, 2008 4:09 pm
Reply with quote

Hi

I got this from
www-304.ibm.com/systems/support/storage/software/sort/mvs/peug/pdf/sortpeug.pdf

I think you can use Past date or Future date as the decimal number in the COND statement.

eg formats :
Format of Operand Format of Constant Ex of Operand Ex const
Date3p+d +YYYYDDD Date3p+200 +2008302
if you take your job runs today 2008 11 april as current date and then after 200 days it should be 302 day in the year.

I think you can keep your Date3p+200 in the Cond and execute your backup and delete steps.
Regards
Jay
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top