Versions Compared

Key

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

...

You will add a SVHEAD keyword to the SEND command with a value of iiiFN03. This will look up a project entry you will add to the HTTPService properties file for the header row to be added to the sent CSV file.

...

1.      Start Notepadand open the file iii_employee_new_salary.csv created at the beginning of this exercise. The file might appear as follows:

...

        EMPNO,SALARY,STARTDTER,DEPTMENT,SECTION
        A1004,53400,910521,ADM,01

...

        A1005,53500,950102,ADM,01
        A1006,53600,891201,MKT,02

...

2.      Remove the first row in the file that contains the column heading data. The file might appear as follows:

        A1004,53400,910521,ADM,01
        A1005,53500,950102,ADM,01
        A1006,53600,891201,MKT,02

...

3.      Using the File menu, select Save to save the file with the modified contents then close it.

...

4.      Edit function iiiFN03.

...

         Locate the definition of the working list used to receive the data from the User Agent. The working list is called #S_RECEIVE and it might appear as follows:

        DEF_

...

LIST NAME(#S_RECEIVE)

...

 FIELDS(#EMPNO #SALARY #STARTDTER #DEPTMENT #SECTION) TYPE(*WORKING)

...

5.      Locate the commands that execute the KEYWRD subroutine to build the RECEIVE command.

Change the value of the SVMODE keyword to *IGNORE.

...

         The RDMLX

...

might

...

appear

...

as

...

follows:

CHANGE FIELD(#JSMXCMD) TO(RECEIVE)

EXECUTE SUBROUTINE(KEYWRD) WITH_PARMS(#JSMXCMD

...

HANDLER InboundSeparatedValue)

EXECUTE SUBROUTINE(KEYWRD) WITH_PARMS(#JSMXCMD

...

SVMODE '*IGNORE') 

USE BUILTIN(JSMX_COMMAND) WITH_ARGS(#JSMXHDLE1

...

#JSMXCMD) TO_GET(#JSMSTS #JSMMSG #S_RECEIVE)

EXECUTE SUBROUTINE(CHECK_STS)

...

6.      Locate the execute KEYWRD subroutine code for the SEND command. Add a SVHEAD keyword with a value of iiiFN03. Your code should look like the following:

*

...

BUILD

...

THE

...

JSM

...

COMMAND

#JSMXCMD

...

:=

...

SEND

EXECUTE

...

SUBROUTINE(KEYWRD)

...

WITH_PARMS(#JSMXCMD

...

HANDLER

...

InboundSeparatedValue)

EXECUTE

...

SUBROUTINE(KEYWRD)

...

WITH_PARMS(#JSMXCMD

...

SVHEAD

...

iiiFN03)

USE

...

BUILTIN(JSMX_COMMAND)

...

WITH_ARGS(#JSMXHDLE1

...

#JSMXCMD)

...

TO_GET(#JSMSTS

...

#JSMMSG

...

#S_SEND)

EXECUTE

...

SUBROUTINE(CHECK_STS)

...

WITH_PARMS(#JSMXCMD)

...

7.      Compile function iiiFN03.

...

8.      In this step

...

you will add a section to the HTTPSERVICE properties file for your Project. This section will define the column headings to be used for the sent CSV file.

...

a.      Open your iii Training project in Integrator Studio.

      On the Project tab, select the Server you are using for training and right click to Open Server.

...


Step 7_1Image Added

...


b.      The server instance will open on the right hand side:

...


Step 7_2Image Added

...

c.      Open the properties level, and scroll down to HTTPService.properties. Select this and right click to Retrieve Section.

...


Step 7_3Image Added

...


d.      The following dialog box will be shown, since you do not have an HTTPService.properties section defined for your project at this point. Select OK and an entry HTTPService.properties will be created under Integrator / Properties on the left hand side. i.e. in your project.

...


Wor9FFImage Added

...


e.      Select Integrator / Properties / HTTPService.properties and right click to Open With /Properties Editor.

...


Step 7_2bImage Added

...


f.      The Properties Editor will open. Add an entry which defines column headings for separated variables files, as shown in the screen shot. Save your changes and close the properties editor.

...


Image Added

...

    sv.head.iiiFN03=EMPNO,GIVENAME,SURNAME,SALARY,ERRORS

...

g.      Select HTTPService.properties in your project and right click to select Publish Section.

...


Step 7_endImage Added

...

h.      Select Yes in the Confirm dialog. This will add a section at the end of the HTTPService.properties file for your project.

...


...


WorA0BImage Added

i.      On

...

the right hand side (the JSM server instance) right click to select Properties / HTTPService.properties to Open the JSM server HTTPService properties file. Scroll to the end to view the entry you have just added.

...


Image Added

...


8.      Use the instructions in the previous step to test the function. The response should look like the following:

...


WorA17Image Added.