1. Overview
2. What the program does
3. How the program works
4. Setting up the batch
5. Setting up the automation file backup
6. Usage
6.1 Manual Run
6.1 Automated Run
Program Name: Automated Backup Program
Program Location: open directory
Created on: January, 2010
Last updated on: July, 2011
Author: Victor Diaz
This program has been developed to maintain a central repository of client documentation created by specialists.
But anyone who follows the naming conventions required by this program can use it as well.
The main purpose of this project is to backup documents with little or no intervention from the user.
The information can be retrieved from local or network drives and it is saved into a central network server.
The application also performs joblog analysis.
This application scans your files and folders and extracts files that meet certain criteria. The criteria can be changed, expanded, be more specific, be vaguer, etc. to suit user needs.
In its current state, two conditions must be met to back up your files using this application.
1. File naming conventions like *PRD*.xls and PTCBM*.txt only.
2. File size not greater than 1 MB for client documentation and not greater than 5 MB for mainframe job logs.
Client documentations that are bigger than 1 MB will be excluded. Mainframe job logs that are bigger than 5 MB will be excluded.
As an example, from the image below, the application will scan directories until the directory tree is exhausted and it will only extract the files circled in green. The rest of the files are ignored.
This application has also been expanded to include job log analysis as well.
Mainframe job logs are analyzed and separated into various groups depending on requirements, Currently, the program separates PTCBM joblogs on PC into three groups or output files:
a) JCL Code
b) Condition Codes
c) Dataset Names
Example
Given a job log file (PTCBM…TXT), the program will extract data that corresponds
to JCL code, Condition Codes and Dataset names that have been used for this particular
job log. See picture below.
a) JCL Code
This output file contains the JCL. This is useful if the user needs to study the JCL that is involved in the process.
Sample File
b) Condition Codes
This output file contains the Condition Codes. The report lists all the condition codes per jobname, step_name, and procedure_name of the JCL involved in the process. It also displays at the bottom of the report, the maximum condtion code return. All the condition codes must be zero, or something went wrong in the process. If any condition is different than zero, then it is displayed in this area giving us a quick feel of how the process went.
Sample File
c) Dataset Names
This output file contains the datasets. Same as b) Condition codes above but with datasets instead of codition codes. This part lists all the datasets per jobname, step_name, and procedure_name of the JCL involved in the process.
Sample File
The SOURCE_DIRECTORY variable in this script holds the name where you store your documentation. This directory can be anything from a high-level to a low-level path. It can also be repeated several times to save from different locations.
The SERVER_LETTER variable holds the letter where you mapped the new \\yyzeisfile1\Database Solutions server.
This variable is required since some windows systems do not support UNC paths in the command prompt.
1. To backup a single directory
Update the SOURCE_DIRECTORY and SERVER_LETTER variables as shown below
rem *--------------------------------------------------------------------*
rem * update only the following variables *
rem *--------------------------------------------------------------------*
set source_directory=C:\victor
set server_letter=Z
rem *--------------------------------------------------------------------*
...
2. To backup multiple directories
Rename the SOURCE_DIRECTORY variable to a unique name and update the SERVER_LETTER variables as shown below.
Then repeat the java line of code for as many directories you are setting up.
rem *--------------------------------------------------------------------*
rem * update only the following variables *
rem *--------------------------------------------------------------------*
set source_directory1=C:\victor\specialist
set source_directory2=C:\victor\programming
set server_letter=Z
rem *--------------------------------------------------------------------*
...
java equifax.backup.BackupClient %source_directory1%
java equifax.backup.BackupClient %source_directory2%
...
The automation part of this project requires the Windows Task Scheduler service to be running on you computer.
Ensure this service is running. If not start it.
Go to START > CONTROL PANEL > SCHEDULED TASK and then
double click on the Add Schedule Task icon. Click on the NEXT button.
On the next window, click on the BROWSE button and search for your DOS batch script
(the one you set up in the previous step)
Follow the instructions to complete this setup.
Manual Run
1. Double click your DOS batch script
2. Right click your new Schedule Task icon under SCHEDULED TASK
and then select RUN
Automated Run
No user intervention required.
Enjoy 🙂