June 19, 2008, 11:09 AM
<Vijaya_settu>Thank you both of you for your replies,
Mark, I tried running Maintain by itself , i got the same error. I've attached my code below:
Please let me know if you need more info...
My Procedure Code below:
-SET &LstNme = &1;
-SET &FstNme = &2;
-SET &Div = &3;
-SET &Dep = &4;
-SET &Bldg = &5;
-SET &Rdbutton = &6;
-*-SET &LstNme = '''' || &LstNme || '%''';
-SET &LstNme = LCWORD(&LstNme.LENGTH, &LstNme, 'A25');
-SET &FstNme = LCWORD(&FstNme.LENGTH, &FstNme, 'A25');
-*-SET &FstNme2 = '''' || &FstNme || '%''';
-SET &Rdbutton1=IF &Rdbutton EQ 'LST' THEN '' ELSE '-*';
-SET &Rdbutton2=IF &Rdbutton EQ 'FST' THEN '' ELSE '-*';
-SET &Rdbutton3=IF &Rdbutton EQ 'DEPT' THEN '' ELSE '-*';
-SET &Rdbutton4=IF &Rdbutton EQ 'BLDG' THEN '' ELSE '-*';
-SET &Rdbutton5=IF &Rdbutton EQ 'DIVS' THEN '' ELSE '-*';
SET EMPTYREPORT = ON
SET ALL = PASS
-*_______________________________________________________________________________
DEFINE FILE VW_HRPER
FNAME/A105=LAST_NAME ||(', '|FIRST_NAME );
FNAME2/A105=FIRST_NAME ||(', '|LAST_NAME );
-*
-*PHONEFIELD1/A3=EDIT(HRP_PRI_CAMPUS_EXTENSION,'999$$$$$');
-*PHONEFIELD2/A5=EDIT(HRP_PRI_CAMPUS_EXTENSION,'$$$99999');
-*PHONEFIELD3/A15= IF (HRP_PRI_CAMPUS_EXTENSION EQ MISSING OR HRP_PRI_CAMPUS_EXTENSION EQ '') THEN '' ELSE '313'||('- '|PHONEFIELD1 ) ||('- '|PHONEFIELD2);
-*DIV_SION/A50 = IF DIV_SCHOOL EQ 'AC' THEN 'Academic Education' ELSE IF DIV_SCHOOL EQ 'BS' THEN 'Business Services' ELSE IF DIV_SCHOOL EQ 'CE' THEN 'Career Education' ELSE IF DIV_SCHOOL EQ 'SS' THEN 'Student Services' ELSE '';
END
-*_______________________________________________________________________________
TABLE FILE VW_HRPER
PRINT
HRPER_ID AS 'ID' NOPRINT
HRP_EFFECT_TERM_DATE NOPRINT
ALL_STATUSES NOPRINT
ID NOPRINT
LAST_NAME AS 'Last Name' NOPRINT
FIRST_NAME AS 'First Name' NOPRINT
PERSTAT_ID NOPRINT
PERSTAT_END_DATE NOPRINT
DEPTS_DESC AS 'Departments'
DIVISIONS_ID NOPRINT
DIV_DESC AS 'Division'
BLDG_DESC AS 'Building'
COMPUTE PRSNEML/A50=IF FNAME NE LAST FNAME THEN PERSON_EMAIL_ADDRESSES ELSE '-'; AS 'Email Address' NOPRINT
COMPUTE ADDLINE/A75 = OEE_USERNAME || '@hfcc.edu'; AS 'Email Address'
ADDRESS_PHONES AS 'Phone'
PERSON_WEBSITE_ADDRESS AS 'HomePage'
-*
&Rdbutton1.EVAL BY LAST_NAME NOPRINT
&Rdbutton2.EVAL BY FIRST_NAME NOPRINT
&Rdbutton3.EVAL BY DEPTS_DESC NOPRINT
&Rdbutton4.EVAL BY BLDG_DESC NOPRINT
&Rdbutton5.EVAL BY DIV_DESC NOPRINT
-*
WHERE (HRP_EFFECT_TERM_DATE EQ MISSING)
AND (ALL_STATUSES NE MISSING)
AND (PERSTAT_END_DATE EQ MISSING)
AND ( PERSTAT_PRIMARY_POS_ID NOT LIKE '%COOP%');
WHERE TOTAL PRSNEML NE '-';
WHERE ((LAST_NAME EQ '&LstNme' ) OR (FIRST_NAME EQ '&FstNme') OR (DIV_DESC EQ '&Div') OR (DEPTS_DESC EQ '&Dep') OR (BLDG_DESC EQ '&Bldg'));
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT HTMTABLE
ON TABLE SET HTMLCSS OFF
ENDSTYLE
END
-*
My Maintain Code:
MAINTAIN FILE vw_person AND vw_hrper AND vw_divisions AND vw_depts AND vw_buildings
$$Declarations
Declare Last / A25 ;
Declare First / A25 ;
Declare RdoBtn / A40;
Case Top
Infer vw_person.VW_PERSON.LAST_NAME into Vw_personStk1;
Infer vw_person.VW_PERSON.FIRST_NAME into Vw_personStk;
Compute HTMLStackEntireReport.HTML / A250 ;
Infer vw_divisions.VW_DIVISIONS.DIV_DESC into Vw_divisionsStk
Infer vw_depts.VW_DEPTS.DEPTS_DESC into Vw_deptsStk;
Infer vw_buildings.VW_BUILDINGS.BLDG_DESC into Vw_buildingsStk;
Compute HtmlStack.HTML / A250 ;
-*
Reposition vw_divisions.VW_DIVISIONS.DIV_DESC ;
Stack clear Vw_divisionsStk ;
For all next vw_divisions.VW_DIVISIONS.DIV_DESC into Vw_divisionsStk
Stack sort Vw_divisionsStk by DIV_DESC;
Reposition vw_depts.VW_DEPTS.DEPTS_DESC ;
Stack clear Vw_deptsStk ;
For all next vw_depts.VW_DEPTS.DEPTS_DESC into Vw_deptsStk
Stack sort Vw_deptsStk by DEPTS_DESC;
Reposition vw_buildings.VW_BUILDINGS.BLDG_DESC ;
Stack clear Vw_buildingsStk ;
For all next vw_buildings.VW_BUILDINGS.BLDG_DESC into Vw_buildingsStk
Stack sort Vw_buildingsStk by BLDG_DESC;
-*compute runscript/stack of a0;
Winform Show Form1;
-* Replace the Winform Show command with the following code
-* when to display your form in a non-persistent state
-* Winform Show_and_exit Form1;
EndCase
Case ShowReport
COMPUTE DEPT/A50 = Vw_deptsStk().VW_DEPTS.DEPTS_DESC ;
Stack clear HTMLSTACK;
SYS_MGR.FOCSET("WARNING","OFF");
EXEC campusDirectory from Last First DIVS DEPT BLDG RdoBtn INTO HTMLSTACK;
EndCase
Case EntireReport
Stack clear HTMLStackEntireReport;
SYS_MGR.FOCSET("WARNING","OFF");
EXEC CampusDirectoryEnt from RdoBtn INTO HTMLStackEntireReport;
EndCase
Case ShowReport2
COMPUTE DIVS/A50 = Vw_divisionsStk().VW_DIVISIONS.DIV_DESC;
Stack clear HTMLSTACK;
SYS_MGR.FOCSET("WARNING","OFF");
EXEC campusDirectory from Last First DIVS DEPT BLDG RdoBtn INTO HTMLSTACK;
EndCase
Case ShowReport3
COMPUTE BLDG/A50 = Vw_buildingsStk().VW_BUILDINGS.BLDG_DESC ;
Stack clear HTMLSTACK;
SYS_MGR.FOCSET("WARNING","OFF");
EXEC campusDirectory from Last First DIVS DEPT BLDG RdoBtn INTO HTMLSTACK;
EndCase
Case ShowReport4
stack clear HTMLSTACK;
SYS_MGR.FOCSET("WARNING","OFF");
EXEC campusDirectory from Last First DIVS DEPT BLDG RdoBtn INTO HTMLSTACK;
-*where (LAST_NAME EQ '&LstNme')
COMPUTE Last='';
Reposition vw_person.VW_PERSON.LAST_NAME ;
Stack clear Vw_personStk1 ;
For all next vw_person.VW_PERSON.LAST_NAME into Vw_personStk1
where (LAST_NAME EQ Last);
EndCase
Case ShowReport5
Stack clear HTMLSTACK;
SYS_MGR.FOCSET("WARNING","OFF");
EXEC campusDirectory from Last First DIVS DEPT BLDG RdoBtn INTO HTMLSTACK;
COMPUTE First='';
-*compute First = Vw_personStk.FIRST_NAME;
Reposition vw_person.VW_PERSON.FIRST_NAME ;
Stack clear Vw_personStk ;
For all next vw_person.VW_PERSON.FIRST_NAME into Vw_personStk
where (FIRST_NAME EQ First);
EndCase
-*Case RunJavaScript
-*Compute runscript(1) = '<script language = JavaScript>';
-*Compute runscript(2) = 'document.Form1.edbxFstName.value = "";';
-*Compute runscript(3) = '';
-*EndCase
END