Here it is Rick.  Not a fantastic piece of code but, it works for me...

%{ --------------------------------------------------------------------- %}
%{ Function: CHKEMPSTS                                   %}
%{ Purpose : Check Employee Status (In, Out, Lunch, etc.)          %}
%{ --------------------------------------------------------------------- %}
%FUNCTION(DTW_DIRECTCALL) CHKEMPSTS (DTW_PAD_PGM_PARMS,
                                      in char(10) USERID,
                                      in dec(5,0) emp,
                                      out char(1) empsts) {
 %EXEC{ /qsys.lib/pplpgm.lib/PLZ005C.pgm %}

%}

Then, if I call one of the four CGIs affected (let's say CGI#1) ....

--------------------------
CGI Name: CGI#1
--------------------------
%HTML(REPORT) {
<html>
<head>
<!----------------------------------------------------------------------->
<!-- If the employee is not IN the building, the session must be ended -->
<!-- Display a screen to let the user know about it and re-direct him  -->
<!-- to the Main Menu                                             -->
<!----------------------------------------------------------------------->
@CHKEMPSTS("YES", USERID, emp, empsts)
%IF($(empsts) != "I")
<script language="JavaScript">
<!--
adr="../PCsessionended/report?empn=$(empn)";
top.location.replace(adr);
// -->
</script>
%ENDIF
<!----------------------------------------------------------------------->
.
.
.
.

I have this code for each of the other three sources.

Thanks everybody!  You guys are the Best of the Best!!!!
Peter Vidal
Pall Aeropower Corp.
SR Programmer Analyst
WWW.Pall.com

"A good player makes himself look good; a great player makes the team look
good."
Author unknown



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.