Guides you through the process of creating and configuring the 
                  		CWSJSON 
                  		enterprise server region, and installing and verifying resources. 
                  	  
               
            
 
            	 
            
               Start the Server Explorer
 
               		
                
                  		
                  The 
                     		  Server Explorer expandable ribbon is visible in Visual Studio on the top left side of the IDE by default when using 
                     		  Enterprise Developer. However, if it is not visible: 
                     		
                  
 
                  		
                   
                     		  
                     - In Visual Studio, click 
                        			 View > Server Explorer. 
                        		  
                     
  
               	 
              
            	 
            
               Create an 
                  		  enterprise server region
 
               		 
               		
               Here you use 
                  		  Enterprise Server to create an 
                  		  enterprise server region on which to run the Web service. 
                  		
               
 
               		
                
                  		  
                  - On the 
                     			 Server Explorer, expand 
                     			 Micro Focus Servers. 
                     		  
                  
- Right-click 
                        			 localhost; then select 
                     			 New Enterprise Server. 
                     		  
                  
- In the 
                     			 Name field, type 
                     			 CWSJSON. This is the name for the new 
                     			 enterprise server region. 
                     		  
                  
- Click the 
                     			 browse button that corresponds to the 
                     			 Template field, and navigate to the 
                     			 CICSWebServicesTemplate.xml file located in the 
                     			 ReverseJSON\ESTemplates project folder. 
                     		  
                  
- Double-click 
                     			 CICSWebServicesTemplate.xml. This populates the 
                     			 Template field. 
                     		  
                  
- On the list next to 
                     			 Associate with projects, check 
                     			 ReverseJSON. 
                     		  
                  
- Click 
                     			 OK. 
                     			 
                     The 
                        				Server Explorer should now show the 
                        				CWSJSON 
                        				enterprise server region listed under 
                        				localhost. 
                        			 
                      Note:  If 
                           				  CWSJSON doesn't immediately appear, right-click 
                           				  Micro Focus Servers; then select 
                           				  Refresh from the context menu. 
                        			 
                      
  
            	 
            
               Configure 
                  		  CWSJSON resources
               
 
               		 
               		
               All 
                  		  enterprise server regions require access to certain resources, depending on the types of applications they run. Resources that are defined on a region's
                  startup list are loaded during the startup routine, making them available for as long as the region is running. 
                  		
               
 
               		
               JSON CICS Web services use the underlying resources provided by the standard 
                  		  Enterprise Server CICS Web interface (CWI) and CICS Web Services (CWS) support. However, the resource definition file supplied with the project
                  does not include these resources; therefore, you need to add them manually. The CWI resources reside in a predefined resource
                  group named DFHWEB. The CWS resources are in the predefined DFHPIPE group. 
                  		
               
 
               		
               In addition, you need to create and define a resource group, 
                  		  CWSJSON, to contain the resources required by the 
                  		  reverse program. 
                  		
               
 
               		
                
                  		   
                  			 
                  - Start 
                     				Enterprise Server Administration 
                     			 
                  
-  
                     				
                      
                     			 
                  
- Start the 
                     				CWSJSON 
                     				enterprise server region 
                     			 
                  
-  
                     				
                      
                        				  
                        - On the 
                           					 Server Explorer, right-click 
                           					 CWSJSON; then select 
                           					 Start. 
                           					 
                           As the region is starting, the 
                              						Enterprise Server Administration 
                              						Home page should show log information in the region's 
                              						Status Log column. When the region is fully started, this is indicated in the region's 
                              						Status column. 
                              					 
                            Note: If this is the first time you have started the server, you see a sign-on dialog box. If 
                                 			 Server is secured is checked, uncheck it; then click 
                                 			 OK. Unchecking 
                                 			 Server is secured prevents this dialog box from showing when you subsequently start the region. If 
                                 			 Server is secured is not checked, simply click 
                                 			 OK to clear the dialog box. Also, if prompted to disable password recovery, click 
                                    				No. If a 
                              						Secure Storage prompt appears, click 
                              						No. 
                              					 
                            
 
