Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Using DXDOCS File - Sample RDMLX for iiiDspEmpDocs

This WAM can be run locally or on IBM i.

     Function Options(*DIRECT)
Begin_

...

Com Role(*

...

EXTENDS #PRIM_WAM)

...

 
Web_

...

Map For(*BOTH)

...

 Fields((

...

#stdrentry *hidden))

...

 
Group_

...

By Name(#empdata)

...

 Fields(#EMPNO #SURNAME #GIVENAME #ADDRESS1 #ADDRESS2 #ADDRESS3 #POSTCODE #deptment #section) 
 
Def_List Name(#doclist) Fields(#df_elfnam (#prifilrrn *hidden))

...

 Type(*Working)

...

 
 
Webroutine Name(Begin)

...

 
Web_

...

Map For(*both)

...

 Fields(#empno)

...

 
Web_

...

Map For(*output)

...

 Fields((

...

#fullname *out)

...

 (

...

#address1 *out)

...

 (

...

#address2 *out)

...

 (

...

#address3 *out)

...

 (

...

#postcode *out)

...

 (

...

#deptment *out)

...

 (

...

#section *out)

...

 #doclist) 
If (#stdrentry = S)
Clr_List Named(#doclist)
Fetch Fields(#empdata) From_File(pslmst)

...

 With_Key(#empno)

...

 
#fullname := #givename + ', ' + #surname
Select Fields(#df_elfnam)

...

 From_File(dxdocs)

...

 With_Key('DEM_ORG_SEC_EMP'

...

 #deptment #section #empno) Return_Rrn(#PRIFILRRN)

...

 
Add_

...

Entry To_List(#doclist)

...

  
Endselect
Endif
Endroutine
 
Webroutine Name(SEND_DOCUMENT)

...

 Response(#HTTPR)

...

 Desc('

...

Sample Document')

...

 
 
Web_

...

Map For(*input)

...

 Fields(#PRIFILRRN)

...

 
 
Fetch Fields(#df_

...

elfnam #dx_elblob)

...

 From_File(dxdocs)

...

 With_Rrn(#prifilrrn)

...

 
#HTTPR.

...

ContentFile :=

...

 #DX_ELBLOB.

...

FileName 
 
Endroutine
 
End_Com