Workstation ID's
You can simulate a “workstation id” in Profound UI sessions by naming the job through a query string parameter that Profound UI provide.
If you launch a session like this:
http://yourServer:8080/profoundui/start?workstnid=YOURID (for signed on session)
Or
http://yourServer:8080/profoundui/start?pgm=yourlib/yourpgm&workstnid=YOURID (for anonymous session)
Then the name ‘YOURID’ will be given to the job created for your Profound UI session. You can pass anything that is a valid OS/400 job name (10 character max) using this parameter.
In your applications, you can then use the job name field from either the RPG program status data structure or the RTVJOBA CL command to retrieve the “workstation id”. If an attempt is made to use a job name which already exists as a job under the QHTTPSVR subsystem, then an error screen will display.
By default, duplicate job names will not be allowed. However, you can optionally allow duplicate job names using the “duplicateid” parameter:
http://yourServer:8080/profoundui/start?workstnid=YOURID&duplicateid=1
Profound UI also implements a feature that is similar to the “avoid duplicate names with other workstations” option in Client Access. You can optionally use links like this:
http://yourServer:8080/profoundui/start?workstnid=YOURID&suffixid=1
Or
http://yourServer:8080/profoundui/start?pgm=yourlib/yourpgm&workstnid=YOURID&suffixid=1
When using this mode, a unique id will be generated automatically by the system by appending a suffix to the end of what you pass, if that value is already in use on the system. For example, using the above link, workstation id YOURID1 would be produced if YOURID already existed on the system. Further requests for the same id would result in YOURID2, then YOURID3, and so on. Note that the value ‘1’ for ‘suffixid’ is not the suffix itself, it’s just a flag that tells the system to apply suffixes, if necessary. The value should always be ‘1’ if you want to use this feature.
This feature requires that the id you pass is 9 characters or less, to leave room for the potential suffix. The system will start using 1-9 and then A-Z for the suffixes. If none of these are available (i.e. there are already 35 jobs with the same “prefix”), then you will get the “duplicate id” error screen.