- Start ES Monitor and Control (ESMAC) 
                     			 
                  
-  
                     				
                      
                        				  
                        - After 
                           					 CWSJSON has started, on the Administration 
                           					 Home page, click the 
                           					 Details button located in the 
                           					 Status column for the 
                           					 CWSJSON region. 
                           				  
                        
- On the 
                           					 Server > Control page, click 
                           					 ES Monitor & Control. This starts the ESMAC utility where you can edit the startup list. 
                           				  
                        
 
- Open the DEMOSTRT startup list 
                     			 
                  
-  
                     				
                      
                        				  
                        - On the 
                           					 ESMAC menu, click the drop-down list located under 
                           					 Resources; then select 
                           					 by Group. 
                           				  
                        
- Click 
                           					 Startup. This invokes a list of 
                           					 CICS Startup Lists in the right pane. 
                           					 
                           The 
                              						CWSJSON region uses the default startup list, named DEMOSTRT. 
                              					 
                            
- Click the 
                           					 Details button that corresponds to 
                           					 DEMOSTRT. This takes you to the 
                           					 CICS STARTUP - DEMOSTRT page. 
                           				  
                        
 
- Add resource groups 
                     			 
                  
- CICS Web Services are built on top of the CICS Web Interface (CWI) support, so you need to ensure that all CWS and CWI resources
                     are available. These reside in the DFHPIPE and DFHWEB resource groups respectively, which are already defined, but not included
                     in the startup list. Here you add these resource groups to the startup list. 
                     			 
                  
- In addition, you need to add a new resource group for the CICS provider resources named 
                     				CWSJSON. At this point, the 
                     				CWSJSON resource group is neither created nor defined. Those tasks are completed in the next few sections of this tutorial. 
                     				
                      
                        				  
                        - On the 
                           					 CICS STARTUP - DEMOSTRT page, scroll down to the end of the list and type 
                           					 DFHWEB into the empty field at the bottom; then click 
                           					 Apply. ESMAC adds the DFHWEB group, and adds another empty field at the end of the list. 
                           				  
                        
- In the new empty field, type 
                           					 DFHPIPE; then click 
                           					 Apply. 
                           				  
                        
- In the new empty field, type 
                           					 CWSJSON; then click 
                           					 Apply. 
                           				  
                        
 
- Create the 
                     				CWSJSON resource group 
                     			 
                  
-  
                     				
                      
                        				  
                        - On the 
                           					 ESMAC menu, click the 
                           					 Groups button located under 
                           					 Resources. 
                           				  
                        
- On the 
                           					 CICS Resource Groups page, click 
                           					 New. 
                           				  
                        
- In the 
                           					 Name field, type 
                           					 CWSJSON. 
                           				  
                        
- In the 
                           					 Description field, type 
                           					 CICS Web Services Provider Resources; then click 
                           					 Add. This invokes the 
                           					 CICS Group 
                           					 CWSJSON page where you can create and define resources for the group. 
                           				  
                        
 
- Define 
                     				CWSJSON resources 
                     			 
                  
- The 
                     				reverse program requires a resource for TCP/IP service, and a resource to support a pipeline. 
                     				
                      
                        				  
                        - On the 
                           					 CICS Group 
                           					 CWSJSON page, click 
                           					 TCPIPSv. 
                           				  
                        
- Complete these fields: 
                           					 
                           
                               
                                 						  
                                  
                                    							 
                                     
                                       								
                                       | Name | JSNTCPIP |   
                                       								
                                       | Description | My TCP/IP Service |   
                                       								
                                       | Port No | 5639 |  
 
 
- Click 
                           					 Add. 
                           					 Enterprise Server returns 
                           					 Add successful. 
                           				  
                        
- Click 
                           					 Apply. 
                           					 Enterprise Server returns 
                           					 Update successful. 
                           				  
                        
- Click 
                           					 Group List to return to the 
                           					 CICS Group 
                           					 CWSJSON page. 
                           				  
                        
