ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

After leaving call in CL, going back into the RPG pgm

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

  • After leaving call in CL, going back into the RPG pgm

    Good morning, I just got my printing issues figured out, now I am generating 2 spool files. In debug I see my pgm go to my $EOJ routine, then out to the CL, it goes to the next line where my DLTOVR(*ALL) is , then it goes back to the $INIT routine in the RPG program.

    Any input would be appreciated. Thank you.

    // ---------------------------
    // End Of Job
    // ---------------------------

    BegSR $Eoj;

    *Inlr = *On;
    Return;

    EndSR;

    /End-free

    -----------------------------------------------------------------------------------

    PGM PARM(&OUTQ)

    DCL &OUTQ TYPE(*CHAR) LEN(10)

    OVRPRTF FILE(INR0050F) OUTQ(PGMRSNAPSH) HOLD(*YES) +
    SAVE(*YES) OVRSCOPE(*CALLLVL)

    CALL PGM(INR0050)

    DLTOVR FILE(*ALL)

    END:
    /* RETURN */ I had this uncommented first, then tried it without it, still does 2 spool files.
    ENDPGM




  • #2
    Re: After leaving call in CL, going back into the RPG pgm

    It seems a spool file is generated to my default outqueue and then to the one I am overriding to in the CL.

    Comment


    • #3
      Re: After leaving call in CL, going back into the RPG pgm

      In the other thread you mentioned replacing the SBMJOB with a CALL somewhere. By chance, did you add the CALL and not remove the SBMJOB so both are happening? Just a guess, you haven't shown enough to tell what is really going on. The debug sounds weird, like you aren't debugging with the proper source. Or are running an old version that doesn't match the source. Did you sign off and back on and try again?

      Comment


      • #4
        Re: After leaving call in CL, going back into the RPG pgm

        Hi thanks for the reply,

        I did find a second object in a work library, I deleted that and signed off. I signed back on and ran it again, it is a call. I still got a spool file based on my user id JOBD default outq, then got one based on the OVRPRTF.

        Scratching my head.

        Thanks.

        Comment


        • #5
          Re: After leaving call in CL, going back into the RPG pgm

          Look and see if the spool files are from the same job, your interactive one, or not. That will confirm that there is not a SBMJOB still happening.

          Comment


          • #6
            Re: After leaving call in CL, going back into the RPG pgm

            Hello, this is what I get :


            File
            Opt File Nbr Job User Number
            INR0050F 2 PGMRSS SHARTEST 170875
            INR0050F 1 PGMRSS SHARTEST 170875


            Looks like it's linking to my session, I may not have something set up correctly on my profile.

            Last Spooled
            Used File
            Opt File Queue Library ASP Date Size (K)
            INR0050F SSPRT QGPL 1 02/19/16 40
            INR0050F PGMRSNAPSH QUSRSYS 1 02/19/16 40

            on change of view:
            Device or Total Cur
            Opt File User Queue User Data Sts Pages Page Copy
            INR0050F SHARTEST SSPRT INR0050 RDY 2 1 1
            INR0050F SHARTEST PGMRSNAPSH INR0050 HLD 2 1 1
            Last edited by 64waves; February 19, 2016, 10:15 AM.

            Comment


            • #7
              Re: After leaving call in CL, going back into the RPG pgm

              FOUND IT. I was cleaning up my code and adding documentation at the top and while I was struggling with the OVRPRTF commands, as I was copying and commenting, I copied the line that does a call, it was farther down in the code after some commented things, so I had 2 calls.

              My dumb thing of the day. I appreciate the help.

              Comment

              Working...
              X