| |
3.1 Enabling the start-up of a converted application
| |
By default the iWeb Runtime prompt for user profile login and will follow the same path
as if the login was coming from the 5250 signon-screen.
Also, converted programs can run both in 5250 and in WEB mode,
depending from the way they are invoked: from a 5250 screen, or from the HTTP server (from a browser).
But remember: during conversion you had to enter a "Target library for all converted programs".
Therefore, to invoke converted programs you just have to set that library of converted programs
on the top of the library-list for the user session.
To add this library on the top of the library list of the user session you can either:
- add it on the top of the "initial library list" of a JOBD associated to the user profile
- add it on the top of the library list
through the command ADDLIBLE in a initial program associated to the user profile
Qualified program invocation:
- If the user profile already has an initial program and this initial program is also a "converted program"
(that is a RPG or CL program using a display), you have to set its library to the
library of converted programs or alternatively use a CL pgm which will call the converted program
(adding the library of converted programs first).
- If, within your application, program invocations are "qualified" (that is with the library name specification),
you may have to remove the library specification to make converted programs invokated instead off non-converted programs.
Menu invocation (qualified or not):
- For menu invocation, of converted menus, iWeb use the same library as the normal 5250 process
(a qualified library when it is precised or a dynamic library - *LIBL). You don't have to change anything.
- The command "GO" use to invoke a menu is totally controlled by iWeb, therefore initial or subsequent menu invocations
will always be presented in a tree-view frame and run within the same job (exactly as the normal 5250 process).
- Current library (CURLIB) or Production library (PRDLIB) specifications are preserved (exactly as the normal 5250 process).
Note:
- You may use different user profile for Web access and 5250 access by setting or not
the library of converted programs on the top of the library list of the user session.
- You can also do a conditionned setting, from your user initial program,
using the call of the program IWEB/ISIWEB which return '0' or '1'
- For the Web access, you can use a "default" userID and therefore bypass the login prompt: see
APPENDIX 3A - Applet features
Samples:

  |
PGM
DCL VAR(&ISIWEB) TYPE(*CHAR) LEN(1)
CALL PGM(IWEB/ISIWEB) PARM(&ISIWEB)
/* Retrieve environment mode +
'0'=5250 session, '1'=iWEB session */
ADDLIBLE LIB(APPLIB) /* Library containing the +
original programs, display files and the +
application database files */
IF COND(&ISIWEB *EQ '1') THEN(DO)
ADDLIBLE LIB(APPLIBW) POSITION(*FIRST) /* Library +
containing the converted programs*/
ENDDO
CALL PGM(PGMINI) /* This is the initial program +
of the application */
| | |
Figure 03-00 Sample initial program for Runtime user profile logon
|

  |
PGM /* This is program IWEBDEMO/INLPGM */
DCL VAR(&JOBTYPE) TYPE(*CHAR) LEN(1)
MONMSG MSGID(CPF0000)
RTVJOBA TYPE(&JOBTYPE) /* Retrieve job type: +
'1'=5250 interactive, '0'=iWEB batch */
ADDLIBLE LIB(IWEBDEMO) /* Library containing the +
original display files and the +
application database files */
ADDLIBLE LIB(IWEBDEMOX) POSITION(*FIRST) /* Library +
containing the converted programs*/
AGAIN:
CALL PGM(BOATSCH0) /* This is the initial program +
of the application */
IF COND(&JOBTYPE = '1') THEN(SIGNOFF)
ELSE
GOTO CMDLBL(AGAIN) |
| |
Figure 03-01 Sample initial program for Runtime user profile logon
|

  |
| |
CRTJOBD JOBD(IWEBDEMO/IWEBDEMO) TEXT('For user +
profile IWEBDEMO') INLLIBL(IWEBDEMOX +
IWEBDEMO)
CRTUSRPRF USRPRF(IWEBDEMO) PASSWORD(*USRPRF) +
STATUS(*ENABLED) USRCLS(*USER) +
INLPGM(IWEBDEMO/INLPGM) TEXT('For +
IWEBDEMO application') +
JOBD(IWEBDEMO/IWEBDEMO) AUT(*USE) |
| |
Figure 03-02 Sample user profile for Runtime logon
|
3.1.a Converted application structure overview
When iWeb does a conversion the following happens:
Original library: yourLib
Target library for converted pgm: yourLibW (which is a new library)
For programs:
All converted program are recompiled in the library yourLibW (the originals pgm are not altered)
For Display files:
XML document are created in /iwebdata/fmts/yourLib/dspName/fmtName.xml for each display format.
Note that the reference library is the original library, nothing is recompiled here.
For Menus:
XML document are created in /iwebdata/menus/yourLib/menuName.xml for each menu.
Note that the reference library is the original library, nothing is recompiled here.
For Help panel groups:
XML document are created in /iwebdata/uim/yourLib/helpName.xml for each help.
Note that the reference library is the original library, nothing is recompiled here.
Therefore, to run a converted application the only point to remind is to put the Target library for converted pgm
(yourLib)
on the top of the library list. In that way when a program is called, that the converted version which will run
(unless your application use qualified call, specifiyng the lib name, in that case you have to change it).
A last point to check out, for converted application, is when the INLPGM (initial program) of a user profil is directly a
program using a display file, in that case you will have to change the library name to the Target library for converted pgm
(yourLibW).
Only converted programs are within the library Target library yourLibW (yourLib2W, yourLib3W) !
All other object are dinamically referenced to the original library they belong to
(yourLib, yourLib2, yourLib3, yourLib4...)
At runtime, iWeb uses dinamically the object library upon the library list to get the reference library
(as the same way the 5250 use to run). Therefore, never add objects different than converted programs within a
Target library yourLibW.
| |
| |
|