In this step, you will modify the CSV file to remove the column headings. The RDMLX will need to be modified to change the SVMODE keyword on the RECEIVE command to *NONE. i.e. the CSV file has no column headings. In Step 6, you modified the received working list definition to match the columns in the CSV file, so no other changes are needed to receive the CSV file. In fact, since your function only requires the first two fields, the working list could be defined as containing EMPNO and SALARY only.
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.
EMPNO,SALARY,STARTDTER,DEPTMENT,SECTION
A1004,53400,910521,ADM,01
A1005,53500,950102,ADM,01
A1006,53600,891201,MKT,02
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
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)
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)
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)







¡
