ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Change source date of RPGLE

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

  • Change source date of RPGLE

    Is there any way by which one can change the iSeries system settings to accordingly manipulate source date change on Line of Code.

    This has accidently happened with me that an unwanted section of code was unwantedly changed which has caused an obvious change in the dates along those LOCs.

    Can someone please guide a possible way of going about and changing back those dates to previous one. Is this possible?

    Thanks.

  • #2
    Re: Change source date of RPGLE

    A source file is just a file that you can edit with DBU, another file editor, or a program. A typical source file for RPGLE looks like the following:

    Field Type Length
    SRCSEQ ZONED 6 2
    SRCDAT ZONED 6 0
    SRCDTA CHAR 108 108 13 Both

    You want to adjust Modify SRCDAT for the lines in question. When editing the file in this manner be sure to be in the correct member.
    Last edited by DAG0000; February 28, 2013, 07:40 AM.

    Comment


    • #3
      Re: Change source date of RPGLE

      yes it's possible but it can be a bit hazardous to your health if you're not careful. you can either OVRDBF to the specific member & use SQL to perform the update or use SQL's CREATE ALIAS instead of OVRDBF.
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment


      • #4
        Re: Change source date of RPGLE

        Guys,

        I am talking about not some specific date field but rather of a code line being modified.
        eg:
        FMT CX CL0N01Factor1+++++++Opcode&ExtExtended-factor2+++++++++++++++++++++++++++++Comments++++++ ++++
        0232.00 C MOVE 'S' Sumdet 130228


        Here the last value is taht of todays modified date. I would like to edit this value, how do i go about it?

        Comment


        • #5
          Re: Change source date of RPGLE

          that is exactly what our answers would do is allow change of the modified date. did you even try either of the answers or just assume that we gave you bogus info?
          I'm not anti-social, I just don't like people -Tommy Holden

          Comment


          • #6
            Re: Change source date of RPGLE

            heck here's the SQL based on the data you gave:
            Code:
            CREATE ALIAS QTEMP/MYALIAS FOR MYLIB/QRPGLESRC (MYSRCMBR)
            
            UPDATE QTEMP/MYALIAS SET SRCDAT = 1130101 WHERE SRCSEQ = 232
            
            DROP ALIAS QTEMP/MYALIAS
            that will set the source date to Jan 1st, 2013
            I'm not anti-social, I just don't like people -Tommy Holden

            Comment


            • #7
              Re: Change source date of RPGLE

              Tom,

              Appreciate the help!

              Thanks

              Comment


              • #8
                Re: Change source date of RPGLE

                Code:
                SET SRCDAT...
                is the field/column you are updating. that is the source date. the update sets the source date = 1130101 for the row/record that has the value of 232 (source line 232)
                I'm not anti-social, I just don't like people -Tommy Holden

                Comment


                • #9
                  Re: Change source date of RPGLE

                  Originally posted by tomholden View Post
                  that is exactly what our answers would do is allow change of the modified date. did you even try either of the answers or just assume that we gave you bogus info?
                  DON'T.. DO NOT under any circumstances provoke Tommy. He bites
                  the smoking gnu

                  Comment

                  Working...
                  X