- Click 
                           					 Pipeline. 
                           					 
                           Important: If the 
                              		Pipeline button is not present, check to be sure that you have properly installed the CCSID tables specified in the 
                              		Tutorials: CICS Web Services topic. 
                              	 
                            
- Complete these fields: 
                           					 
                           
                               
                                 						  
                                  
                                    							 
                                     
                                       								
                                       | Name | JSONPIPE |  |   
                                       								
                                       | Description | My CICS JSON Provider Pipeline |  |   
                                       								
                                       | Resp Wait | DEFT | This is the number of seconds that an application waits for a response from the service. DEFT indicates the default value,
                                          which is 10 seconds for HTTP and 60 seconds for MQ. |   
                                       								
                                       | Config file | $IDE_XML_LOC\jsonjavaprovider.xml | The IDE_XML_LOC environment variable in 
                                          								  CWSJSON points to the 
                                          								  xml project folder.1 |   
                                       								
                                       | WebSvc Dir | $IDE_LOADLIB\ | The IDE_LOADLIB environment variable points to the 
                                          								  loadlib project folder, which contains the WSBIND file.1 |   
                                       								
                                       | 1 To see a list of environment variables defined for 
                                             									 CWSJSON, from the 
                                             									 ESMAC menu, click 
                                             									 Env.Vars.. 
                                             								  
                                           |  
 
 
- Click 
                           					 Add. 
                           					 Enterprise Server returns 
                           					 Add successful. 
                           				  
                        
- Click 
                           					 Apply. 
                           					 Enterprise Server returns 
                           					 Update successful. 
                           				  
                        
- Click 
                           					 Home to return to the Administration 
                           					 Home page. 
                           					 
                           You can install the new resources by stopping and starting the region. 
                              					 
                            
- From the 
                           					 Server Explorer, right-click 
                           					 CWSJSON; then select 
                           					 Restart. This stops and then starts the 
                           					 CWSJSON 
                           					 enterprise server region, automatically installing and loading the newly added resources on the startup list. 
                           				  
                        
 
  
            	 
            
               Verify Resources
 
               		 
               		
               After 
                  		  CWSJSON is started, you can verify that the resources you have defined are installed and active. 
                  		
               
 
               		
                
                  		  
                  - From the 
                     			 Enterprise Server Administration 
                     			 Home page, start ESMAC for the 
                     			 CWSJSON region, just as you did in the previous section. 
                     		  
                  
- On the 
                     			 ESMAC menu, select 
                     			 Active from the drop-down list located under 
                     			 Resources. 
                     		  
                  
- On the 
                     			 ESMAC menu, click the 
                     			 WebSvc button. You should see the 
                     			 reverse Web service listed and marked as 
                     			 INSERVICE. 
                     		  
                  
- On the 
                     			 ESMAC menu, click 
                     			 Pipeline; then click the 
                     			 Details button that corresponds to 
                     			 JSONPIPE. The Pipeline resource sets the response wait period, identifies the JSON configuration file, and the Web Service directory.
                     
                     		  
                  
- On the 
                     			 ESMAC menu, click 
                     			 URIMap; then click the 
                     			 Details button that corresponds to 
                     			 PIPELINE and 
                     			 /cics/services/reverse. 
                     			 
                     Enterprise Server generates URIMAPs to provide CICS with the information it needs to process requests. The name of each generated URIMAP begins
                        with a pounds sterling symbol (£). 
                        			 
                      To run your provider CICS Web service, you send a JSON request to an endpoint URL that routes the request to your 
                        				enterprise server region. The endpoint URL contains a URI value. The incoming request reads the installed URIMAPs to identify the map whose 
                        				Path value matches the 
                        				URI value of the endpoint URL. When the correct URIMAP is identified, CICS uses the data defined in the URIMAP, such as the name
                        of the 
                        				Web Service and its associated 
                        				Pipeline, to process the request. 
                        			 
                      
- Close 
                     			 Enterprise Server Administration.