Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

ShivKumarShiv Yadav

Greenhorn
+ Follow
since May 03, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ShivKumarShiv Yadav

Thanks Tim for your explaination. Could you please provide me rough sample code so that i can start the program. Just to remind i want to connect to TSO mainframe and and retrieve dataset value form the mainframe.
3 years ago
I am new to java i want to know how to connect to mainframe TSO using java...I got this from somewhere but don't know whats happening here...explanation will highly appreciated...


public FTPClient openFTPConnection() {
   String server = [server];
   int port = [port];
   int reply;
   FTPClient ftpClient = new FTPClient();
   ftpClient.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)));
   try {
       ftpClient.connect(server, port);
       reply = ftpClient.getReplyCode();
       System.out.println(reply);
       if (!FTPReply.isPositiveCompletion(reply)) {
           System.out.println(reply);
           ftpClient.disconnect();
           throw new Exception("Exception in connecting to FTP Server");
       }
       ftpClient.login(user, pass);
       ftpClient.setFileType(FTP.EBCDIC_FILE_TYPE);
       //Previously, this was set to FTP.ASCII_FILE_TYPE
       ftpClient.enterLocalPassiveMode();
   } catch (Exception e) {
       System.out.println("Error: " + e.getMessage());
       e.printStackTrace();
   }
   return ftpClient;
}
public List ftpStoreAuthData(FTPClient ftpClient) {
   try {
       String mainframeDataSet = [dataset];
       InputStream stream = ftpClient.retrieveFileStream(mainframeDataSet);
       logger.trace("Retrieving mainframe data set...");
       BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "cp037"));
                                                  //Previously, this was set to "utf-8"
       logger.trace("Data set Retrieved!");
       String datasetText;
       while((datasetText = reader.readLine()) != null) {
            //do things with dataset records
       }
       return new ArrayList<>();
   }
3 years ago
I want a java program that connects to Mainframe system using TSO and fetch the values from the mainframe dataset and store it in a text file.
3 years ago