Setting Up Multiple Applications in the Mobile Client
By default, the Mobile Client will only allow you to set up one initial mobile program per Profound UI instance. Due to security reasons, the Mobile Client does not allow you to specify a program name when setting up a connection in the client itself. However, you can have more than one mobile application that's started from the Mobile Client's menu.
In order to accomplish this, you can use the 'Parameter' option when configuring your application in the client. For example, if you wanted to set up two applications in your Mobile Client (both on the same port), you could create a CL program that accepts parameters and then calls a certain program based on the parameter that is sent. You would then set up the CL program as the initial mobile program for the Mobile Client (as described on this page). Your CL program could look something like this:Â
PGM PARM(&OPT)
DCL VAR(&OPT) TYPE(*CHAR) LEN(20)
IF COND(&OPT *EQ 'Prog1') THEN(DO)
CALL PGM(Program1)
ENDDO
IF COND(&OPT *EQ 'Prog2') THEN(DO)
CALL PGM(Program2)
ENDDO
ENDPGM
This program will accept a parameter and will call the respective program when that parameter is passed. In this case, parameter 'Prog1' will call Program1 and parameter 'Prog2' will call Program2. When you set up these applications in the client, you would configure them like so:Â
Afterwards, you should see both the Program1 application and the Program2 application listed on the Mobile Client's menu. If you choose the Program1 application from the menu, it should then run the program (Program1 in this case) that is called when entering the 'Prog1' parameter. If you choose the Program2 application, it will then run the Program2 program (because of the 'Prog2' parameter).Â
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!