This is demonstration code from Scott Klement's CALLING WATSON WITH RPG presentation.

It contains the following sources:

NOTE: Watson demos require HTTPAPI and YAJL. These must be installed and in your
      library list for the demos to work.  They are free (open source) software
      that you can download at the following links:
      http://www.scottklement.com/httpapi/
      http://www.scottklement.com/yajl/

NOTE: The last example (CLAIM15R/CLAIM15D) uses a Profound UI Rich Display GUI interface.
      This is commercial software from Profound Logic Software, Inc.  You can download a
      trial copy from http://www.profoundlogic.com

WATSONTR1R:  RPG source for Watson Translation (plain text)
WATSONTR1D:  DDS source for Watson Translation
WATSONTR2R:  RPG source for Watson Translation (JSON w/YAJL tree)
WATSONTR2D:  DDS source for Watson Translation
WATSONTR3R:  RPG source for Watson Translation (JSON w/DATA-INTO)
WATSONTR3D:  DDS Source for Watson Translation

WATSONKWR:   Watson Natural Language Undertanding Demo Search Program
WATSONKWD:   DDS source for display used by WATSONKWR
WATSONKW1R:  Demo of calling Watson Natural Language Understanding
WATSONKW2R:  Same as WATSONKW1R, but with DATA-INTO
AVLIST:      Physical file (table) for approved vendors
AVKEYWORDS:  Physical file (table) for keywords found by Watson

WATSONVR1R:  Example of training Watson for Insurance Claims
CLAIM01R:    Insurance Claim Program (original green-screen)
CLAIM01D:    Green-Screen (DDS) Display File for CLAIM01R
CLAIMSP:     Physical File (table) for insurance claims
CLAIMS2L:    Logical File (index) for insurance claims
CLAIM15R:    GUI Claims Program with Photos and Watson
CLAIM15D:    Rich Display File for CLAIM15R
CLAIM15OLD:  Same as CLAIM15R, but without DATA-INTO

IMPORTANT:  You will need to change each of these examples to use YOUR API KEY.  These are generated separately for EACH SERVICE (Language Translation, Natural Understanding, Image Recognition, etc) that you set up on IBM Cloud.  This is not the same as the userid/password you log into IBM Cloud, it is generated for each service you set up.  Once set up, put your API key into the code where indicated, and recompile it.

To run the INSURANCE CLAIM example, Watson must be trained.  the WATSONVR1R progam is provided to help you do that.  It will require these files:

BrokenWindshield.zip   = positive examples for the brokenwindshield class
FlatTire.zip           = positive examples for the flattire class
MotorcycleAccident.zip = positive examples containing motorcycles
Vandalism.zip          = positive examples of vandalism
Negatives.zip          = negative examples of all of the above

To use WATSONVR1R you must follow these steps:

1) Upload the ZIP files (do NOT unzip them) to your IFS.
2) Change WATSONVR1R to point to the appropriate IFS directory
3) Also change the API key in WATSONVR1R
4) Run it and wait for it to finish training (takes a long time)
5) Make note of the "classifier id" that it returns.  
6) Modify CLAIM15R (and/or CLAIM15OLD) to use the new classifier id.
