| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Nivasaya Beginner
 
 
 Joined: 11 Oct 2005
 Posts: 4
 Topics: 1
 
 
 | 
			
				|  Posted: Tue Oct 11, 2005 12:28 am    Post subject: Automation for JCL without using scheduler. |   |  
				| 
 |  
				| Hi all, 
 I have a JCL which takes the backupof our working PDS, i run this JCL whenever required. I need to automate it without using any scheduler to take backup's on pre planned days like daily or one in two days or once in a week. when the project is over we need to stop taking backup's.
 Inbetween we need to change the frequency also.
 
 Also conform whether we can use any REXX / CLIST to achieve the same.
 
 Thank you all,
 Regards,
 Nivasaya.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Phantom Data Mgmt Moderator
 
  
 
 Joined: 07 Jan 2003
 Posts: 1056
 Topics: 91
 Location: The Blue Planet
 
 | 
			
				|  Posted: Tue Oct 11, 2005 1:07 am    Post subject: |   |  
				| 
 |  
				| Nivasaya, 
 
  	  | Quote: |  	  | Also conform whether we can use any REXX / CLIST to achieve the same.
 
 | 
 
 Yup...You got the answer.  You can do this easily with a little modification to your logon script.  Open your REXX/CLIST which is used during logon to allocate user libraries.
 
 1.  Get the current Date.
 2.  You must have stored the last used date in your profile (use VGET & VPUT) to store the last backup date.
 3.  If (Current Date - Last backup Date) = 1 week, then submit a JCL from REXX to take the backup.
 4.  Code necessary logic to have any other custom frequencies.
 
 Hope thsi helps,
 
 Thanks,
 Phantom
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Nivasaya Beginner
 
 
 Joined: 11 Oct 2005
 Posts: 4
 Topics: 1
 
 
 | 
			
				|  Posted: Fri Oct 14, 2005 1:57 am    Post subject: Automation for JCL without using scheduler |   |  
				| 
 |  
				| Thanks a lot Phantom. 
 Let me try it out the idea.
 
 if u have any sample for the same please send it across.
 
 Thanks & Regards,
 Nivasaya
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Ravi Beginner
 
 
 Joined: 27 Jun 2005
 Posts: 88
 Topics: 2
 
 
 | 
			
				|  Posted: Tue Oct 18, 2005 6:11 pm    Post subject: |   |  
				| 
 |  
				| This is a Different approach. Thanks to my Guide/Colleague  Frank. 
 If you are using Window OS then Open your control panel
 1. Click START/SETTINGS/CONTROL PANEL
 >>> Scheduled Tasks
 >>> Add Scheduled Task
 >>> Click Next
 >>> Select Command Prompt as application and Click Next
 >>> Give the task name (Ex: My PDS Backup) & Select any of the Radio buttons (Daily/Weekly/Monthly...) Click Next
 >>> Give the time and any other options if weekly/monthly is selected.
 >>> Give your network/lan/windows userid&pwd if asked.
 >>> Check the Advanced Options Box.
 >>> Now in the RUN give "c:/anywhere/MVSForums/ftpjcl.bat" and press OK.
 
 If you are not sure then check with you windows documentation on "Schedule a new task".
 
 Create the below 3 files.
 1. ftpjcl.bat
 2. ftpserver.txt
 3. jcl.txt
 
 Say in your local directory.
 c:/anywhere/MVSForums
 
 1. ftpjcl.bat
 
  	  | Code: |  	  | @echo off ftp -s:ftpserver.txt
 | 
 2. ftpserver.txt
 
  	  | Code: |  	  | open MainframeServer username
 password
 quote site file=JES
 put jcl.txt
 quit
 | 
 3. jcl.txt
 
  	  | Code: |  	  | .. your Jobcard
 //*
 //* DUMMY JOB
 //*
 //STEPNAME EXEC PGM=IEFBR14
 //*
 //DDNAME   DD DUMMY
 | 
 
 This will do the same similar to your scheduler. You have control on your own.
 
 Hope this helps.
 
 Cheers
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |