To Execute this Example
To use this example with no remote tiers (ie: as a standalone application) simply compile VSAM141 and VSAM142 on your workstation.
These functions can now be executed using a local DBMS.
VSAM141 can also be used in a thick client mode by using the PSxx= command line parameters so as to establish a LANSA super-server connection to a remote DBMS.
However, if you use VSAM141 in thick client mode and then submit VSAM142 to batch, note that VSAM142 itself does NOT connect to the remote DBMS and that it updates the local DBMS at all times.
This happens because VSAM142 does not inherit the PSxx= parameters of the function that submitted it (ie: VSAM141).
Regardless of how the Tier Configurator VL_SAM134 is used these functions continue to act in the same way because they do not posses any dynamic tier awareness.
Adding Tier Awareness to Existing Applications | The Things that Make Up this Example |
Local Execution (No Remote Tiers)
To use this example with no remote tiers (ie: as a standalone application) simply compile VSAM141 and VSAM142 on your workstation.
These functions can now be executed using a local DBMS.
VSAM141 can also be used in a thick client mode by using the PSxx= command line parameters so as to establish a LANSA super-server connection to a remote DBMS.
However, if you use VSAM141 in thick client mode and then submit VSAM142 to batch, note that VSAM142 itself does NOT connect to the remote DBMS and that it updates the local DBMS at all times.
This happens because VSAM142 does not inherit the PSxx= parameters of the function that submitted it (ie: VSAM141).
Regardless of how the Tier Configurator VL_SAM134 is used these functions continue to act in the same way because they do not posses any dynamic tier awareness.
Thick Client Execution (Remote DATA Tier)
To introduce basic tier awareness to this example you need to:- Compile VSAM143 and VSAM144 on your system
- Execute the Tier Configurator VL_SAM134 and make sure that you have this tier configuration:
System | Valid Connection Details Are Required | APPL Tier | DATA Tier | PRINT Tier | BATCH Tier |
Default Client | No | System Itself | Default iSeries | System Itself | System Itself |
Default iSeries | Yes | System Itself | System Itself | System Itself | System Itself |
- Close the Tier Configurator VL_SAM134.
- Modify your profile file to indicate that functions VSAM143 and VSAM144 should always be used as INIT= and TERM= functions. To do this look for a file named X_LANSA.PRO in your <drive>:\x_win95\x_lansa\x_ppp directory (where "ppp" is the partition that you are using).
- Use NOTEPAD to edit (or create) the X_LANSA.PRO file. Add lines that specify the X_RUN command default values INIT=VSAM143 and TERM=VSAM144 like this:
- Close and save file <drive>:\x_win95\x_lansa\x_ppp\X_LANSA.PRO
Note : The instant you save this change to X_LANSA.PRO every LANSA application that you attempt to execute will become tier aware. - Now execute function VSAM141 (without any PSxx= command line parameters). It should connect to and use the remote DATA tier implemented on the default iSeries system.
- Submit VSAM142 to batch. It should connect to and update the DATA tier on the default iSeries system.
- You may choose to leave the X_LANSA.PRO profile file settings in place and alter the tier configurations by using the Tier Configurator VL_SAM134.