ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Creating Iseries subsystem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating Iseries subsystem

    I will tell step by step how to create a subsystem , jobqueue, userprofile and job description.

    First we will create a job description. The job description will be used by the subsystem to start the autostart job. (I will explain later why we need a autostart job.)

    Create jobqueue(notice you can set up a library list for the job.
    Code:
    CRTJOBD JOBD(ATLANTIS/ATLANTIS) JOBQ(ATLANTIS/ATLANTIS) 
    TEXT('dimensional Insight default job description')     
    INLLIBL(QTEMP QGPL ATLANTIS)
    Now we a userprofile for this example I chose ATLANTIS.
    see I have attached the jobdescription ATLANTIS here also,
    with the value PWDEXP you will be prompted at signon to change the current password.

    Code:
    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)

    Code:
    ADDRTGE SBSD(ATLANTIS) SEQNBR(9999)     
    CMPVAL(*ANY) PGM(QSYS/QCMD) CLS(QBATCH)
    Now we have our subsystem

    To start a subsystem automatically you need to add this to the startup program.

    To find this you use command

    WRKSYSVAL QSTRUPPGM

    Code:
                                  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/ATLANTIS
    MONSMG CPF0000

    and 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
    Code:
    *                                                               
    *  SBMJOB CMD(CALL PGM(ATLANTIS/DVLNSVR) PARM(ATLANTIS ' ' ))   
    *  JOB(DIVER) JOBD(ATLANTIS/ATLANTIS) JOBQ(atlantis/ATLANTIS)  
    *  USER(ATLANTIS)  
    *
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    nice tut tkz jamief
    "It's like a koala pooped a rainbow on my head and I can taste the colors."

    Comment


    • #3
      i followed the instructions in this post, up to the point of adding the code to QSTRUP. I don't want to do that just yet.

      my subsystem appears to start ok. if i run my program, it runs in QBATCH ok. I can't get it to run in the SBS i created....

      i tried the SBMJOB command, but the asterisks in front of it tell me it part of a CL program... I think. what is the command to start my program manually - in the subsystem I created?

      thx all!
      Some people are like slinkies.
      Not really good for anything, but
      you can't help but smile when you
      see them tumble down the stairs.

      Comment


      • #4
        Try some version of this

        Code:
        SBMJOB CMD(CALL PGM(STRDVLN)) JOB(DIVELINE) JOBQ(MYJOBQ)
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          hey! i like my picture! looks just like me.

          nope, still coming up in QBATCH....

          when it starts, it's giving me a message about the JOBQ... could that be where i need to look? you instructions above list creating the JOBQ 4th... but i actually did it first.... should that make a difference?

          another question: if i remove the subsystem, will that remove the routing entry as well, or are they separate objects?

          thx again to all!!
          Some people are like slinkies.
          Not really good for anything, but
          you can't help but smile when you
          see them tumble down the stairs.

          Comment


          • #6
            Captain Matt

            Did you create the atlantis subsystem Exactly as above?

            if so then do NOT use the STRDVLN command its Evil....


            Oh and ignore the "*" just copy this command and run it from the command line. The "*" are just window dressing for display only.

            Use this to start diveline
            Code:
            *                                                               
            *  SBMJOB CMD(CALL PGM(ATLANTIS/DVLNSVR) PARM(ATLANTIS ' ' ))   
            *  JOB(DIVER) JOBD(ATLANTIS/ATLANTIS) JOBQ(atlantis/ATLANTIS)  
            *  USER(ATLANTIS)  
            *


            Jamie
            All my answers were extracted from the "Big Dummy's Guide to the As400"
            and I take no responsibility for any of them.

            www.code400.com

            Comment


            • #7
              nope, still no joy.

              I created the subsystem just as above, i think. How do i check? how hard can it be - there's only 3 parameters!

              when i send the command you list above, it appears that the program starts and then immediately terminates. i get a MW, with a message that says the program ended normally.

              when i do a WRKSBS and look at the jobs in both my ATLANTIS and QBATCH subsystems, there is nothing (in either subsystem).

              so close.... and yet so FAAAAAR away....
              Some people are like slinkies.
              Not really good for anything, but
              you can't help but smile when you
              see them tumble down the stairs.

              Comment


              • #8
                slight topic drift....

                i saw soemthing elsewhere about 'adding an autostart job entry' (ADDAJE).

                so what is that and do i need one or not? AJE appears to be part of the subsystem, correct? will an AJE start a program in the subsystem, or what?

                thx
                Some people are like slinkies.
                Not really good for anything, but
                you can't help but smile when you
                see them tumble down the stairs.

                Comment


                • #9
                  I think you are missing the ATLANTIS Lib


                  Lets master this first then we can look at auto start jobs.....
                  Once this gets going we can experiment with that.




                  Try adding the library ATLANTIS to your library list before calling the submit program.



                  Code:
                  ADDLIBLE ATLANTIS

                  Jamie
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment


                  • #10
                    nope, no difference. i tried it once with ATLANTIS not in my LIBL, and then once with it in. same result: empty subsystems (both ATLANTIS and QBATCH) and 2 messages telling me the program ended abnormally.

                    maybe i should tear it out and re-install. i'll try that tomorrow if there are no more suggestions.

                    l8r.

                    thx again.
                    Some people are like slinkies.
                    Not really good for anything, but
                    you can't help but smile when you
                    see them tumble down the stairs.

                    Comment


                    • #11
                      Matt -Im just guessing

                      What does your joblog say?


                      do a WRKJOB &JOBNAME and 4 to view the log...

                      It will tell you exactly whats wrong.


                      Ps...

                      Please email me Jamie@code400.com

                      the ip for your iseries and my logon (i forgot)

                      and I will look at the log.


                      Jamie
                      All my answers were extracted from the "Big Dummy's Guide to the As400"
                      and I take no responsibility for any of them.

                      www.code400.com

                      Comment


                      • #12
                        It was all you big guy

                        You have the ATLCFG userspace setup with authority of *PUBLIC *EXCLUDE

                        I changed to *PUBLIC *ALL and its running now.....

                        Code:
                        EDTOBJAUT ATLCFG *USRSPC

                        I got the job log by typing
                        Code:
                        WRKUSRJOB
                        after the job endded abnormal-Spooled file is still out there.

                        to see
                        Code:
                        WRKUSRJOB D_JAMIE
                        .....NEXT
                        All my answers were extracted from the "Big Dummy's Guide to the As400"
                        and I take no responsibility for any of them.

                        www.code400.com

                        Comment


                        • #13
                          Jamie,

                          you were exactly right. thx.

                          now i have a question about modifying QSTRUP.
                          I have figured out how to get PDM to the point of modifying it, but i'm not sure where to put it in the QSTRUP file. The end? the beginning? I see the if-logic in there.....

                          does it really matter where i put it?

                          and....

                          what is the purpose of the

                          MONMSG cpf0000

                          line?

                          thx again. this place is great.
                          Some people are like slinkies.
                          Not really good for anything, but
                          you can't help but smile when you
                          see them tumble down the stairs.

                          Comment


                          • #14
                            I'm not sure its great (wish 4 more traffic)

                            Okay......

                            You found your startup program by looking at the system value

                            WRKSYSVAL --or-- DSPSYSVAL QSTRUPPGM.....


                            Then you used the Command

                            RTVCLSRC and copy the source to a source file member.


                            Now to insert the STRSBS in I would look for other STRSBS commands and do it there.....

                            Most likely STRSBS QSPL





                            ==> The MONMSG CPF0000

                            allows you to monitor for all messages and ignore them - basically..If the first line of executable code in a CL program is MONMSG CPF0000 it will do this for the entire program.



                            There are tons of messages and these are stored in a message file QSYS/QCPFMSG you can view these by command

                            WRKMSGF QCPFMSG


                            Hope this gets you pointed in the right direction.


                            jamie
                            All my answers were extracted from the "Big Dummy's Guide to the As400"
                            and I take no responsibility for any of them.

                            www.code400.com

                            Comment

                            Working...
                            X