ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

crtpgm vs crtsrvpgm

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

  • crtpgm vs crtsrvpgm

    hi all,
    what is the different CRTPGM and CRTSRVPGM, i think this command have a same function.

    which one is better to use CRTPGM or CRTSRVPGM ????

    thx u all

  • #2
    Re: crtpgm vs crtsrvpgm

    Hi rx,

    CRTPGM is creates PGM object. it is runnable.
    CRTSRVPGM is creates service program (SRVPGM) object. it is not runnable object.

    Regards,
    Vishal

    Comment


    • #3
      Re: crtpgm vs crtsrvpgm

      thx u
      i see now

      CRTPGM -> can be call
      CRTSRVPGM -> must be included in program to call the procedure

      Comment


      • #4
        Re: crtpgm vs crtsrvpgm

        As the Name Suggests, Service program is kind of Service repository which is attached to Program if your program is inheriting some services (Like procedures, modules) which are available in a service program.

        You can keep all service modules like calculations, date handlings, report headings in a service program and then use them in your program.

        -
        Swaps
        Wishing you all a very happy and healthy new year

        Comment


        • #5
          Re: crtpgm vs crtsrvpgm

          Program:the CRTPGM command create a program object from one or more previously created modules and if required,one or more service programs.You can bind modules created by any of ILE create module commands CRTRPGMOD,CRTCMOD,CRTCBLMOD,or CRTCLMOD.
          NOte: the module and service program must hav been created prior to using CRTPGM command.

          Service Program: A service program is a bound program(type *SRVPGM) consisting a set of procedure that can be called procedure in other bound programs

          Service Program typically used for comman function that are repeatidy called within an application and across application.

          For example the ILE compilers use service programe to provide run time services such as math function,i/o routines. Service prograsm enable reuse and simplyfy maintance and reduce storage

          A service Program differs from a program in two ways

          1.It does not contain a PEP(program entry procedure).means that you can not call a service using the CALL operation.
          2.A Service program is bound into program or other service program using binding by reference.


          For More info look here also..
          http://publib.boulder.ibm.com/iserie...c415606608.htm...



          Pramendra Pandeya
          Last edited by pramendra; December 31, 2009, 12:49 AM.
          Young people knows how to run fast but old people knows the way..

          Comment


          • #6
            Re: crtpgm vs crtsrvpgm

            thx for reply pramendra,

            this is a complete explanation ....


            thx u all

            Comment

            Working...
            X