*********************************************************************************
*  This sample shows how to connect to an RDBMS without having to have
*  the credentials visible on a properties file.
*
*  There is one program to save the credentials to a JISAM file, where the password
*  is saved encrypted (savedbcredentials.cbl) and there is a program to show how
*  to proceed with the connection after reading the credentials from that JISAM file
*  and decrypting the password (dbconnect.cbl). 
*
*  This document uses Windows notation for paths, change it to Unix notation
*  when testing this on Unix/Linux 
*
*  This document assumes the %iscobol% environment variable exists and points 
*  to the isCOBOL SDK installation folder.
*
*  When talking about a "command prompt window" it means an isCOBOL Shell
*  on the Windows OS and a standard shell on Linux/Unix
*
*  On Windows it's better if you run the isCOBOL Shell as administrator.
*
*  This sample uses Oracle JDBC settings, however the same can be used with any other
*  RDBMS by replacing those JDBC settings with the ones recommended on our documentation
*  for each of the most popular RDBMS.
*
*********************************************************************************

1) Copy the 2 source programs on a temporary test folder

2) Using a command prompt window go that temporary folder

3) Include the full path to the Oracle JDBC driver in the classpath environment variable. Example:

	set classpath=C:\path\to\the\oracle\jdbc\driver\ojdbc6.jar;%classpath%
	
4) Change the program dbconnect.cbl to use the actual username you want to connect to the DB with. Change the following line.

    move "orauser1" to db-user

5) Compile the programs.

	iscc -sp="%iscobol%\sample\isdef" *.cbl

6) Run the savedbcredentials program to save the user and password (encrypted) on a JISAM file.
   (provide your actual user and password on the arguments to the program)

	iscrun savedbcredentials username password 

7) Run the program to connect to the DB

	iscrun dbconnect



