Hi Mark,

I'm currently fixing the XML in line with point 3. What server can I test on? I'm currently testing on D2:2820 and I get the message "Child element <reslib> with wrong parent".

I also have a question regarding reslibs. In point 3, reslibs are included in all of the XML. In the plugin, for whatever reason, reslibs are only available for DLI configuration. Should it be available regardless of BMP or DLI?



From:	Mark Hughes/Australia/IBM
To:	King-Yan Kwan/Australia/IBM@IBMAU
Cc:	Mohammad Zanjani/Australia/IBM@IBMAU, Travis K Thorne/Australia/IBM@IBMAU
Date:	29/11/2016 16:19
Subject:	APAR PI67096 - Required FM/IMS plug-in changes 


Hi Andrew,
This is my first draft of the required changes to the FM/IMS plug-in.
You will probably need to talk to me after you've read it.
Regards Mark.
 
1.   Added support for two new functions:
VDBD
VDBD validates your database selection.
Modify the plug-in code, to invoke VDBD after the user does any of the following:
Double-clicks a database node
Selects the Formatted Editor, Template Editor, Extract Wizard or Print Wizard 
from the context menu after right-clicking a database node
Specifies a database name on the IMS Editor, IMS Template Editor, IMS Extract Wizard or IMS Print Wizard pop-up.  
Required parameters:
IMSID=subsystem name
DBDMEM=database name
FUNCTION=
IE	Edit
IB	Browse
XTPED	Template Editor
IXB	Extract
IPR	Print
VDBD passes back a return code of zero, if the database is a valid selection, or a nonzero return code and an error message,
if it is not a valid selection.
Note: To support being able to differentiate between Edit and Browse, the Formatted Editor option on the context menu will need to be replaced by two options - an Edit option and a Browse option.
VPSB
VPSB validates your PSB selection.
Modify the plug-in code to invoke VPSB after the user does any of the following:
Double-clicks a PSB node
Selects the Formatted Editor, Template Editor, Extract Wizard or Print Wizard 
from the context menu after right-clicking a PSB node
Specifies a PSB name on the IMS Editor, IMS Extract Wizard or IMS Print Wizard pop-up.  
Required parameters:
IMSID=subsystem name
PSBMEM=PSB name
FUNCTION=
IE	Edit
IB	Browse
IXB	Extract
IPR	Print
VPSB passes back a return code of zero, if the PSB is a valid selection, or a nonzero return code and an error message,
if it is not a valid selection.
Note: To support being able to differentiate between Edit and Browse, the Formatted Editor option on the context menu will need to be replaced by two options - an Edit option and a Browse option.

2.   Currently these functions support the FUNCTION parameter:
      LDBD, PCBL, PCBN
      And I have added FUNCTION parameter support to LDDS and SSOP.
      Modify the plug-in code to specify the FUNCTION parameter wherever these functions are invoked.
      As for the VDBD and VPSB functions, these are the values you should specify:
      IE		Edit
      IB		Browse
      XTPED	Template Editor
      IXB		Extract
      IPR		Print 
      Note: XDBDL also supports the FUNCTION parameter, but often this function is invoked before the user has selected the function, so for the time being,
      do not modify the XDBDL calls.

3.   A lot of the XML that the plug-in sends to the host is not required.
Ordinarily, this doesn't cause any problems - the host validates it but doesn't use it.
If, however, the data is invalid, the host issues an error message and the function fails.
So we need to modify the client to only send the data that the host requires.
So far, I have only analysed the IMSssid XML. 
I started with the IMSssid XML because a customer has reported a problem with it.
The rest of the IMS XML will be examined at a future date.

Here are the functions that use the IMSssid XML to send data to the host:
XDBDL, LDBD, XPSBL, PCBL, PCBN, LDDS, SSOP, IE, IB, IXB and IPR.

Here is the IMSssid XML:
<IMSssid>
   <ssid name= status= ver= dir= BMPread= DLIread= BMP_PSBtype= DLI_PSBtype= REGtypes= AGN= DYNALLOC= iefrder= timeout=  
         chkpmmss= desc= >       
      <agnt name= desc= />             
      <dliupd dynb= dbrc= irlm= logusage= irlmname= gsgname= tminame= buf= lockmax= autosave= editf= crall= load= beditf= 
              PSBbr= PSBex= PSBpr= PSBbb= /> 
      <dli    dynb= dbrc= irlm= logusage= irlmname= gsgname= tminame= buf= lockmax= autosave= editf= crall= load= beditf= 
              PSBbr= PSBex= PSBpr= PSBbb= dyndd= >                 
         <dfsvsamp upd= dsn= mbr= /> 
         <reslib upd= dsn= />             
         <imsmac upd= dsn= />
         <recon upd= prim= sec= spare= />          
         <acblib upd= dsn= />  
         <logdsn upd= val= />
      </dli>         
      <bmpupd pardli= nba= oba= lockmax= autosave= editf= crall= load= beditf= PSBbr= PSBex= PSBpr= PSBbb= />             
      <bmp    pardli= nba= oba= lockmax= autosave= editf= crall= load= beditf= PSBbr= PSBex= PSBpr= PSBbb= /> 
      <psblib upd= dsn= /> 
      <dbdlib upd= dsn= /> 
      <tpllib upd= dsn= />    
      <log  unit= prim= sec= mclass= sclass= dclass= devt= />   
      <xkey unit= prim= sec= mclass= sclass= dclass= devt= />          
      <lkey unit= prim= sec= mclass= sclass= dclass= vol1= vol2= vol3= /> 
      <rkey unit= prim= sec= mclass= sclass= dclass= vol1= vol2= vol3= /> 
   </ssid> 
</IMSssid>                        

The elements and attributes in red are used when sending data to the plug-in. The plug-in functions should not be sending this data back to the host.

Andrew's notes:
	The reslib tag needs to be inside a dli tag

Here is what the XDBDL and LDBD functions should send to the host:
If dir=N, they should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
           <dbdlib dsn= />
      </ssid>
</IMSssid>
If dir=Y, they should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
      </ssid>
</IMSssid>

Here is what the XPSBL and PCBL functions should pass to the host:
If dir=N, they should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
           <psblib dsn= />
      </ssid>
</IMSssid>
If dir=Y, they should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
      </ssid>
</IMSssid>

Here is what the PCBN function should send to the host:
If dir=N, it should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
           <psblib dsn= />
           <dbdlib dsn= />
      </ssid>
</IMSssid>
If dir=Y, it should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
      </ssid>
</IMSssid>

Andrew's notes:
	The recon tag also needs to be in a dli tag

Here is what the LDDS function should send to the host:
If the database is a HALDB and dir=N, it should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
           <dbdlib dsn= />
           <recon prim= sec= spare= /> 
      </ssid>
</IMSssid>
If the database is a HALDB and dir=Y, it should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
           <recon prim= sec= spare= />
      </ssid>
</IMSssid>
If the database is not a HALDB and dir=N, it should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
           <dbdlib dsn= />
      </ssid>
</IMSssid>
If the database is not a HALDB and dir=Y, it should send:
<IMSssid>
   <ssid name= >
           <reslib dsn= />
      </ssid>
</IMSssid>

4.   Add a "Fetch DB dsnames from" option to the IMS Editor, IMS Extract Wizard and IMS Print Wizard pop-up.
     The options are to get it from the User profile or the DFSMDA members. If the latter option is selected, then
     the DFSMDA parameter on the LDDS call should be set to YES. Currently the DFSMDA parameter is set to 
     YES, if DYNALLOC=Y  
    



