"Pre-start" jobs, anticipate job starting, and speedup EASYCOM connection. Its use is particularly well suited if applications are frequently connected and disconnected (i.e., Web applications).
Advantages:
• Faster connection Start (quasi-instantaneous connection).
• Possible to initialize a custom environment before the connection is started (however the username is not known at this stage).
Disadvantages:
• The jobname is equal to the name that was chosen in the ADDPJE command, cannot be changed during the connection.
• The effective user is not visible in WRKACTJOB displayed list except on V5R4 and above. Effective user can be known with WRKACTJOB option 5, and option 1 (job status).
Here are the required commands to setup prestart jobs for Easycom (this will end all active connections):
ENDSBS SBS(EASYCOM) OPTION(*IMMED)
ADDPJE SBSD(EASYCOM/EASYCOM) PGM(EASYCOM/EASYCOM) INLJOBS(10) JOB(EASYCOMPJ) JOBD(EASYCOM/EACJOBD) CLS(EASYCOM/EACCLS)
CFGEACTCP LIB(EASYCOM) PJ(*ON)
To return to backward configuration, stop the subsystem, remove PJ definition using RMVPJE, and then run again CFGEACTCP set to *OFF.