IBMiAccess




Results 1 to 1 of 1

Thread: QCLRPGMI API to Retrieve program info

  1. #1
    Driver of cars, eater of food jamief's Avatar
    Join Date
    Jan 2004
    Location
    Belvidere, IL - United States of America
    Age
    49
    Posts
    9,417
    Rep Power
    12612

    Thumbs up QCLRPGMI API to Retrieve program info

    Here is Example of API to return program information

    I attached code for easy download


    Code:
    À     *                                                                                            Ä
    À     * Program Info                                                                               Ä
    À     *                                                                                            Ä
         d                SDS
         d  @PGM                 001    010
         d  @PARMS               037    039  0
         d  @JOB                 244    253
         d  @USER                254    263
         d  @JOB#                264    269  0
          *=============================================
          *   QCLRPGMI  API to Retrieve program info
          *=============================================
          *
          * Standard API error data structure
          *
         d APIERR          DS                  INZ
         d  AEBYPR                 1      4B 0
         d  AEBYAV                 5      8B 0
         d  AEEXID                 9     15
         d  AEEXDT                16    116
          *
          * Standard parameters for QCLRPGMI                                API
          * (Retrieve Program Information)                                  API
          *
         d RP_PARM         DS                  INZ
         d  RP_RCV                 1    416                                         RECEIVER VARIABLE
         d   RP_PGMNAME            9     18                                         PROGRAM NAME
         d   RP_PGMLIB            19     28                                         PROGRAM LIBRARY
         d   RP_PGMATTR           39     48                                         PROGRAM ATTRIBUTE
         d   RP_TEXT             111    160                                         TEXT DESCRIPTION
         d   RP_MODULES          413    416B 0                                      NUMBER OF MODULES
         d  RP_RCV_LEN           417    420B 0                                      LENGTH OF RCV VAR
         d  RP_FORMAT            421    428                                         FORMAT NAME
         d  RP_PGM_LIB           429    448                                         PGM NAME & LIBRARY
         d   RP_PGM              429    438                                         PROGRAM NAME
         d   RP_LIB              439    448                                         PROGRAM LIBRARY
          *
          * Define Variables
          *
         d InLibrary       S             10
         d InProgram       S             10
          *
         c                   clear                   RP_parm
         c                   eval      RP_RCV_LEN = 416
         c                   eval      RP_FORMAT  = 'PGMI0100'
         c                   eval      RP_PGM     = InProgram
         c                   eval      RP_LIB     = InLibrary
         c                   clear                   APIERR
         c                   eval      AEBYPR     = 116
          *
         c                   call      'QCLRPGMI'
         c                   parm                    RP_RCV
         c                   parm                    RP_RCV_LEN
         c                   parm                    RP_FORMAT
         c                   parm                    RP_PGM_LIB
         c                   parm                    APIERR
          *
         c                   eval      *INLR = *On
          *
          *=============================================
          *   *Inzsr - Initial onetime subroutine
          *=============================================
         csr   *Inzsr        begsr
          *
         c     *Entry        Plist
         c                   parm                    InLibrary
         c                   parm                    InProgram
          *
         c                   endsr
          *=============================================
    Attached Files Attached Files

  2. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Age
    21
    Posts
    1,000,000
     

Facebook Comments


Similar Threads

  1. retrieve source program & dependent program
    By christinaf in forum RPG/RPGLE
    Replies: 2
    Last Post: January 17th, 2006, 08:20 PM
  2. retrieve pf called by CL or CLLE program
    By christinaf in forum CLP/CLLE
    Replies: 9
    Last Post: January 5th, 2006, 07:40 PM
  3. Jobd
    By ris_skma in forum RPG/RPGLE
    Replies: 1
    Last Post: July 27th, 2005, 06:34 AM
  4. rpgle
    By mohans in forum RPG/RPGLE
    Replies: 4
    Last Post: May 21st, 2005, 11:50 PM
  5. Null Values and SQL Fetch
    By pjk in forum SQL
    Replies: 1
    Last Post: February 22nd, 2005, 11:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •