Function VSAM140: Tiered System Variable Evaluation

LANSA

Function VSAM140: Tiered System Variable Evaluation
Name: VSAM140

Description: The following RDML function demonstrates the evaluation of a system variables that returns the name of the current system (*CURRENT_SYSTEM). If you define a new system using form VL_SAM134 you should alter the logic in this function as appropriate to support recognition of the new system name.

Special Note: You should check this function into your iSeries server system and compile it there as well as in your Visual LANSA environment.


FUNCTION OPTIONS(*HEAVYUSAGE *DIRECT *MLOPTIMIZE *ALP_SYSTEM_VARIABLE);
DEF_COND NAME(*CLIENT) COND('*On_Client_System = Y');
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400');
IF COND(*AS400);
CHANGE FIELD(#SYSVAR$AV) TO(DFTAS400);
ELSE;
IF COND(*CLIENT);
CHANGE FIELD(#SYSVAR$AV) TO(DFTCLIENT);
ELSE;
CHANGE FIELD(#SYSVAR$AV) TO(DFTOTHER);
ENDIF;
ENDIF;
RETURN;