In Type 2 XAE databases, all systems participating in a Sysplex share the same view of the database. If one system updates a variable, that variable is updated in the view that is accessible by each of the other systems in the Sysplex. Resolving an XAE Type 2 database variable is the same as for a standard database, except that more than one system can update the same variable. For example, if system A updates a database variable and then system B attempts to resolve that same variable in a statement, the value of the variable accessed by system B is the value as updated by system A.
Note: Resolution of an XAE AutoEdit expression is synchronous with the execution of the rule.
Example 1
This example demonstrates a new syntax expression that can be written to resolve variables in XAE Type 1 databases located in a different system.
This expression is %%systemname\poolname\variable(column)name.
Figure 245 Using an XAE AutoEdit Variable Database - Example 1
/*
/* SHOUT A VAR WITH STYLE %%SYSTEMNAME\POOLNAME\VARIABLE
/*
DO SHOUT = TO OPER URGENCY R SYSTEM CTO282I
MESSAGE XES XAES1D01 SHOUTING A VARIABLE WITH STYLE SYSTEM\POOL\VAR
/* SET THE ROW NUMBER TO 2
DO SET = %%$DBROW = 2 GLOBAL N
/* THIS STATEMENT CHANGES THE DEFAULT CPU TO OS33
DO SHOUT = TO OPER URGENCY R SYSTEM CTO282I
MESSAGE OS33\XAES1D01\S1D01C01 = %%MYSYS\MYDB\MYCOL
/*
Example 2
By setting %%$AUTOSYS to OS35, the XAE Type 1 database variables are resolved by values retrieved from the OS35 system (although the default executing system is, for example, OS33).
Figure 246 Using an XAE AutoEdit Variable Database - Example 2
/*
/* SHOUT FROM CPU OS33 THE DATABASE CONTENTS FOR OS35
/*
DO SHOUT = TO OPER URGENCY R SYSTEM CTO282I
MESSAGE XES XAES1D01 OS33 SHOUTING DATABASE IN OS35
DO SET = %%I = 0 GLOBAL N
DO SET = %%X = %%$DBCOUNT GLOBAL N
/* CHANGING THE DEFAULT SYSTEM TO OS35
DO SET = %%$AUTOSYS = OS35 GLOBAL N
WHILE %%I LT# %%X
DO SET = %%I = %%I %%$PLUS 1 GLOBAL N
DO SET = %%$DBROW = %%I GLOBAL N
DO SHOUT = TO OPER URGENCY R SYSTEM CTO282I
MESSAGE S1D01C01-5 = %%S1D01C01 %%S1D01C02 %%S1D01C03 %%S1D01C04 %%S1D01C05
ENDWHILE
DO SET = %%X = %%$DBCOUNT GLOBAL N
/* CHANGING THE DEFAULT SYSTEM BACK TO OS33
DO SET = %%$AUTOSYS = OS33 GLOBAL N
/*
Example 3
%%$SYSPCPUCOUNT, %%$SYSPCPU, and %%$SYSPCPUNAME are used to enable the browsing of the XAE Type 1 database contents in the other systems. An outer loop is performed for each system; the inner loop displays the content of the database variables of that system.
Figure 247 Using an XAE AutoEdit Variable Database - Example 3
/*
/* SHOUT ALL THE VARIABLES IN ALL PARTNER SYSTEMS
/*
/* OUTER LOOP
/*
DO SET = %%Y = 0 GLOBAL N
WHILE %%Y LT# %%$SYSPCPUCOUNT
DO SET = %%Y = %%Y %%$PLUS 1 GLOBAL N
/* EXTRACT THE NAME OF NEXT SYSTEM AND SET AS DEFAULT
DO SET = %%$SYSPCPU = %%Y GLOBAL N
DO SET = %%SYST = %%$SYSPCPUNAME GLOBAL N
DO SET = %%$AUTOSYS = %%SYST GLOBAL N
DO SHOUT = TO OPER URGENCY R SYSTEM CTO282I
MESSAGE XES XAES1D01 OS33 SHOUTING DATABASE IN SYSTEM # %%Y (%%SYST)
/*
/* INNER LOOP
/*
DO SET = %%I = 0 GLOBAL N
DO SET = %%X = %%$DBCOUNT GLOBAL N
WHILE %%I LT# %%X
DO SET = %%I = %%I %%$PLUS 1 GLOBAL N
DO SET = %%$DBROW = %%I GLOBAL N
DO SHOUT = TO OPER URGENCY R SYSTEM CTO282I
/* DISPLAY THE VARIABLE (COLUMN NAME)
MESSAGE S1D01C01-5 = %%S1D01C01 %%S1D01C02 %%S1D01C03 %%S1D01C04 %%S1D01C05
ENDWHILE
ENDWHILE
/* RESTORE TO DEFAULT SYSTEM
DO SET = %%$AUTOSYS = %%$SYSTEMNM GLOBAL N
Parent Topic |