ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Retrieve RPGLE source from object

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

  • Retrieve RPGLE source from object

    Just found this thought it could be of some use (attachment)
    by JR Friedman

    Code:
    It is possible to retrieve source from RPG programs if the program has been
     compiled with the correct parameters. The following procedure will retrieve the 
    source from single-module RPGLE programs compiled with CRTBNDRPG with
     DBGVIEW(*LIST).
    
    We have changed our command default to this option to allow debugging on our 
    production machine, which does not contain program source. The program could 
    be modified to handle RPG III programs compiled with OPTION(*LSTDBG) and 
    multiple module ILE programs. As far as I know, the retrieval works with the
    exception of list directives (i.e. /EJECT) and color/highlight special characters.
    Attached Files
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    Re: Retrieve RPGLE source from object

    Originally posted by jamief View Post
    Just found this thought it could be of some use (attachment)
    by JR Friedman

    Code:
    It is possible to retrieve source from RPG programs if the program has been
     compiled with the correct parameters. The following procedure will retrieve the 
    source from single-module RPGLE programs compiled with CRTBNDRPG with
     DBGVIEW(*LIST).
    
    We have changed our command default to this option to allow debugging on our 
    production machine, which does not contain program source. The program could 
    be modified to handle RPG III programs compiled with OPTION(*LSTDBG) and 
    multiple module ILE programs. As far as I know, the retrieval works with the
    exception of list directives (i.e. /EJECT) and color/highlight special characters.
    Jamie - is this safe to use? I need to retreive CLLE source

    Comment


    • #3
      Re: Retrieve RPGLE source from object

      Hi gwilburn:

      try the command rtvclsrc

      Best of Luck
      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: Retrieve RPGLE source from object

        This does not work with CLLE only CLP

        Comment


        • #5
          Re: Retrieve RPGLE source from object

          I think rtvrpgsrc is rpg specific. (not sure)......Try debug and copy/paste.

          Best of Luck
          GLS
          The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

          Comment


          • #6
            Re: Retrieve RPGLE source from object

            Originally posted by GLS400 View Post
            I think rtvrpgsrc is rpg specific. (not sure)......Try debug and copy/paste.

            Best of Luck
            GLS
            It is.

            Just to offer a suggestion - a lot of people do not like debugging at the listing level - finding that there is just too much "stuff". This retrieval method works if the *LIST view is present - which is why I recommend the use of *ALL for the debug view. The resulting object is very slightly larger, but as usual there is no effect on run time memory usage. This way you can debug using either *Source or *List views and have the ability to recover the source.

            Also worth pointing out that this is a lousy substitute for a backup and version control strategy - way too dangerous as it can be screwed by any programmer who sets up their own custom PDM compile option and specifies their own personal favorite for the debug view.

            Comment

            Working...
            X