Versions Compared

Key

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

...

2.      Change the Function Options line of code and add keywordq Rcv_List(#EMPS) so that the function can return the list of employees to the form which will call it.

Image Modified

3.      After the line above, define the list EMPS with the fields EMPNO, GIVENAME, SURNAME and SALARY.  It should be a working list with Entrys set to *MAX.

Image Modified

4.      After the line above, define a group with the fields DEPTMENT and SECTION.  If you don't do this, the fields DEPTMENT and SECTION would not be able to be sent to the JSON server because there will be no reference to these fields anywhere else in the function.

Image Modified

5.      After the line above, add code to clear the list EMPs.

Image Modified

6.      Switch to function iiiFN10 and copy the code that opens the JSM and loads the service and paste it into iiiFN11 after the line above.  Then change HTTPInboundJSONBindService to HTTPOutboundJSONBindService

...

11.     Add code to loop through all EMPLOYEE fragments until no further fragments can be found and add each fragment's data to your list.  You could copy the 3 lines of code after the Begin_Loop from function iiiFN10 then change SET to GET.

Image Modified

12.     After the line above add the logic to close JSM and return from this function.

Image Modified

13.     Compile function iiiFN11. Check in to the IBM i server if necessary.

...