ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Procedure Library List & User

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

  • Procedure Library List & User

    So I create a simple procedure that calls a CL. I can see the job running when I start it. I have a few questions though.

    1. Is there anyway to get it to run under the user that submits it rather than Quser?
    2. Is there anyway to get it to run under a different job name rather than Qzdasoinit?
    3. What library list is this run with since the user is different?

  • #2
    Re: Procedure Library List & User

    Did you execute the SBMJOB (submit job) in your CL?
    With the SBMJOB command you can predefine the user, the jobname and set the library list.

    Birgitta

    Comment


    • #3
      Re: Procedure Library List & User

      How are you calling the procedure? Is this from embedded SQL, CLI, ODBC, JDBC, PHP...?

      It's the caller's connection properties that provides the user name, password, library list, and other settings.

      I don't know why the job name would matter to you, though...? If you need to control the job name, you'll probably have to use SBMJOB as Birgitta suggests.

      Comment


      • #4
        Re: Procedure Library List & User

        So you are saying I need to change the CALL in the CL to be SBMJOB? When I always ran the CL I would use SBMJOB but I guess that is not how it works when wrapped in a CL?

        Code:
         CL
        CALL       PGM(AR...) PARM(&PARM1) 
        CALL       PGM(AR...) PARM(&PARM1) ...

        Code:
         PROCEDURE
        CREATE PROCEDURE TESTLIB.TSTCL ( ) 
        	LANGUAGE CL 
        	NOT DETERMINISTIC 
        	MODIFIES SQL DATA 
        	CALLED ON NULL INPUT 
        	EXTERNAL NAME 'PRDCLLIB/CLTST' 
        	PARAMETER STYLE GENERAL ;
        RUN
        Code:
        CALL TESTLIB.TSTCL()

        Comment

        Working...
        X