ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Numpty question regarding service program - Quite Urgent

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

  • Numpty question regarding service program - Quite Urgent

    Hi All,

    Been years since I had dealt with service programs so i will try to explain what I am not sure about.

    We have a service program: details below:


    Display Service Program Information
    Display 1 of 1
    Service program . . . . . . . . . . . . : PRDSRVPGM
    Library . . . . . . . . . . . . . . . : NBX
    Owner . . . . . . . . . . . . . . . . . : QPGMR
    Service program attribute . . . . . . . : RPGLE
    Detail . . . . . . . . . . . . . . . . . : *MODULE

    Type options, press Enter.
    5=Display description 6=Print description

    Creation Optimization Debug
    Opt Module Library Attribute Date Level Data
    SALRD900 NBX RPGLE 06/01/16 *NONE *YES
    SALRD910 NBX RPGLE 04/09/14 *NONE *YES
    SALRD920 NBX RPGLE 04/09/14 *NONE *YES


    I have added a new procedure to the program SALRD910 and have compiled the module. I am unsure on how to update the service program so that it uses the new version of SALRD910. Not even sure if I have to compile all programs that reference the service program. Just need to know correct process of updating the service program correctly

    Any help on updating correctly would be great

    cheers


  • #2
    Regrettably there is not a simple answer to this as a lot depends on how the Service Program (SP) was built.

    For example, was binder language used to specify a signature for the SP? If so, as long as you add the new procedure(s) to the end of the list and keep the signature the same then no programs will need to be rebound. If not then I suggest that this is a good time for you to learn how to do that stuff to make your life simpler in the future.

    My partner Susan Gantner wrote a couple of pieces for MC Press a few years back that give a good intro to the subject. You can find them here: https://www.mcpressonline.com/progra...ram-signatures and here: https://www.mcpressonline.com/progra...inder-language

    These days I think she would write a simpler version to align with the practice that most people use, which is to use a hard-coded signature and make sure that you always add new procedures to the end of the list.

    Comment


    • #3
      When you display service program information with DSPSRVPGM, what do you see in the fields for Export Source File and current export signature...? This should tell you whether or not binder source was used when the srvpgm was created and what the signature is:

      Click image for larger version  Name:	DSPSRVPGM.jpg Views:	1 Size:	60.0 KB ID:	150617

      Anyway, here is a link to an article that answers some questions and shows how to simply create and update service programs using hard-coded signatures and adding new procedures to the end of the binder source:
      Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!
      Last edited by Viking; July 5, 2019, 03:15 PM.

      Comment


      • #4
        You can see the signature on the first page of DSPSRVPGM. Press F11 to see the non-hex value of the signature.

        I didn't know until just now when I read Viking's post that the binder source information was shown in DSPSRVPGM. Cool!

        (Before I knew that, I used the value of the signature to guess whether binder source was used. If the non-hex value is "nice", then the service program was created with binder source. If the non-hex value looks like garbage, then it was probably created with EXPORT(*ALL), but it might have been created with binder source, where the binder source specified the hex value that the service program was initially created.)

        If the service program was created with binder source, just edit the binder source to add your new EXPORT to the end. (Always add new exports to the end.)

        If the service program was not previously created with binder source, you can retrieve the binder source to recreate the service program the same way using RTVBNDSRC. That binder source will become part of the source for your application. Keep everything the same in the generated binder source, except add your new procedure to the end of the EXPORT list. Rebuild the service program using the modified binder source. With this option, you don't have to recreate any programs using the service program.

        Comment

        Working...
        X