Introduction
Searching and downloading a file (COBOL or EZT source, Cob copy Eztmac ,Proc, JCL) from mainframe, either for modification or for reference is a very tedious job. Many times we come across a situation where in for analyzing a particular job , we need to analyze related procs, programs, copybooks, parmcard , subroutines. To complete the analysis we need to go to different libraries and download respective file, which needs time as well as huge amount of patience.
Here comes into picture the need of Web based Interface of Mainframe
How to work smartly:
Web based Interface is a platform where in we can visualize different components pertaining to a job as a normal window file. With the presence of search box on the screen, there is no need of going to a specific library and searching a particular component. All you need to do here is give the requisite component name and the system will display all related components and the location where it is residing in mainframe. Not only is this, downloading these components for any kind of modification also, is just a matter of one click.
Why Web based? Why not Standalone tool?
Here is the answer!
No need to install any extra tool.
Work on normal browsers.
Easy maintenance.
Easy Updation
Easy to add security
Single point to access Mainframe.
How it works ?
This approach contain following modules.
Connectivity to Mainframe: To connect with mainframe we may use FTP.
PS : We are already using FTP connection to upload and download files from Mainframe.
This module will contain two sub-modules.
Front End: This is the Login screen. Here user needs to enter their username and password, and then system connects them to mainframe via FTP.
Back-End: This module will start working after successful login. It will generate different index file for different libraries used such as Proclib, Joblib, MITDEV, PROD etc. Index files for one particular library will contain all the files present in that respective library.
PS : These index file will be auto updated by user at a definite time interval .
How can we connect to FTP via programming language??
Once we are able to deal with the above issues, the next step is to establish a link to FTP via a programming language. Here is the solution:
FTPClient ftp = new FTPClient();
ftp.connect("ftp.domain.com");
ftp.login("admin", "secret");
How can we display the list of file from different area of Mainframe ??
Once we are done with establishing a link to FTP via a programming language, the next task is to list the file names from different regions of mainframes. Here is the solution:
// Change Mainframe directory
ftp.setDir("PROD0.JOBLIB");
/* Obtain a list of filenames in the current working directory. When
* no file found an empty array will be returned.
*/
String[] names = ftp.listNames();
for (String name : names)
{
System.out.println("Name = " + name);
}
Here is mock screen shot for login.

Search For File In Mainframe :
This module help user to search a file in mainframe using web based interface.
Here is mock screen shot for the Search.
Downloading File/Files :
After a successful search user will get a download link . After clicking on the link a popup appears asking “ Do you want to download related file ? ” In case user select ‘yes’ button then beside the particular file which was being searched , it also downloads all related file pertaining to that, else it downloads only the file which was being searched.
The next question which comes is how are we going to know all related file/files of a particular component.This problem is soved by parser which read download file/files and find out all related cobol sources, ezt sources, cobcopy, eztmac, production proc, parmcard etc and download it.
Upload File/Files :
We can also upload files in batch mode in different libraries and from different folder of local machine.
Here is mock screen shot for Upload.
Enhancement : We can also make a tool in such a way that it also copies related Data file/Files (VSAM) to working library for testing purpose.


No comments:
Post a Comment