Load the HostBridge Redis Sample Database to your machine
To download the installation files and transfer them to the host:
- Download the HostBridge for Redis sample database package by saving the following attachment to your PC: Redis_Zipcode_Example.zip
Unzip the installation package to a directory on your desktop.
Transfer the unzipped files to the host using FTP as follows:
File Name On Desktop
|File Name on Host (or create your own names)||Transfer Type||Record Format (RECFM)||Record Length (LRECL)||Block Size (BLKSIZE)||Space Needed (in tracks)|
Unpack the installation files
To unpack the installation files,
- From the TSO option 6 panel, issue the following command: TSO RECEIVE INDSNAME('YOUR.REDIS.DATA.ZIPXMT') and press the Enter key.
- When prompted for restore options, enter DSNAME('YOUR.REDIS.DATA.ZIP') and press the Enter key - the sequential file will be created.
- From the TSO option 6 panel, issue the following command: TSO RECEIVE INDSNAME('YOUR.REDIS.LIBRARYU.XMT') and press the Enter key.
- When prompted for restore options, enter DSNAME('YOUR.REDIS.LIBRARYU') and press the Enter key - the library will be created.
The names of the input and output files can be changed to conform to your naming standards.
You will need approximately 152 tracks of space for the 2 sequential data sets and one library created above. You do not have to preallocate the space: the RECEIVE command will do it for you.
Create a Redis Sample Database
- Ensure that Redis has previously been properly installed.
- Edit the job YOUR.REDIS.EXAMPLE.JCL, changing the JOB card and data set names to conform to your installation standards.
- Change the ip-address/hostname and port definitions to conform to your currently running Redis instance.
- Submit the job; a return code of zero indicates a successful execution. If you receive a return code of other than zero, contact HostBridge Support.
- This job creates a Redis hash database of all of the valid zip codes in the US (42000+), with a key field of ziptable and other fields of city, state and county.
Install the Redis Client Command Line Software
- If you previously installed the Redis Client Command Line Software when you installed Redis, you can skip this step. If not:
- Download the Redis-2.8.17 client package by saving the following attachment to your PC: Redis_Client.zip
Unzip the downloaded file and store the unzipped files (which should all be in folder redis-2.8.17) on your PC.
Run the Sample Database Verification Procedure
- Click the Windows icon on your toolbar, and you should see:
- In the search commands and files box, type cmd and press the Enter key. You should see:
- Navigate to the redis-2.8.17directory that was unzipped in the prior step by using the cd command. You should see:
- Enter the following command: redis-cli -h your-mainframe-ip-or-domain -p your-port-number where your-mainframe-ip-or-domain is the IP address or domain name that you use to access your mainframe from outside, and your-port-number is the port number defined in the Redis configuration file (default of 6379). When the request is issued by pressing the Enter key, you will see the following:
- Enter the command hmget ziptable:74074 county and press the Enter key. You should see the following:
- Enter the command hgetall ziptable:74074 and press the Enter key. You should see the following:
- Enter the command quit and press the Enter key. You should see the following:
- Enter the exit command to exit the command protocol.
If at any time you receive a response other than the one indicated in the example output above, check the syntax of the commands that you entered and try again. If the problem persists, you should contact HostBridge Support.
You have now successfully completed the installation HostBridge Redis for zOS sample database. You can get further information about the various Redis commands by visiting the website http://redis.io/documentation.