INT002 - Using the FTP Service
- Some JSM commands pass information in a working list. Whenever a JSMX command passes a working list, you must specify the name of the working list as the third parameter of the JSMX_COMMAND. Note, when using the JSMX_COMMAND, the fields to be mapped for the list is defined by the working list itself. For RDML programming, when the JSM_COMMAND is used, then a SERVICE_LIST keyword is required to define the list fields being mapped.
- It is important to understand how to use the subroutine named KEYWRD. The subroutine receives three parameters: a command, a keyword and a value.
Consider this example:
#S_HOST := '10.10.10.10'
#JSMXCMD := CONNECT
EXECUTE SUBROUTINE(KEYWRD) WITH_PARMS(#JSMXCMD HOST #S_HOST)
- The value JSMXCMD is mapped to W_CMDX
- The value 'HOST' is mapped to W_KEYWRD
- The value S_HOST is mapped to W_KEYVAL
- In the KEYWRD subroutine, the JSMXCMD is concatenated with the keyword.
#W_CMDX += ' ' + #W_KEYWRD + '(' + #W_KEYVAL + ')'
- The value of JSMXCMD will now be: 'CONNECT HOST(10.10.10.10)'.
Tips & Techniques
- The KEYWRD subroutine provides an efficient way to build the JSM commands. You will appreciate the advantages of using the KEYWRD subroutine when building more complex JSM commands in the coming exercises.
- The RDMLX ASSIGN statement makes defining the JSM commands very simple and you will use this instead of the KEYWRD subroutine in later exercises.
What I Should Know
- How to use the FTP service to access a FTP folder to get a list of files.
- How JSM commands are used to interact with a service.
- How to use the template BBJSMXCMD build commands for JSM services.