Well so much for all that theory. Here is a practical sample using the CAR file for you Jason. I have split it into 2 FEXes for simplicity. It can be combined into one, by reading the &RUNTYP value.
To run these examples in your MRE, please insert your MRE domain & folder names as appropriate.
Goooooooood day !!
Sandeep Mamidenna
-*
-*
-*-*-* HERE STARTS THE FIRST FEX
-*-*-*
-*
-DEFAULTS &RUNTYP='A';
-SET &RUNTYP = 'B';
-*
-HTMLFORM BEGIN
<HTML><HEAD>
<script language='javascript'>
function runfexp(fex, parm) {
alert("1");
document.FRM1.IBIF_ex.value = fex ;
document.FRM1.IBIMR_fex.value = fex ;
document.FRM1.submit();
}
</script></head>
<body><form action="/ibi_apps/WFServlet" method="GET" name="FRM1">
<input type='hidden' name='IBIMR_domain' value='AAA/AAA.htm'>
<input type='hidden' name='IBIMR_folder' value='#BBB'>
<input type='hidden' name='IBIMR_action' value='MR_RUN_FEX'>
<input type='hidden' name='IBIMR_sub_action' value='MR_STD_REPORT'>
<input type='hidden' name='IBIMR_fex' value=''>
<input type='hidden' name='IBIF_ex' value=''>
<input type='hidden' name='RUNTYP' value='!IBI.AMP.RUNTYP;'>
<TABLE><TR>
<TD>Input Country-name :
<TEXTAREA NAME=GRPNUM ROWS=6 COLS=6></TEXTAREA>
<INPUT type="button" name="B1" value="Help with Values"
onClick="runfexp('app/car4.fex','B');">
</TD>
</TR></TABLE>
</FORM></BODY></HTML>
-HTMLFORM END
-*
-*
-*
-* HERE IS THE SECOND FEX (CALLED car4.fex IN MY MRE FOLDER)
-*
-*
-*
-* 2nd time around the value of &RUNTYP is 'B'
-*
TABLE FILE CAR
PRINT
DST.COUNTRY
ON TABLE HOLD AS H1
END
-*
DEFINE FILE H1
QT/A1='''';
END
TABLE FILE H1
PRINT
COMPUTE FLDX/A100 =
('document.write("' || '<option value=' | QT || COUNTRY ||
QT | '>' | COUNTRY | '</OPTION>");'
) ;
BY COUNTRY NOPRINT
ON TABLE HOLD AS HCNTRY
END
-RUN
-*
-LBL_SHOWHTML
-*
-HTMLFORM BEGIN
<HTML><HEAD>
<script language='javascript'>
function runfexp(fex, parm) {
document.FRM1.IBIF_ex.value = fex ;
document.FRM1.IBIMR_fex.value = fex ;
document.FRM1.submit();
}
</script></head>
<body><form action="/ibi_apps/WFServlet" method="GET" name="FRM1">
<input type='hidden' name='IBIMR_domain' value='AAA/AAA1.htm'>
<input type='hidden' name='IBIMR_folder' value='#BBB'>
<input type='hidden' name='IBIMR_action' value='MR_RUN_FEX'>
<input type='hidden' name='IBIMR_sub_action' value='MR_STD_REPORT'>
<input type='hidden' name='IBIMR_fex' value=''>
<input type='hidden' name='IBIF_ex' value=''>
<input type='hidden' name='RUNTYP' value='!IBI.AMP.RUNTYP;'>
<TABLE><TR>
<TD>
Pick Country :
<select name="CTRY" size="1">
!IBI.FIL.HCNTRY;
</SELECT>
</TD>
-LBL_SKPB
</TR></TABLE>
</FORM></BODY></HTML>
-HTMLFORM END
-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !!