Page History
...
This WAM can be run locally or on IBM i.
Function Options(*DIRECT)
Begin_Com RoleCom Role(*EXTENDS #PRIMEXTENDS #PRIM_WAM)
Web_Map ForMap For(*BOTH) Fields Fields((#stdrentry #stdrentry *hidden))
Group_By NameBy Name(#empdata) Fields(#EMPNO #SURNAME #GIVENAME #ADDRESS1 #ADDRESS2 #ADDRESS3 #POSTCODE #deptment #section) Fields(#EMPNO #SURNAME #GIVENAME #ADDRESS1 #ADDRESS2 #ADDRESS3 #POSTCODE #deptment #section)
Def_List NameList Name(#doclist) Fields Fields(#df_elfnam elfnam (#prifilrrn #prifilrrn *hidden)) Type Type(*Working)
Webroutine Name Webroutine Name(Begin)
Web_Map ForMap For(*both) Fields Fields(#empno)
Web_Map ForMap For(*output) Fields Fields((#fullname #fullname *out) (#address1 #address1 *out) (#address2 #address2 *out) (#address3 #address3 *out) (#postcode #postcode *out) (#deptment #deptment *out) (#section #section *out) #doclist #doclist)
If (#stdrentry = S)
Clr_List Named(#doclist)
Fetch Fields(#empdata) From
If (#stdrentry = S)
Clr_List Named(#doclist)
Fetch Fields(#empdata) From_File(pslmst) With With_Key(#empno)
#fullname := #givename + ', ' + #surname
Select Fields
#fullname := #givename + ', ' + #surname
Select Fields(#df_elfnam) From From_File(dxdocs) With With_Key('DEM_ORG_SEC_EMP' #deptment #section #empno) Return #deptment #section #empno) Return_Rrn(#PRIFILRRN)
Add_Entry ToEntry To_List(#doclist)
Endselect
Endif
Endroutine
Webroutine Name
Endselect
Endif
Endroutine
Webroutine Name(SEND_DOCUMENT) Response Response(#HTTPR) Desc Desc('Sample DocumentSample Document')
Web_Map ForMap For(*input) Fields Fields(#PRIFILRRN)
Fetch Fields Fetch Fields(#df_elfnam #dxelfnam #dx_elblob) From From_File(dxdocs) With With_Rrn(#prifilrrn)
#HTTPR.ContentFile ContentFile := #DX #DX_ELBLOB.FileName FileName
Endroutine Endroutine
End_Com
Com