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
 

 

Backup and Delete Dataset on Every 200th Calander Day

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ksk

Active User


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

PostPosted: Thu Apr 10, 2008 12:32 pm    Post subject: Backup and Delete Dataset on Every 200th Calander Day
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: 356
Location: New York

PostPosted: Thu Apr 10, 2008 1:52 pm    Post subject:
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    Post subject: Reply to: Backup and Delete Dataset on Every 200th Calander
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: 356
Location: New York

PostPosted: Thu Apr 10, 2008 2:17 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 10, 2008 2:19 pm    Post subject:
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    Post subject: Reply to: Backup and Delete Dataset on Every 200th Calander
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: 356
Location: New York

PostPosted: Thu Apr 10, 2008 3:26 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

Hi

I got this from
http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm


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