How Do I Create A Subsystem And Add User To The Subsystem In AS400?

1

1 Answers

Anonymous Profile
Anonymous answered
Here's how to create a subsystem, jobd and user profile so that jobs submitted run in the new subsystem.
 
Create job description:CRTJOBD JOBD(ATLANTIS/ATLANTIS) JOBQ(ATLANTIS/ATLANTIS)
TEXT('dimensional Insight default job description')
INLLIBL(QTEMP QGPL ATLANTIS)
 
Create userprofile or amend existing userprofile to use jobd
CRTUSRPRF USRPRF(ATLANTIS) PASSWORD(ATLANTIS) PWDEXP(*YES)
USRCLS(*PGMR) CURLIB(ATLANTIS)
TEXT('Dimensional Insight default profile') JOBD(ATLANTIS)
Create a subsystem- this is where the autostart job will run.
 
Code:CRTSBSD SBSD(ATLANTIS/ATLANTIS) POOLS((1 *BASE))
TEXT('dimensional Insight subsystem')
Create a job queue to feed the subsystem created above.
 
Code:CRTJOBQ JOBQ(ATLANTIS/ATLANTIS)
TEXT('Dimensional Insight Job Queue')
Now we add a jobqueue entry to attach the subsystem and jobqueue.
 
Code: ADDJOBQE SBSD(ATLANTIS/ATLANTIS)
JOBQ(ATLANTIS/ATLANTIS) MAXACT(*NOMAX)
Add routing entry so our jobs will run. (I borrowed QBATCH -CLASS)
ADDRTGE SBSD(ATLANTIS) SEQNBR(9999)
CMPVAL(*ANY) PGM(QSYS/QCMD) CLS(QBATCH)
Now we have our subsystemTo start a subsystem automatically you need to add this to the startup program.To find this you use commandWRKSYSVAL QSTRUPPGM
 
Display System Value
 
System value . . . . . :   QSTRUPPGM
Description  . . . . . :   Startup program
Startup program  . . . . . . :   QSTRUP   Name, *NONE
Library  . . . . . . . . . :     QSYS   Name
 
As in this example the start up program is QSTRUP in library QSYS.This is a CLP program. You must use the RTVCLSRC command to get the source. Then just add to the source STRSBS ATLANTIS/ATLANTISMONSMG CPF0000and recompile the program back into library QSYS.Now when the box is IPLed the subsytem will start automatically.
Getting diveline to run in subsystem ATLANTIS
 
 SBMJOB CMD(CALL PGM(ATLANTIS/DVLNSVR) PARM(ATLANTIS ' ' )) JOB(DIVER) JOBD(ATLANTIS/ATLANTIS) JOBQ(atlantis/ATLANTIS)  USER(ATLANTIS)
 

Answer Question

Anonymous