External Interfaces > Reality Java Interface > Extending the RSC Class > Calling the Subroutine-specific RSC Class

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

Calling the Subroutine-specific RSC Class (JReal) (calling_rsc.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

Calling the Subroutine-specific RSC Class

/* @(#) Main.java ver 1.0 00/08/21 14:43:49
 * ???.java, initial version May 2000
 *
 * Copyright (c) 2000 Northgate Information Solutions Plc.
 * All Rights Reserved.
import java.io.*;
import java.util.*;
import com.northgateis.reality.rsc.*;
/**
 * Main class demonstrating how a program can create an
 * instance of Sample to call RW.SAMPLE.
 *
 * @author Kevin Wright
 */
public class Main
{
    
   public static void main(String[] args)
   {
      System.out.println("Starting !!!");
      String host = "localhost";
      int port = 1203;
      String db = "pdb";
      String user = "klw";
      String account = "REALWEB";
      String[] result;
      RSCConnection reality;
      try
      {
         reality = new RSCConnection(host, port, db, user, account);
         reality.connect();
         System.out.println("Connection established to RSC Server");
         Sample sam = new Sample(reality);
         System.out.println("Created Sample object");
         result = sam.execute("param 1", "param 2");
     
         System.out.println("Executed");
         System.out.println(result[0]);
         System.out.println(result[1]);
         reality.disconnect();
      }
      catch (RSCException e)
      {
         System.out.println(e);
      }
      reality = null;
      System.out.println("Finished !!!");
    }
}

RealityV15.0Comment on this topic